Migrate to a Standard SKU public IP address on Azure VPN Gateway VpnGw1

METAKOL MK 20 Reputation points
2026-06-23T10:12:38.8466667+00:00

I need to migrate the IP of my Virtual Network Gateway (Sku VpngGw1, Active-Active, P2S and S2S as well) since the action is required by June 30th, and all of the IPs are Basic, so it gives me trouble when I go in the portal Settings > Configuration > Migrate to Standard IP and try to prepare the Migration:
User's image

I tried to follow the procedure with powershell but it did not work properly and returned me this:

Invoke-AzVirtualNetworkGatewayPrepareMigration: The migration input passed in for Virtual network gateway /subscriptions/subscription-code/resourceGroups/CompanyResources/providers/Microsoft.Network/virtualNetworkGateways/MyGateway is not valid for a Gateway with active active setting and a point to site configuration

StatusCode: 400

ReasonPhrase: Bad Request

ErrorCode: InputIpResourceUrlNotValidForActiveActiveGatewayWithP2S

ErrorMessage: The migration input passed in for Virtual network gateway /subscriptions/subscription-code/resourceGroups/CompanyResources/providers/Microsoft.Network/virtualNetworkGateways/MyGateway is not valid for a Gateway with active active setting and a point to site configuration

OperationID : P11

Unfortunately I was thrown into this with no knowledge of VPNs, gateways or Azure matters, so I am begging for help since I am lost on what the next step for me will be.

Thank you in advance for the help, please do ask me if you need extra info on my end.

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.


Answer accepted by question author
Vallepu Venkateswarlu 10,595 Reputation points Microsoft External Staff Moderator
2026-06-23T11:36:33.7466667+00:00

Hi METAKOL MK,

It looks like you’re running into the “InputIpResourceUrlNotValidForActiveActiveGatewayWithP2S” error because your VPN gateway is configured in active-active mode with Point-to-Site enabled, and Azure requires three public IPs in that scenario (two for the active-active instances and a third for P2S). Since you currently only have two Basic SKU IPs attached, the migration validation fails.

Here’s how to fix it:

Create a third Standard-SKU, non-zonal public IP for your gateway:

# Replace placeholders with your values
$rg        = "CompanyResources"
$region    = "YourRegion"
$ipName    = "MyGatewayP2SIP"

$thirdIp = New-AzPublicIpAddress `
  -Name $ipName `
  -ResourceGroupName $rg `
  -Location $region `
  -AllocationMethod Static `
  -Sku Standard

Attach that new IP to your VPN Gateway:

# Get your existing gateway
$gw = Get-AzVirtualNetworkGateway `
  -Name "MyGateway" `
  -ResourceGroupName $rg

# Get the GatewaySubnet reference
$vnet = Get-AzVirtualNetwork -ResourceGroupName $rg -Name "<YourVNetName>"
$subnet = $vnet.Subnets | Where-Object Name -EQ "GatewaySubnet"

# Create a new IP configuration for P2S
$p2sConfig = New-AzVirtualNetworkGatewayIpConfig `
  -Name "vnetGatewayP2SConfig" `
  -Subnet $subnet `
  -PublicIpAddress $thirdIp

# Add it to your gateway’s configurations
$gw.IpConfigurations.Add($p2sConfig)

# Push the update
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gw

Wait for the gateway update to finish (this can take 10–15 minutes). Once it’s back in the “Succeeded” state you should see three IP slots under Configuration → Public IP Addresses in the portal.

Re-run the migration preparation – either in the portal or via PowerShell:

# Prepare migration
$migrationParams = New-AzVirtualNetworkGatewayMigrationParameter `
  -MigrationType UpgradeDeploymentToStandardIP

Invoke-AzVirtualNetworkGatewayPrepareMigration `
  -InputObject $gw `
  -MigrationParameter $migrationParams

At this point the prepare step should succeed. You can then execute and commit the migration as usual (noting the expected ~10 minutes of downtime during Execute).

Why does my Active‑Active VPN Gateway with Point‑to‑Site (P2S) require a third Public IP?

For Active‑Active VPN Gateways with P2S enabled, a third Public IP is required to support the P2S endpoint alongside the two IPs used for Active‑Active instances**, Refer the link for more details.

**Note: If you encounter any errors while creating the third Public IP address through the Azure Portal, please use the Azure CLI command below instead.

Ensure that the Public IP address is created in the same resource group as the VPN Gateway and uses the appropriate SKU and configuration required for the deployment.

az network public-ip create -g MyResourceGroup -n MyIp

References: https://learn.microsoft.com/azure/vpn-gateway/basic-public-ip-migrate-about#faq https://learn.microsoft.com/azure/vpn-gateway/basic-public-ip-migrate-howto?tabs=portal https://learn.microsoft.com/powershell/module/az.network/invoke-azvirtualnetworkgatewaypreparemigration?view=azps-16.0.0
https://learn.microsoft.com/powershell/module/az.network/new-azvirtualnetworkgatewaymigrationparameter?view=azps-16.0.0

If the above steps did not help resolve your issue, please feel free to share the details in a private message so we can proceed with further troubleshooting over a Teams call. I am happy to connect with you on Teams to investigate and resolve the issue.

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?

7 people found this answer helpful.

0 additional answers

Sort by: Oldest

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.