0

I have an image, which has been sysprep'd with no unattend.xml file. When I try to deploy it to a VMSS, it fails with:

New-AzVmss : Long running operation failed with status 'Failed'. Additional Info:'OS provisioning for VM 'Lancelot-vmss_0' failed. Error details: This installation of Windows is undeployable. Make sure the image has been properly prepared (generalized).

It was generalized, if i get the boot diagnostics screen of the failed VM or VMSS: VM instance, it shows: enter image description here

I have tried this several times and each time get the same result.

The Image has been recreated several times, I take the current Image and deploy it to a VM, update the software within the VM, and create a new Image. This process used to work but no longer works even though it has now changed.

I thought it might have something to do with Rearm value, but i have checked it before creating this latest image and it said it has 987 remaining.

Serial Console in Azure Portal looks to connect but just shows a flashing courser (even if I press Enter)

I can see a failed event which is:

Additional error information is available for this virtual machine: GENERAL Provisioning state Provisioning failed. OS provisioning for VM 'LancelotBase' failed. Error details: This installation of Windows is undeployable. Make sure the image has been properly prepared (generalized). Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/. OSProvisioningClientError Provisioning state error code ProvisioningState/failed/OSProvisioningClientError Guest agent Not Ready. VM status blob is found but not yet populated.

Does anyone know what is causing this or how I can investigate it considering I can not find a way to access its logs inside the VM?

Jeffrey
  • 2,095
  • 3
  • 20
  • 36
  • How do you create the VM that the image you want to create from? And as the error shows the Linux VM agent is not ready. – Charles Xu Feb 26 '19 at 02:13
  • It is a custom windows image. It first started from Azure's 2016 image then we installed IIS. Each time we update our software we spin up the last image we created, update the image then sysprep again – Jeffrey Feb 26 '19 at 07:59
  • It seems no problems. What's size do you choose for your vmss? – Charles Xu Feb 26 '19 at 08:05
  • It is using Standard_A2_v2. I am also encountering a problem where it is not setting the ComputerNamePrefix, or TimeZone as set with Powershell Command Set-AZVmssOsProfile, but I didn't want to investigate that until I can get the Image to run successfully – Jeffrey Feb 26 '19 at 09:16
  • Maybe you can try to use a better size for your VMSS, you know, windows system always need a lot CPU and memory. For example the size Standard_D2s_v3. – Charles Xu Feb 26 '19 at 09:22
  • I don't see how that could resolve the issue, considering the boot diagnostics screen is showing a CMD window titled 'Error Handler'. I have just tried re-creating the Image and it has failed again, I will try loading this new Image into a better machine (standalone VM not VMSS) to confirm if the size change makes a difference or not – Jeffrey Feb 26 '19 at 09:27
  • Putting the image into a Standard_D2s_v3 VM, still produced the same error. – Jeffrey Feb 26 '19 at 09:38
  • OK, then you should check if your image is really useful. If you create your VM from the image in Azure Marketplace or the VHD file that you upload? – Charles Xu Feb 26 '19 at 09:41
  • As mentioned, We first started with the Azure 2016 image, we customised it, sysprep'ed, created image and this worked fine. Each subsequent update to the image was done by taking our last working image, update the software, then sysprep and create a new image. The only difference between the last working one and this one, is that we did a full virus scan and ran windows updates before running sysprep – Jeffrey Feb 26 '19 at 09:49
  • You should check if the Azure agent service was closed. As the error shows the agent is not ready. – Charles Xu Feb 26 '19 at 09:53
  • How do I do that? – Jeffrey Feb 26 '19 at 10:34
  • You can take a look at [this](https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows#manual-detection), it's a simple way. – Charles Xu Feb 27 '19 at 01:02
  • Any update? Were you able to resolve the issue? – Karishma Tiwari - MSFT Mar 01 '19 at 19:12

0 Answers0