My VM is stuck in "deallocating"

Esther Carnerero 1 Reputation point
2022-05-19T17:01:04.973+00:00

We had problems with an Azure VM and tried to reboot it. The rebooting has never ended, but we stop it and it seems to work.
But we try to start again and now, the VM is stuck in "Deallocating" state.
It has been there for more than an hour.
We don't know what to do.

Thank you very much

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
318 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,496 Reputation points Microsoft Employee
    2022-05-19T17:58:11.983+00:00

    Hello, @Esther Carnerero !

    What should I do if my virtual machine is stuck in the "deallocating" state?
    The general recommendation is to allow the deallocation action to time out which should take about 90 minutes. After a couple hours you should see an error message that explains why the VM was unable to deallocate and often retrying the operation will succeed at this point.

    Note that while in the deallocating state, you are not billed for compute costs (although some Azure resources, such as Disks and Networking will continue to incur charges).

    What else can I do?
    There are a variety of other approaches that people have taken although success may be situational depending on the issue that caused the VM to get stuck in the deallocating state.

    • az vm update: Running this command from the CLI attempts to update the properties of the VM and may end the stuck process.
    • Redeploy the VM: Redeploying a VM may clear whatever process was causing the VM to be stuck.
    • Resize the disk: Similar to redeploying, this may force the hung process to stop.
    • Boot diagnostics: You can see a screenshot of your VM boot which may give you insight to what is causing the problem (Support + troubleshooting > Boot diagnostics in your VM resource).
    • Run command: Run command allows you to run PowerShell scripts in your VM which may help.

    Additional Resources:

    1 person found this answer helpful.
    0 comments No comments