Share via

Cannot delete VM and Resource Group

TJ Walia 20 Reputation points
2025-02-22T05:10:49.5566667+00:00

I am getting an error while trying to delete my VM resource Group and resources.

Have been trying for the past 3 days.

Error: Cannot proceed with operation because resource /subscriptions/a331bec7-55e6-888888888888/resourceGroups/MigrationVM_group/providers/Microsoft.Network/publicIPAddresses/MigrationVM-ip used by resource /subscriptions/a331bec7-55e6-888888888888/resourceGroups/MigrationVM_group/providers/Microsoft.Network/networkInterfaces/migrationvm69 is not in Succeeded state. Resource is in Failed state and the last operation that updated/is updating the resource is DeletePublicIpAddressOperation.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

Answer accepted by question author

Manu Philip 20,651 Reputation points MVP Volunteer Moderator
2025-02-22T09:36:12.92+00:00

Hi TJ Walia

The issue that you are facing arises, when resource removal is not followed correctly as recommended Microsoft.

Here, the error message says that one of the Public IP addresses is still in use there for the network interface is not able to delete. You can try the following Force deletion way from PowerShell

Remove-AzPublicIpAddress -Name MigrationVM-ip-ResourceGroupNameMigrationVM_group -Force

If it is able to remove the public address successfully with the above command, resource deletion will work smoothly!

Hope this helps.


--please don't forget to upvote and Accept as answer if the reply is helpful--

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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