Here I am using the Resource Manager and AzureRM.Network Powershell to add new NIC on existing VMs. Use it for add additional nic to azure vm whether you are still maintains old AzureRM module.
Please note that multiple NICs are only supported by few VM plans (VM size). So before proceeding with adding a new NIC, we have to make sure our current VM plan allow multiple NIC.
VM size details can get it from Microsoft website itself. At this moment my current VM size supports multiple NIC. So I have followed below steps.
I am going to Add NIC named nic2-me to the VM named VM2
Define VM name and Resource group name to a variable.
Get the VM and save it in a variable.
View the Network interfaces Available in the VM2
Set one of the NICs to Primary, I have set first NIC as primary
Update the VM configuration.Please note that this will restart the VM.
Please see below screenshot and see how the command outputs looks like in Powershell.
This concludes the steps that we need to follow while adding additional NIC to an Azure VM. As I said before Refer only if you still maintain old AzureRM module. leave your thoughts at the available comment box.