How to create multiple IP addresses to a single NIC in Azure VMSS

309 views Asked by At

I created an azure-vm-scale-set through the portal and attached a single NIC. How can I add IP Configurations(secondery IP address)to that NIC?

1

There are 1 answers

0
Charles Xu On

You can add the IP configuration via the Azure CLI command to the NIC:

az vmss update --resource-group groupName --name vmssName --add virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations '{"name": "config-2", "primary": false, "privateIpAddressVersion": "IPv4", "publicIpAddressConfiguration": null, "subnet": {"id": "resourceId", "resourceGroup": "groupName"}}'

Then upgrade all the instances, this will apply the new configuration to the instances. Then you need to manually update the network setting inside the instance following the steps Add IP addresses to a VM operating system.