Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, September 20, 2019 2:21 PM
I have a VM in East US that went unresponsive, so I tried old "reboot it".
I tried both the portal and cloudshell with "Stop-AzureRmVM -Force", but neither seems to work. The machine seems to be stuck in the deallocating state. Any ideas how to fix this?
Thanks,
All replies (5)
Friday, September 20, 2019 2:36 PM âś…Answered | 1 vote
The best course of action in these situations is generally to let the deallocation action time out. That can take about 90mins.
Give it a few hours and after a bit you should see that an error message associated with why it could not deallocate. After that, you can either retry or if you share the error I can take a look further as well.
Friday, September 20, 2019 2:36 PM
I found a failure log entries pertaining to the shutdown operation. I see :
Deallocate Virtual Machine : Started
Deallocate Virtual Machine : Accepted
VirtualMachines : Failed
Error code : ResourceOperationFailure
Message : The resource operation completed with terminal provisioning state 'Failed'.
Is there anywhere else I can find more details to debug this situation? At this point, can't stop, start, remote, or seemingly interact with the machine at all. :/
Friday, September 20, 2019 2:43 PM
Give this a try:
1) Open the Azure Portal
2) Open the Azure Cloud Shell
This will open a CLI instance associated with your subscription
3) Run the following:
az vm update --name VMNAME --resource-group RESOURCEGROUPNAME
Replace VMNAME and RESOURCEGROUPNAME with the correct variables for your situation.
4) Let the command run and try the dealloaction or another action on the VM again.
If you get any errors please paste them here.
Friday, September 20, 2019 3:27 PM
Micah -
I tried to run the command you suggested, but received :
"Previous stop-deallocate operation on XXXXX did not complete yet. Please try stop-deallocating the VM again. You should be able to restart the VM after stop-deallocation succeeds."
It seems that the initial shutdown via the portal had failed, but that the second shutdown via cloudshell was still pending.
I waited and magically, the second shutdown succeeded. You were right with that initial "be patient". Thanks for all your help!
Cheers!
Friday, September 20, 2019 3:28 PM
Great! Glad to hear it is all resolved :)