添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

My resource group is in centralUS and I created a VM in Japan East. In the resource group, I selected all the resources and deleted but few resources like Disk, NIC, NSG, VNET are not been deleted. Getting the below error messages

Error messges;

Failed to delete subnet 'pointersubnet'. Error: Subnet pointersubnet is in use by River-Dale/providers/Microsoft.Network/networkInterfaces/desktop729/ipConfigurations/ipconfig1'>desktop729/ipconfig1 and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.

Failed to delete virtual network 'pointers'. Error: Subnet pointersubnet is in use by River-Dale/providers/Microsoft.Network/networkInterfaces/desktop729/ipConfigurations/ipconfig1'>desktop729/ipconfig1 and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.

Failed to delete network interface 'desktop729'. Error: Network Interface River-Dale/providers/Microsoft.Network/networkInterfaces/desktop729'>desktop729 is used by existing resource /subscriptions/ef4b4581-7ba0-4490-94ee-f33d39fb61cb/resourceGroups/River-Dale/providers/Microsoft.Compute/virtualMachines/Desktop. In order to delete the network interface, it must be dissociated from the resource. To learn more, see aka.ms/deletenic.

I reached out to support request and they asked me to execute the cmd I executed the cmd

Remove-AzResourceGroup -Name [NAME OF RESOURCEGROUP] –Force

But I received the error as below several times

Remove-AzResourceGroup -Name River-Dale -ForceRemove-AzResourceGroup: Long running operation failed with status 'Conflict'.
StatusCode: 409
ReasonPhrase: Conflict
OperationID :

