Sep 13 2021 01:09 AM
Has anyone managed to get an image build working with AIB and Windows 11? The image I get doesn't seem to work correctly, I can't get a bootable VM from it. There are a number of errors but Packer is quite noisy normally anyway so hard to tell if normal or not, it might be failing around Windows update / Sysprep area.
Oct 10 2021 03:39 PM - edited Oct 10 2021 03:57 PM
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.
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
Oct 11 2021 12:50 AM
@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.
Oct 11 2021 05:08 PM
Oct 12 2021 09:45 PM - edited Oct 12 2021 10:02 PM
Oct 12 2021 09:45 PM - edited Oct 12 2021 10:02 PM
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.
Dec 13 2022 08:14 AM