Virtual machines going to FAILED state and then we can't do anything with related resources

Mirko Krajcer 5 Reputation points
2025-05-29T21:46:00.8433333+00:00

Hi! In the subscription

9977b1c2-...

we are running our virtual machines. When we try to delete them, for some reason, they go onto FAILED state and we can't do anything with them. We have 4-9 disks attached to them and all the disks are in the "detaching" phase which lasts forever. We can't delete any of the disks, since they have an ongoing conflicting operation (detachment). We can't stop or restart the VM, nor can we swap the OS disk.

This is causing downtime for us and we need it to be solved ASAP. There are no errors or alerts displayed and we really don't have any idea what's going on. From our code, we issue a request to delete a VM, the request itself doesn't throw any errors, while the machine goes into the FAILED state.

Please, help us resolve this. If possible, let us know where we can see what the issue is, since we've tried many things. Also, if you can see it from your side, that would be great!

Looking forward to collaborating with you and trying to resolve this.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,968 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 8,465 Reputation points
    2025-06-09T08:36:31.9033333+00:00

    Mirko hi, wow, that sounds like a real headache )) virtual machines stuck in 'failed' state with disks hanging in 'detaching' limbo... yeah, that's no fun...........

    u might wanna try forcing the vm deletion using azure cli or powershell. sometimes the portal gets stuck but command line pushes things through. just make sure u grab the vm id first.

    check if there are any locks on the resources. azure resource locks can block deletions even if everything else seems fine. u can list them with 'az lock list' and remove if needed microsoft docs on resource locks.

    as well check this... if the disks are stuck detaching, u might need to manually break the lease. azure storage has this thing called 'break lease' which can force-release a disk microsoft docs on breaking leases.

    when resources get stuck, retry the operation after a few mins. sometimes the backend just needs a breather )) also, look at activity logs or audit trails, they often hide clues about what went wrong. worth looking into, even if u don't see errors upfront.

    aha, and one more thing... if u're automating deletions, add some retry logic. api calls can fail silently, so code should handle that. this might help in other tools too, not just azure.

    hope this unsticks things for u! if not, hit me up :)) good luck

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    

    https://ctrlaltdel.blog/

    0 comments No comments

  2. Nikhil Duserla 7,550 Reputation points Microsoft External Staff Moderator
    2025-06-17T16:13:59.6966667+00:00

    Hello @Mirko Krajcer ,

    Thank you for your patience while we investigated the issue. Our team has confirmed that it has now been fully resolved.

    The root cause was identified as a firmware misconfiguration in Underhill VMs, which resulted in TPM-related file corruption and VM failures. A hotfix has been applied to prevent this issue in all newly created v6 VMs. For existing affected VMs, the recommended steps are to either disable the vTPM and restart the VM or recreate the VM.

    A permanent fix was deployed on June 16, 2025, at 4:00 AM UTC. Customers have been informed and can now safely re-enable the vTPM where applicable.

    If you found this informative, please consider accepting an answer as a token of appreciation. And don't forget to give it a thumbs up πŸ‘ if it was helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.