Azure/azvmimagebuilder

AWARENESS: Gen2 support availability

kof-f opened this issue · 6 comments

kof-f commented

By Monday, 11/15/2021, Azure Image Builder (AIB) will support creating Hyper-V Gen2 images in the following scenarios:

  • AIB will accept Gen2 images as its source image for all types (Managed image, Azure Compute Gallery, Platform Image Repository)
  • AIB will distribute Gen2 images to all destinations (Virtual Hard Disk, Managed image, Azure Compute Gallery) if the source is Gen2

Please be aware the new default build VM size for Gen2 is Standard_D2ds_v4. If you have any issues with this functionality, feel free to respond to this issue or raise a support ticket.

HI Kofi, can you please confirm that the changes happened yesterday. We deployed today via AzureDEVOPS a CloudPC image from the Windows11preview gallery and we still are stuck in the status, that the vmware that gets created is not moving forward. See screenshot. This is after 2h of running.
image

so we got a little bit closer, in general we were able to get a v2 vm in managed apps or in the shared imaged gallery. We do see the VM stopping during the build process when we do add some powershell scripts or commands than the VM just does not continue. The Ps1 scripts were working on g1 machines without any problems and they are quite simple. Did anyone else added powershell customization? I added some screenshots

image

one additional update, so it looks like it is the InstallApplication script which gets downloaded via the URI. there the machines does not go further, if you look at the log file, you can see this.....btw the powershell contains only one line: EXIT 0
So I do think there is definitely a defect. @kof-f How would this be addressed now? I will try to reach you via our account rep.

[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:23 [INFO] 3522 bytes written for 'uploadData'
[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:23 packer-plugin-azure plugin: 2021/11/19 08:36:23 Uploading file to 'C:/Windows/Temp/packer-elevated-shell-61976207-082b-0984-d0e7-5c7a39eb702f.ps1'
[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:24 packer-provisioner-powershell plugin: [INFO] 1924 bytes written for 'uploadData'
[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:24 [INFO] 1924 bytes written for 'uploadData'
[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:24 packer-plugin-azure plugin: 2021/11/19 08:36:24 Uploading file to 'c:/Windows/Temp/script-619760d7-ae70-6b57-c267-9b869b1ca71d.ps1'
[ab2bd94f-41f0-4c57-847b-b98692037c80] PACKER ERR 2021/11/19 08:36:25 packer-plugin-azure plugin: 2021/11/19 08:36:25 [INFO] starting remote command: powershell -executionpolicy bypass -file "C:/Windows/Temp/packer-elevated-shell-61976207-082b-0984-d0e7-5c7a39eb702f.ps1"

kof-f commented

Hey @schiffne sorry I'm just seeing this. Are you still experiencing this issue? The changes are live in all regions that Azure Image Builder is available in.

@kof-f @schiffne I have witnessed this same behaviour over the last few days. I have an AIB template which has one Powershell customiser that just creates a local directory. The build hangs after the starting remote command line. One thing I did try was to do an admin password reset on the packer VM, and configure the NSG to allow RDP in. When I RDP to the machine the script then executes and I can see the progress in the customiser log file.

It would be good to understand what the issue is here as I am currently unable to successfully build images

So after further experimentation today, adding "runAsSystem": true to the PowerShell customiser appears to resolve this issue. By default, if it isn't specified the value is false. Changing this allowed my builds to continue without hanging