The virtual machine is in a failed state
OS Provisioning for VM 'Win10Desktop-02' did not finish in the allotted time. However, the VM guest agent was detected running. This suggests the guest OS has not been properly prepared to be used as a VM image (with CreateOption=FromImage). To resolve this issue, either use the VHD as is with CreateOption=Attach or prepare it properly for use as an image:
- Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/
- Instructions for Linux: https://azure.microsoft.com/documentation/articles/virtual-machines-linux-capture-image/
Deleting and recreating the virtual machine may resolve the issue.
Why is this failing? I used the capture and now trying to redeploy to a vm.
Thanks for posting your query on Microsoft Q&A.
In this case, sometimes the VM may still finish provisioning successfully. Please check the status of the VM. If it is 'running', try stop and start the VM and see if that resolves the issue.
If that doesn't help, the reason could be that the image you are using to deploy the VM is not prepared properly. I would recommend recreating the image using image prep guidance below and deploying the VM again.
For Windows images, follow the instructions here: Prepare a Windows VHD to upload to Azure
For Linux images, follow the instructions here: Create a Linux VM from a custom disk with the Azure CLI and
This document talks in detail about the OS Provisioning errors and troubleshooting: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-deployment-new-vm-linux#provisioning-troubleshooting
Why do provisioning failures occur?
Commonly, provisioning failures can happen for multiple reasons, such as:
Missing provisioning /incorrectly configured agent
- You will need to ensure an agent is present and is working correctly, you should be using cloud-init or if your image will not support this, you can review these steps.
- Incorrect image configuration
- We have guidance on how images should be set up with cloud-init and other Azure image requirements, please check this.
Similar threads for reference:
If you have any questions or the suggestions above do not resolve your issue, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
I ran the capture straight from a running, working azure provisioned vm. Why would I need to Prep the image? Seems like Microsoft should have this sorted out.
@Adam Polnicki Thanks for sharing the details. Can you please elaborate on how are you trying to provision this VM, any document you are following?
Sign in to comment