Unable to delete a failed ASM to ARM virtual network

Paul-3476 0 Reputation points
2026-06-28T16:36:18.0166667+00:00

Unable to delete a failed ASM to ARM virtual network. I have moved my VM's to a new virtual network but am unable to delete the old classic virtual network, which has nothing attached to it, Azure thinks it has succeeded migration but when I try to delete it it says :

"Failed to delete virtual network 'XXXX'. Error: Operation is not allowed on resource /subscriptions/AAAA/resourceGroups/BBBB-Migrated/providers/Microsoft.Network/virtualNetworks/CCCCvnet1, because it's being migrated from Microsoft.ClassicNetwork (v1 APIs) to Microsoft.Network (v2 API)."

It's not causing me an operational issue but could lead to confusion in future as despite what it says it hasn't fully migrated and doesnt work and I'd like to clean things up.

AI's description of situation is :

"We have an Azure VNet that reports ProvisioningState = Succeeded, has no attached NICs, and no Azure Classic resources reference it. However, Azure refuses both create and delete operations, reporting that the VNet is still being migrated from Microsoft.ClassicNetwork to Microsoft.Network."

Azure Migrate
Azure Migrate

A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 25,120 Reputation points MVP Volunteer Moderator
    2026-06-29T14:58:59.29+00:00

    Paul-3476 hi & thx for sharing urs issue here at Q&A portal,

    the ASM-to-ARM migration flag is stuck on the VNet. If ARM says the VNet is still being migrated from Microsoft.ClassicNetwork to Microsoft.Network, normal delete won’t work even if provisioning shows Succeeded and no NICs/resources are attached. Check first that there are no locks or hidden dependencies

    az lock list -g <rg>

    az network nic list --query "[?ipConfigurations[?subnet.id contains(@, 'CCCCvnet1')]].id"

    az resource list -g <rg> -o table

    But if nothing is attached and delete still returns the migration error, this needs backend cleanup by Microsoft. Don’t keep trying random create/delete operations; the migration state is stuck outside what u can clear from ARM.

    Open Azure Networking support w/ the VNet resource ID, old classic VNet name if known, resource group, region, failed delete timestamp, and the exact error. Ask them to clear the stale ClassicNetwork -> Network migration state so the VNet can be deleted.

    rgds,

    Alex

    &

    If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal
    

    and at my blog https://ctrlaltdel.blog/

     

    Was this answer helpful?

    0 comments No comments

  2. Ravi Varma Mudduluru 12,540 Reputation points Microsoft External Staff Moderator
    2026-06-29T01:51:24.29+00:00

    Hi @Paul-3476 ,

    Thank you for reaching out to Microsoft Q&A.

    Even though the virtual network shows ProvisioningState = Succeeded and has no attached resources, the migration lock is still partially active on the backend. That's why both delete and create operations are being blocked with the "being migrated from Microsoft.ClassicNetwork" error.

    Recommended Solution

    Use the classic Azure PowerShell module to abort the stuck migration:

    1. Install the classic module (if not already installed):
         Install-Module -Name Azure -AllowClobber
      
    2. Connect using your Azure account:
         Add-AzureAccount
      
    3. Abort the migration:
         Move-AzureVirtualNetwork -VirtualNetworkName "CCCCvnet1" -Abort
      
      1. Once the abort completes successfully, you should be able to delete the virtual network normally from the Azure portal (or via PowerShell/CLI).

    This approach resolves the issue in most cases where the migration appears successful but remains locked.

    If the steps above do not fix the issue, please take a look at your private messages. I’ve requested few more details so we can continue investigating.

    Reference:

    Can't delete a virtual network or subnet in Azure

    If the answer is helpful, please click "Accept Answer" it. If you have extra questions about this answer, please click "Comment".

    Was this answer helpful?

    0 comments No comments

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.