Azure Availability Sets vNet dependency

To guarantee high availability of a service on Azure, Availability Sets are a very popular way. But what are the requirements of this configuration for the underlying virtual network?

In most design documents you will find an image that looks similar to the following.


Two virtual machines in an Availability Set on the same subnet of a virtual network.

But what if I want to install the two virtual machines in different subnets or even different virtual networks?

Different virtual networks

This configuration is not supported!


If you try it anyway, the deployment of the ARM template is stopped after the creation of the virtual network card.


Subnet MYSUBNET referenced by resource /subscriptions/subscriptionId/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/networkInterfaces/NETWORKINTERFACE/ipConfigurations/ipconfig1 is not in the same Virtual Network /subscriptions/subscriptionId/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/virtualNetworks/MYSUBNET as the subnets of other VMs in the availability set

The error message you get is “SubnetsNotInSameVnet”.

Different subnets in the same virtual network

Unfortunately, the documentation is a bit scarce on this subject. I found semi-official information in a blog entry by Igor Pagliai from 2016.

The answer, and my tests confirm it, is: This configuration is supported and works fine.