Forum Discussion
Azure Image Builder & Windows 11
Hello planetwilson , I am also trying to get that to work... I believe the issue is with the vm generation.
".../... The following configuration requirements apply to VMs running Windows 11.
- Generation: 2 *
- Storage: 64 GB or greater
- Security: Secure Boot capable, virtual TPM enabled
- Memory: 4 GB or greater
- Processor: 2 or more virtual processors .../..."
https://docs.microsoft.com/en-us/windows/whats-new/windows-11-requirements#virtual-machine-support
So...We need gen 2 vms to run windows 11, and AIB only creates Gen1. I believe that we will need to follow this workaround:
" Image Builder currently only natively supports creating Hyper-V generation (Gen1) 1 images to the Azure Shared Image Gallery (SIG) or Managed Image. If you want to create Gen2 images, then you need to use a source Gen2 image, and distribute to VHD. After, you will then need to create a Managed Image from the VHD, and inject it into the SIG as a Gen2 image."
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/image-builder-json#properties-source
Adrián García MartinezHI yes - I already tried this approach but still didn't get it to work. The VM never comes back from a sysprep. I am not sure if this is a Win 11 Preview issue or not. As an aside, MS told me that they are looking at Gen 2 support in AIB towards the end of this year.
- Adrián García MartinezOct 12, 2021Copper ContributorI think I misunderstood the workaround myself, so I am going to retry now and will let you know if this works or not too...
https://github.com/danielsollondon/azvmimagebuilder/issues/57#issuecomment-684935782
planetwilson, did you try to distribute to a VHD and then as a post deployment task get the VHD captured as a version to SIG?- Adrián García MartinezOct 13, 2021Copper Contributor
I can confirm that it works. Its a bit cumbersome but once scripted it's the same...
You have to use a managed image as the source to your vm in the template, then distribute to a VHD ; this is an option within the template, just make sure not to delete the resource group as the VHD will be stored in the VHDS container of the temporary resource group storage account.
Once that is complete, create a managed image out of that VHD and then publish it to the SIG.
VMs deployed from that image version work perfectly fine.At least we do not need to wait for MSFT to release this feature! Let me know if its not clear and I will be happy to help you.
- Mikael LisshagenDec 13, 2022Copper ContributorThis is working native now. Just follow This guide. https://learn.microsoft.com/sv-se/azure/dev-box/how-to-customize-devbox-azure-image-builder