Share via

How do I move IP address to a new virtual machine

Inspired Earth 1 Reputation point
May 19, 2022, 2:59 AM

Hello,

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 should mention, I'd like to do this via the Azure Portal, if that's possible.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,070 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,436 Reputation points MVP
    May 19, 2022, 4:43 AM

    Hello @Inspired Earth

    Yes, it is possible to transfer a public static IP from the existing VM to the new VM by allocation and deallocation of NIC cards respectively.

    Dissociate a public IP address for an existing VM:

    1. Browse to, or search for the virtual machine that you want to disassociate the public IP address from and then select it.
    2. In the VM page, select Overview, select the public IP address
    3. In the public IP address page, select Overview, and then select Dissociate
    4. In Dissociate public IP address, select Yes.

    Associate a public IP address for new VM:

    1. Browse to, or search for the virtual machine that you want to add the public IP address to and then select it.
    2. Under Settings, select Networking, and then select the network interface you want to add the public IP address to:
    3. Select IP configurations and then select an IP configuration
    4. Select Enabled, then select IP address (Configure required settings). Choose an existing public IP address, which automatically closes the Choose public IP address box.

    static-VM with public IP:
    203573-image.png

    prod-VM with public IP:
    203496-image.png

    https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/configure-public-ip-vm#change-public-ip-address

    https://learn.microsoft.com/en-us/answers/questions/227064/is-it-possible-to-transfer-the-public-ip-address-f.html

    If you think your question has been answered, click "Mark as Answer" if just helped click "Vote as helpful". This can be beneficial to other community members reading this forum thread.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.