@Sowmia Subbiah Thanks for posting your query on Microsoft Q&A.
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
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-centos
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:
- https://learn.microsoft.com/en-us/answers/questions/989694/error-code-osprovisioningtimedout
- https://learn.microsoft.com/en-us/answers/questions/26865/unable-to-create-vm-from-an-image
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.
Please don’t forget to Accept Answer and hit Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.