Windows Azure - Stuck on Running (Provisioning) when creating VM from custom created image in gallery
There was an issue for a while where running sysprep /shutdown on Azure causes this behaviour - could it be down to how/when the images were created? -
....If you capture a VM that has been started after sysprep has been run, the guest OS is not in the correct state. The capture operation will succeed, but VMs created from the image will fail to provision successfully, and will ultimately show status Provisioning timed out.
The issue had since been resolved, but it may explain the difference if one image was created at that time once the other hadn't.
To answer your second question - you can't create a new VM AND set it to join a domain at at the same time from the portal but you CAN do that in powershell - Add-AzureProvisioningConfig
which you would use with New-AzureVMConfig
to create a configuration you would feed into New-AzureVM
has switches to provide domain information - name, user and password.
I just learned some hard lesson for capturing image and creating VM from image at Azure. So basically, there are 2 things:
- we need to follow the instruction listed at post How to Capture an Image of a Virtual Machine Running Windows Server which has link to Image capture issue / VM unexpectedly started after guest-initiated shutdown as well.
- sysprep won't work at domain controller. Sysprep is allowed to run on domain controller, we could create the VM from captured images as well, however it would stuck at the running (provision) until it times out and there is no way to access the machine via RDP. Generally, if the VM is working, RDP access to the machine should be working even if VM status is still at running (provision) (still need to wait a few minutes when status is changed that status)