My VPN gateway is stuck in the Migrating state and I cannot remove it.

Anonymous
2026-01-20T15:55:35.27+00:00

I'm trying to remove my VPN gateway but it is stuck in the migrating state.

Azure VPN Gateway
Azure VPN Gateway

An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.

0 comments No comments

Answer accepted by question author
Vallepu Venkateswarlu 10,590 Reputation points Microsoft External Staff Moderator
2026-01-20T16:01:21.2666667+00:00

Hi @JJ Streicher-Bremer,

Welcome to Microsoft Q&A Platform.

If the VPN Gateway remains stuck in the Migrating state for an extended period, you can abort the migration using the Azure CLI command provided below.

az network vnet-gateway migration abort --gateway-name "gateway-Name" --resource-group "rg-name" --no-wait

Once the abort operation completes successfully.

Please use below command to delete the Gateway.

az network vpn-gateway connection delete -g MyRG -n MyConnection --gateway-name MyGateway

For Migration review the following migration considerations before attempting the migration again. First, validate that your resource is eligible for migration:

  • Before initiating VPN Gateway migration, ensure that the GatewaySubnet has at least three available IP addresses within the current address prefix.
  • If your GatewaySubnet is /28 or smaller, the migration tool may fail. In this case, add multiple prefixes for subnet to expand the subnet to /27 or larger before retrying the migration.
  • If ExpressRoute and VPN Gateway coexist, it is recommended to first migrate Basic IP resources to Standard IP on the VPN Gateway before proceeding with migration.

Ref: az network vpn-gateway connection delete

About migrating a Basic SKU public IP address to Standard SKU

Please210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

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.