How to add additional IP to an azure VM which is r

2019-08-08 10:49发布

问题:

I have a running VM. I need to add one additional IP for distributing traffic. VM is in Prod, I am looking for adding IP which takes least time. As per my knowledge I can't use azure portal for the same. How this could be done using PS. Is it achievable with zero downtime ?

回答1:

There is no direct PS command for doing it. One possible solution is to export the vm config file. Create a new node/attribute for the second ip in the xml file. Look for its patttern for multi nic vm, create the same pattern and then set the value of subnet and ip.

Next, import the config file and create a new vm out of it. [edited]