Create an Azure VM with multiple NICs


Multiple reasons needs a virtual machine (VM) to have multiple NICs, while this isn’t possible in the Azure Portal, we can create VMs with mutiple NICs using PS.

First is a script that creates your infrastructure with a virtual networking, containing multiple subnets, because most likely the reason for having multiple NICs is to have a backend and a frontend for a service, or perhaps a backend and a middle-end. But I do wonder if having multiple NICs in the same subnet, would be able to create a higher bandwith using a loadbalancer between the two NICs.

When we a virtual network with multiple subnets, we can create VMs with multiple NICs in separate Subnet. Keep in mind only some sizes of VMs support multiple NICs, see a list here, where the last column states number of NICs and Network bandwith. For now there is also a restriction to one public ip for each VM, and it is only allowed associated with the primary NIC, so be sure to set the internetfacing subnet on the NIC that becomes your primary NIC.

My next post will talk about using JSON templates rather then PowerShell, because JSON is becoming the most universal language for coding infrastructure.

Leave a Comment