Home > Software design >  Is there a way to move (reassign) a public IP to a new Virtual Machine on Azure?
Is there a way to move (reassign) a public IP to a new Virtual Machine on Azure?

Time:05-23

I have an existing VM, with an application on it. I need to upgrade the server OS, which will require setting up a new VM with the newer OS on it.

Once I have the new VM set up, I would like move the public IP address from the existing VM to the new VM.

I've been unable to find information on how to do this.

Is it possible?

My intention, is to keep the same IP address, rather than having to change DNS records, etc. The old VM will be decommissioned during this migration process.

I'd like to do this using the Portal if at all possible (I don't currently have Powershell installed anywhere, etc.).

Thanks.

CodePudding user response:

Yes, you can move a static IP/reserved IP from one VM to another by allocating and deallocating NIC cards. Here are the screenshots:

Test VM with static IP: enter image description here

Prod VM with static IP:

enter image description here

Even removing a NIC from test and attaching it to a production VM does not change the Public IP because it is static by nature.

Refer to:

  • Related