I can't delete resource group

Pavol 1 Reputation point
2021-07-23T10:43:21.883+00:00

Hi Folks,

1 - i tried Powershell

2 - i tried 3 browsers, shutdown and restart system, delete cache, cookies and used Disk Cleanup

3 - i tried manual delete resource in https://resources.azure.com/

Problem is in VM, that doesn't exist

The VirtualMachine resource was not found
Summary
Session ID
8d5830d3b3d54c529e3ae297c5005e10
Resource ID
/subscriptions/XXXXXXXXXXXXXXXXXXXXX1-996b-SSSSSSSSSSSSSSSSSSSSSSSS/resourceGroups/proddmscogs1dewc/providers/Microsoft.Compute/virtualMachines/VM-k57j64nyu4yv647xh8uvnncu.218f280a
Extension
HubsExtension
Content
ResourceMenuBlade
Error code
404
Details
The VirtualMachine resource was not found, it may have been deleted. If this was launched from a pinned tile on the dashboard, it should be removed.Resource ID: /subscriptions/57dc6d3e-3f28-4781-996b-c34de910d781/resourceGroups/proddmscogs1dewc/providers/Microsoft.Compute/virtualMachines/VM-k57j64nyu4yv647xh8uvnncu.218f280a,Status Code: 404,Status Message: Resource group 'proddmscogs1dewc' could not be found.

Failed to delete network interface 'NIC-k57j64nyu4yv647xh8uvnncu'. Error: Network Interface NIC-k57j64nyu4yv647xh8uvnncu is used by existing resource /subscriptions/XXXXXXXXXXXXXXXXXXXXX1-996b-SSSSSSSSSSSSSSSSSSSSSSSS/resourceGroups/proddmscogs1dewc/providers/Microsoft.Compute/virtualMachines/VM-k57j64nyu4yv647xh8uvnncu.218f280a. In order to delete the network interface, it must be dissociated from the resource. To learn more, see aka.ms/deletenic.

I tried everything, that i find, but nothing solve my problem.

Could you help me, please?

Thank you so much

Best regards
Paul

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

3 answers

Sort by: Most helpful
  1. Stanislav Zhelyazkov 22,251 Reputation points MVP
    2021-07-23T11:41:20.613+00:00

    Hi,
    Try to delete any sub-resources for the main resource first. There are some resources like vaults, etc where you will need sub-resources like backup items and etc. before you can delete the main resource and thus the resource group.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. Manu Philip 17,351 Reputation points MVP
    2021-07-23T11:48:22.38+00:00

    Try to remove the NIC using the following command
    Get-AzNetworkInterface | where-object { $.VirtualMachine -eq $null } | ft name
    Get-AzNetworkInterface | where-object { $
    .VirtualMachine -eq $null } | Remove-AzNetworkInterface -Force

    First command should give the network interface name. Second command should delete the interface
    If you are able to succeed, you can delete the resource group

    0 comments No comments

  3. Pavol 1 Reputation point
    2021-08-07T07:02:55.233+00:00

    Hi Guys,

    problem was with subnet, that was assign to NIC-k57j64nyu4yv647xh8uvnncu.

    I have manually delete subnets, range of adress and then i was able to delete resource groups.

    Have a nice day.

    Paul