The virtual network already has a gateway of this type or the existing gateway in the virtual network does not support coexistence.

saadat 0 Reputation points
2026-08-11T17:05:41.5433333+00:00

I am trying to create the Virtual network gateway for my S2S VPN confiugration, but due to the error i am unable to create one, as the previous gateway associated with the Virtual network was deleted, still it is showing the error. I have verified through powershell as well, there is no VNG associated, can anyone provide support against it or have faced this issue earlier

User's image

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

1 answer

Sort by: Most helpful
  1. AI answer

    2026-08-11T17:06:03.4833333+00:00

    This error usually indicates one of these conditions:

    1. A gateway of the same type still exists or is stuck in the virtual network state.
    2. The virtual network is configured for coexistence constraints that are not currently met.
    3. The gateway subnet sizing does not support the gateway combination being created.

    For this scenario, check these items in order:

    1. Verify the gateway subnet exists and is valid. In the portal, the Gateway subnet address range field is empty in the screenshot, and Azure requires a GatewaySubnet to create a VPN gateway. If the virtual network does not already contain a subnet named GatewaySubnet, create it first, then return to the VPN gateway creation page.
    2. If this virtual network previously had another gateway and coexistence is involved, check the GatewaySubnet size. For coexisting ExpressRoute and Site-to-Site VPN gateways, if the gateway subnet is /28 or /29, the existing gateway must be deleted and the gateway subnet must be recreated as /27 or larger before creating the new gateway.
    3. If the virtual network previously had only one gateway and another gateway type is being added, coexistence is supported only when the gateway subnet is /27 or larger. If it is smaller, delete the old gateway, recreate GatewaySubnet with /27 or shorter prefix such as /26 or /25, and then create the gateways again.
    4. If the previous VPN gateway was PolicyBased, it cannot be reused for this scenario. Site-to-site add/remove guidance requires the virtual network gateway to be RouteBased. If the old gateway was PolicyBased, it must be deleted and recreated as RouteBased.
    5. If the deleted gateway is still effectively blocking the VNet, confirm there is no gateway resource left in a failed state. A failed virtual network gateway can block related VNet operations until it returns to Succeeded state.
    6. When recreating the VPN gateway, ensure the required settings are valid:
      • Gateway type = VPN
      • Generation = Generation2
      • A valid GatewaySubnet is present
      • Public IP settings are configured during creation

    Important: deleting and recreating gateways or the GatewaySubnet causes downtime for cross-premises connectivity.

    If the VNet had an ExpressRoute or another gateway previously, the most likely fix is to recreate GatewaySubnet with /27 or larger and then create the VPN gateway again.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer 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.