Why cant I delete a Linux VM, showing error code: undefined?

Nathan Reinbott 0 Reputation points
2025-05-08T02:03:26.3233333+00:00

I am trying to delete two VMs.
One windows, one Linux.
They have both been stopped but give the above error.
I have the correct permisions I have tried several time restarted browser etc.
Trying to delete fromt the Azure Web UI.

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

Accepted answer
  1. Suwarna S Kale 2,361 Reputation points
    2025-05-08T02:36:47.52+00:00

    Hello Nathan Reinbott,

    Thank you for posting your question in the Microsoft Q&A forum. 

    If you’re unable to delete stopped VMs in Azure despite having proper permissions, the issue may stem from lingering dependencies or resource locks. First, verify that no attached disks, network interfaces, or public IPs are preventing deletion—these must be disassociated manually if retained. Next, check Azure Resource Locks in the VM’s resource group, as read-only or delete locks can block removal. If the issue persists, try deleting the VMs via Azure CLI (az vm delete) or PowerShell (Remove-AzVM) to bypass UI glitches. Additionally, ensure no backup policies or Azure Backup vaults are retaining the VMs. If all else fails, a temporary role assignment escalation (e.g., Contributor) or support ticket may resolve hidden permission conflicts. 

    If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue. Your contribution to the Microsoft Q&A community is highly appreciated. 


0 additional answers

Sort by: Most helpful

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.