Set-AzVirtualNetworkGateway: Long running operation failed with status 'Failed'. Additional Info:'An error occurred.'

mrmnrs 30 Reputation points
2025-08-01T13:21:26.84+00:00

Trying to deploy a virtual network gateway under Basic SKU with a Standard Public IP with zone redudancy using below:

$gwpip = New-AzPublicIpAddress -Name "ProdGateway-PIP" -ResourceGroupName Applications-Prod -Location "Central US" -AllocationMethod Static -Sku Standard -Zone 1,2,3

$vnet = Get-AzVirtualNetwork -Name network-prod -ResourceGroupName Applications-Prod

$subnet = Get-AzVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork $vnet

$gwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name prodvgwipconfig -SubnetId $subnet.Id -PublicIpAddressId $gwpip.Id

New-AzVirtualNetworkGateway -Name vNet-Gateway-Prod-PolicyBased -ResourceGroupName Applications-Prod -Location "Central US" -IpConfigurations $gwipconfig -GatewayType "Vpn" -VpnType "PolicyBased" -GatewaySku Basic

However, we are getting this error.User's image

Shows this in azure portal
User's image

Same issue when running below

Get-AzVirtualNetworkGateway -ResourceGroupName applications-prod -Name vNet-Gateway-Prod-PolicyBased | Set-AzVirtualNetworkGateway

Need help in resolving this issue

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
{count} votes

Accepted answer
  1. TP 131.6K Reputation points Volunteer Moderator
    2025-08-01T13:29:36.6333333+00:00

    Hi @mrmnrs

    UPDATE: I ran my script against centralus and it failed in similar way, please see screenshot below:

    User's image

    Text version of error:

    New-AzVirtualNetworkGateway: Long running operation failed with status 'Failed'. Additional Info:'The operation failed due to following errors: 'One or more operations failed'.'
    StatusCode: 200
    ReasonPhrase: OK
    Status: Failed
    ErrorCode: OperationFailureErrors
    ErrorMessage: The operation failed due to following errors: 'One or more operations failed'.
    
    

    There hasn't been official announcement that Basic SKU VPN Gateway supports Standard SKU Public IP, so it is possible that it hasn't fully rolled out to all regions or maybe isn't ready for production yet.

    I checked Activity Log and didn't find anything helpful in the JSON.


    Have you tried adding -Debug to your New-AzVirtualNetworkGateway command? Also, have you checked activity log entries to see if there are any more details to help with troubleshooting?

    I had success in westus3 region using below script:

    $location = "westus3"
    $resourceGroup = "basic-vnet-gateway-group"
    $vnetAddressSpace = "10.20.0.0/16"
    $gatewaySubnet = "10.20.0.0/27"
    New-AzResourceGroup -Name $resourceGroup -Location $location
    $subnetConfig = New-AzVirtualNetworkSubnetConfig -Name GatewaySubnet -AddressPrefix $gatewaySubnet
    $vngwPIP = New-AzPublicIpAddress -Name myvngw-ip -ResourceGroupName $resourceGroup -Location $location -Sku Standard -AllocationMethod Static -Zone 1,2,3
    $vnet = New-AzVirtualNetwork -Name myvngw-vnet -ResourceGroupName $resourceGroup -Location $location -AddressPrefix $vnetAddressSpace -Subnet $subnetConfig
    $subnet = Get-AzVirtualNetworkSubnetConfig -Name GatewaySubnet -VirtualNetwork $vnet
    $vngwIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name vngwipconfig -SubnetId $subnet.Id -PublicIpAddressId $vngwPIP.Id
    New-AzVirtualNetworkGateway -Name myvngw-gw -ResourceGroupName $resourceGroup -Location $location -IpConfigurations $vngwIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Basic
    
    

    Please click Accept Answer and upvote if the above was helpful.Thanks.

    -TP


0 additional answers

Sort by: Most helpful

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.