Edit

Share via


Troubleshoot the VirtualNetworkNotInSucceededState error code

Symptoms

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:

Status=400 Code="VirtualNetworkNotInSucceededState"

Message="Set virtual network ownership failed. Subscription: <SUBSCRIPTION>; resource group: <RESOURCE GROUP>; virtual network name: <VNET NAME>. autorest/azure: Service returned an error. Status=400 Code="VirtualNetworkNotInSucceededState" Message="Virtual network /subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.Network/virtualNetworks/<VNET> is in Updating state. It needs to be in Succeeded state in order to set resource ownership.

Cause

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:

  • Another create, update, or delete operation is still running on the VNet.

  • A previous network operation failed and left the VNet in the Failed state.

  • Multiple parallel cluster or node pool deployments are trying to modify the same VNet at the same time.

Resolution

Check the current provisioning state of the VNet:

az network vnet show -g \<resource-group\> -n \<vnet-name\> \--query \"provisioningState\" -o tsv

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.

Contact us for help

If you have questions, you can ask Azure community support. You can also submit product feedback to Azure feedback community.