Post which I performed the below actions and then executed the cmd Remove-AzResourceGroup -Name [NAME OF RESOURCEGROUP] –Force and then it worked!!!! my resource group River-Dale got deleted.

  • Created VM with the same name & region as the deleted one
  • Associated the VNET (which I am unable to delete) to the created VM
  • After that, I executed the cmd and it deleted my resource group

    Thank you for the update @Deepak sundaram . I am glad that the issue was fixed and your shared response will help others facing similar issues.

    Regards,

    Hello @Deepak sundaram ,

    Please try the below provided steps:

    Open a web browser and navigate to https://resources.azure.com
    Log-in to the appropriate Azure account
    In the blade on the left side of the browser, expand subscriptions, then expand the desired subscription name
    In the blade on the left side of the browser, expand resource groups
    Under resource groups, expand the proper Resource Group Name
    Under the Resource Group, expand providers
    Under providers, expand Microsoft.Network
    Under Microsoft.Network, expand networkinterfaces
    Under networkinterfaces, select the NIC which you are failing to delete.
    Near the top of the content window of the browser, select the Read/Write push button
    Select the Actions(POST, DELETE) tab and click on Delete.
    Once this NIC is deleted, you can retry to delete the ResourceGroup.
    If it does not succeed and you receive an error, please share the error for further investigation.

    Also, what output do you get when you run the below cmdlet:
    Get-AzVm -Name "Desktop" -ResourceGroupName "River-Dale"

    Alternatively, you may use the Azure PowerShell/CLI commands to remove the ResourceGroup. Please refer : https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell#delete-resource-group

    Kindly let us know if you need any further assistance on this issue from our end.

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to " Accept the answer " wherever the information provided helps you, this can be beneficial to other community members.

    Thanks for the response

    Below is the error message I am getting when I tried to delete the NIC

    "error": {
    "code": "NicInUse",
    "message": "Network Interface /subscriptions/ef4b4581-7ba0-4490-94ee-f33d39fb61cb/resourceGroups/River-Dale/providers/Microsoft.Network/networkInterfaces/desktop729 is used by existing resource /subscriptions/ef4b4581-7ba0-4490-94ee-f33d39fb61cb/resourceGroups/River-Dale/providers/Microsoft.Compute/virtualMachines/Desktop. In order to delete the network interface, it must be dissociated from the resource. To learn more, see aka.ms/deletenic.",
    "details": []

    Power shell cmd: Get-AzVm -Name "Desktop" -ResourceGroupName "River-Dale"

    PS /home/deepak> Get-AzVm -Name "Desktop" -ResourceGroupName "River-Dale"
    Get-AzVM: The Resource 'Microsoft.Compute/virtualMachines/Desktop' under resource group 'River-Dale' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
    ErrorCode: ResourceNotFound
    ErrorMessage: The Resource 'Microsoft.Compute/virtualMachines/Desktop' under resource group 'River-Dale' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
    ErrorTarget:
    StatusCode: 404
    ReasonPhrase: Not Found
    OperationID : fa3c963a-9c71-46fb-9c64-1f553338c8c0

    Thank you for the update @Deepak sundaram .

    It looks like the VM is deleted but the NIC association is still in place and it may require an investigation from the backend team. Hence, if you have a support plan, I request you to file a support ticket, else please do let us know, we will try and help you get a one-time free technical support. In this case, could you send an email to azcommunity@microsoft.com referencing this thread as well as your subscription ID. Please mention "ATTN gishar" in the subject field.

    Thank you for your cooperation on this matter and look forward to your reply.

    "name": "Solution_Unit-vnet",
    "id": "/subscriptions/7890e344-be6a-46e3-b94c-70a01769770c/resourceGroups/Solution_Unit/providers/Microsoft.Network/virtualNetworks/Solution_Unit-vnet",
    "etag": "W/\"1f8a7af7-4469-453b-9d80-2801831f58ac\"",
    "type": "Microsoft.Network/virtualNetworks",
    "location": "eastus",
    "tags": {},
    "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "f51ac8d2-9a8d-4730-ab9f-bb273b85f863",
    "addressSpace": {
    "addressPrefixes": [
    "10.0.0.0/24",
    "(String)"
    "subnets": [
    "name": "default",
    "id": "/subscriptions/7890e344-be6a-46e3-b94c-70a01769770c/resourceGroups/Solution_Unit/providers/Microsoft.Network/virtualNetworks/Solution_Unit-vnet/subnets/default",
    "etag": "W/\"1f8a7af7-4469-453b-9d80-2801831f58ac\"",
    "properties": {
    "provisioningState": "Succeeded",
    "addressPrefix": "10.0.0.0/24",
    "serviceAssociationLinks": [
    "name": "default-service-association-link",
    "id": "/subscriptions/7890e344-be6a-46e3-b94c-70a01769770c/resourceGroups/Solution_Unit/providers/Microsoft.Network/virtualNetworks/Solution_Unit-vnet/subnets/default/serviceAssociationLinks/default-service-association-link",
    "etag": "W/\"1f8a7af7-4469-453b-9d80-2801831f58ac\"",
    "type": "Microsoft.Network/virtualNetworks/subnets/serviceAssociationLinks",
    "properties": {
    "provisioningState": "Succeeded",
    "linkedResourceType": "",
    "enabledForArmDeployments": false,
    "allowDelete": false,
    "locations": []
    "serviceEndpoints": [],
    "delegations": [
    "name": "Microsoft.DBforMySQL.flexibleServers",
    "id": "/subscriptions/7890e344-be6a-46e3-b94c-70a01769770c/resourceGroups/Solution_Unit/providers/Microsoft.Network/virtualNetworks/Solution_Unit-vnet/subnets/default/delegations/Microsoft.DBforMySQL.flexibleServers",
    "etag": "W/\"1f8a7af7-4469-453b-9d80-2801831f58ac\"",
    "properties": {
    "provisioningState": "Succeeded",
    "serviceName": "",
    "actions": [
    "Microsoft.Network/virtualNetworks/subnets/join/action"
    "type": "Microsoft.Network/virtualNetworks/subnets/delegations"
    "privateEndpointNetworkPolicies": "Disabled",
    "privateLinkServiceNetworkPolicies": "Enabled"
    "type": "Microsoft.Network/virtualNetworks/subnets"
    "id": "(String)",
    "properties": {
    "addressPrefix": {},
    "addressPrefixes": {},
    "networkSecurityGroup": {},
    "routeTable": {},
    "natGateway": {},
    "serviceEndpoints": {},
    "serviceEndpointPolicies": {},
    "privateEndpoints": {},
    "ipConfigurations": {},
    "ipConfigurationProfiles": {},
    "ipAllocations": {},
    "resourceNavigationLinks": {},
    "serviceAssociationLinks": {},
    "delegations": {},
    "purpose": {},
    "provisioningState": {},
    "privateEndpointNetworkPolicies": {},
    "privateLinkServiceNetworkPolicies": {},
    "applicationGatewayIpConfigurations": {}
    "name": "(String)",
    "etag": "(String)",
    "type": "(String)"
    "virtualNetworkPeerings": [
    "id": "(String)",
    "properties": {
    "allowVirtualNetworkAccess": {},
    "allowForwardedTraffic": {},
    "allowGatewayTransit": {},
    "useRemoteGateways": {},
    "remoteVirtualNetwork": {},
    "remoteAddressSpace": {},
    "remoteVirtualNetworkAddressSpace": {},
    "remoteBgpCommunities": {},
    "peeringState": {},
    "peeringSyncLevel": {},
    "provisioningState": {},
    "doNotVerifyRemoteGateways": {},
    "resourceGuid": {}
    "name": "(String)",
    "etag": "(String)",
    "type": "(String)"
    "enableDdosProtection": false,
    "dhcpOptions": {
    "dnsServers": [
    "(String)"
    "flowTimeoutInMinutes": "(Integer)",
    "enableVmProtection": "(Boolean)",
    "ddosProtectionPlan": {
    "id": "(String)"
    "bgpCommunities": {
    "virtualNetworkCommunity": "(String)",
    "regionalCommunity": "(String)"
    "ipAllocations": [
    "id": "(String)"
    "extendedLocation": {
    "name": "(String)",
    "type": "(String)"

    After trying to delete it getting the below error.

    "error": {
    "code": "InUseSubnetCannotBeDeleted",
    "message": "Subnet default is in use by /subscriptions/7890e344-be6a-46e3-b94c-70a01769770c/resourceGroups/Solution_Unit/providers/Microsoft.Network/virtualNetworks/Solution_Unit-vnet/subnets/default/serviceAssociationLinks/default-service-association-link and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.",
    "details": []

    Hello @Deepak Bhardwaj ,

    I have added the below comment to your original post:

    It looks like your subnet still has a delegation to "Microsoft.DBforMySQL.flexibleServers".
    I would request you to try and remove the subnet delegation by following the steps in the below article:
    https://learn.microsoft.com/en-us/azure/virtual-network/manage-subnet-delegation#remove-subnet-delegation-from-an-azure-service

    If that doesn't help, we may need to raise a support ticket to get the Service Association Link (SAL) deleted from the backend as this is a known issue from MySQL server.
    So if you have a support plan, I request you file a support ticket, else please do let us know, we will try and help you get a one-time free technical support.

    Regards,