|
| 1 | +--- |
| 2 | +title: Troubleshoot the VirtualNetworkNotInSucceededState error code |
| 3 | +description: Learn how to troubleshoot the VirtualNetworkNotInSucceededState error when you create, upgrade, or scale an Azure Kubernetes Service (AKS) cluster or node pool. |
| 4 | +ms.date: 08/07/2025 |
| 5 | +editor: v-jsitser |
| 6 | +ms.reviewer: v-liuamson |
| 7 | +ms.service: azure-kubernetes-service |
| 8 | +#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the VirtualNetworkNotInSucceededState error so that I can successfully create, upgrade, or scale an Azure Kubernetes Service (AKS) cluster or node pool. |
| 9 | +ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
| 10 | +--- |
| 11 | +# Troubleshoot the VirtualNetworkNotInSucceededState error code |
| 12 | + |
| 13 | +## Symptoms |
| 14 | + |
| 15 | +When you create, upgrade, or scale an Azure Kubernetes Service (AKS) cluster or node pool, the deployment fails and returns an error message that resembles the following message: |
| 16 | + |
| 17 | +*Status=400 Code=\"VirtualNetworkNotInSucceededState\"* |
| 18 | + |
| 19 | +*Message=\"Set virtual network ownership failed. Subscription: \<SUBSCRIPTION\>; resource group: \<RESOURCE GROUP\>; virtual network name: \<VNET NAME\>. autorest/azure: Service returned an error. |
| 20 | +Status=400 Code=\"VirtualNetworkNotInSucceededState\" Message=\"Virtual network /subscriptions/\<SUBSCRIPTION\>/resourceGroups/\<RESOURCE |
| 21 | +GROUP\>/providers/Microsoft.Network/virtualNetworks/\<VNET\> is in Updating state. It needs to be in Succeeded state in order to set resource ownership.* |
| 22 | + |
| 23 | +## Cause |
| 24 | + |
| 25 | +AKS can set ownership on a virtual network only if the `provisioningState` of the VNet is **Succeeded**. The request fails if the VNet is in the **Updating**, **Deleting**, or **Failed** state. Common causes for this condition include: |
| 26 | + |
| 27 | +- Another create, update, or delete operation is still running on the VNet. |
| 28 | + |
| 29 | +- A previous network operation failed and left the VNet in the **Failed** state. |
| 30 | + |
| 31 | +- Multiple parallel cluster or node pool deployments are trying to modify the same VNet at the same time. |
| 32 | + |
| 33 | +## Resolution |
| 34 | + |
| 35 | +Check the current provisioning state of the VNet: |
| 36 | + |
| 37 | +```dotnetcli |
| 38 | +az network vnet show -g \<resource-group\> -n \<vnet-name\> \--query \"provisioningState\" -o tsv |
| 39 | +``` |
| 40 | + |
| 41 | +If the command returns **Succeeded**, the VNet is fully set up and ready for use, and you can retry your AKS operation. If it returns any other value, the VNet might be in a failed or pending state that requires manual intervention. For more guidance, follow the troubleshooting steps in [Troubleshoot Azure Microsoft.Network failed provisioning state](/azure/networking/troubleshoot-failed-state). |
| 42 | + |
| 43 | +[!INCLUDE [azure-help-support](../../../includes/azure-help-support.md)] |
0 commit comments