Unable to delete Virtual Machine & Associated Resources

Randy Toler 0 Reputation points
2024-02-12T15:44:46.09+00:00

I've been trying to delete this VM for 3 / 4 days now. Each time I receive the following error message: Error details tts-vm-dev-migrate-cus-datadisk-1: Disk tts-vm-dev-migrate-cus-datadisk-1 is attached to VM /subscriptions/e50032d2-fb91-4661-9999-0c325f390855/resourceGroups/tts-rg-dev-machines-cus/providers/Microsoft.Compute/virtualMachines/tts-vm-dev-migrate-cus. (Code: OperationNotAllowed) tts-vm-dev-migrate-cus-datadisk-2: Disk tts-vm-dev-migrate-cus-datadisk-2 is attached to VM /subscriptions/e50032d2-fb91-4661-9999-0c325f390855/resourceGroups/tts-rg-dev-machines-cus/providers/Microsoft.Compute/virtualMachines/tts-vm-dev-migrate-cus. (Code: OperationNotAllowed) tts-vm-dev-migrate-cus-nic01: Network Interface /subscriptions/e50032d2-fb91-4661-9999-0c325f390855/resourceGroups/tts-rg-dev-machines-cus/providers/Microsoft.Network/networkInterfaces/tts-vm-dev-migrate-cus-nic01 is used by existing resource /subscriptions/e50032d2-fb91-4661-9999-0c325f390855/resourceGroups/tts-rg-dev-machines-cus/providers/Microsoft.Compute/virtualMachines/tts-vm-dev-migrate-cus. In order to delete the network interface, it must be dissociated from the resource. To learn more, see aka.ms/deletenic. (Code: NicInUse) tts-vm-dev-migrate-cus-original-osdisk-delete: Disk tts-vm-dev-migrate-cus-original-osdisk-delete is attached to VM /subscriptions/e50032d2-fb91-4661-9999-0c325f390855/resourceGroups/tts-rg-dev-machines-cus/providers/Microsoft.Compute/virtualMachines/tts-vm-dev-migrate-cus. (Code: OperationNotAllowed) tts-vm-dev-migrate-cus: An internal execution error occurred. Please retry later. (Code: InternalExecutionError)

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,168 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
574 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Randy Toler 0 Reputation points
    2024-02-27T22:11:48.7733333+00:00

    In the end, I had to open a case with MSFT. They to perform an ARM Sync from backend, released the lease, and remove the disked 'marked for deletion'. I was then able to remove the VM and the remaining resources / Resource Group.


  2. KarishmaTiwari-MSFT 18,527 Reputation points Microsoft Employee
    2024-02-29T17:02:09.1166667+00:00

    @Randy Toler I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: Unable to delete Azure Virtual Machine & Associated Resources

    Solution: Customer shared - "In the end, I had to open a case with MSFT. They performed an ARM Sync from backend, released the lease, and removed the disked 'marked for deletion'. I was then able to remove the VM and the remaining resources / Resource Group."


    If your issue remains unresolved or have further questions, please let us know in the comments how we can assist. We are here to help you and strive to make your experience better and greatly value your feedback.

    User's image

    0 comments No comments

  3. Admin Dragos Anton 0 Reputation points
    2024-03-11T15:04:00.12+00:00

    Simple solution:

    In the deallocated state of the VM, go to size menu and change the size of the machine temporary to a different size that allows more than 2 NIC`s like D8ls_V5

    After that you will be able to delete it from Azure portal

    0 comments No comments