Cannot delete VM and Resource Group

TJ Walia 0 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.
8,406 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 19,591 Reputation points MVP
    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--

    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.