AiB Accepts the Deployment of a GEN 2 VM and the Distribution Process Fails.
frestevao opened this issue · 11 comments
Hello team!
On the public documentation, I see that the AiB does not support the GEN 2 VM.
https://docs.microsoft.com/en-us/azure/virtual-machines/image-builder-overview#hyper-v-generation
But it allows me to trigger the deployment and the process fails on the Image Distribution.
Source Image as a Gen 2 VM.
AiB template deployed with success.
AiB generates the Managed Image as generation 1
SIG image with Unknow state
AiB error on Azure Portal:
"provisioningState": "Succeeded",
"lastRunStatus": {
"startTime": "2021-11-12T15:04:52.400830569Z",
"endTime": "2021-11-12T15:28:44.353389414Z",
"runState": "Failed",
"message": "Failed in distributing 1 images out of total 1: Some error happened, please check the error details."
},
Thanks, very interested in this bugfix/feature
Did you deploy the template with e.g. some powershell files you used to customize the image further?
Hello @schiffne,
My deployment runs a PowerShell script that enabled IIS and other settings on the Windows Server.
If you want, I can share the template with you.
Best regards,
Estevão
I will run my deployment now as well, installing MECM and AntiVirus, it does work with Gen1 images...
will let you know
Seeing the same issue. Same set of customization work fine with Gen1 (Win10), but any powershell customisation steps fail on a Gen2 (Win11) run.
Attempts to run the PS, but sits and waits until the timeout and then moves to cleanup.
@StevybSC did you ever find a solution to this? Currently seeing the same behaviour too
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