Is it possible to transfer the public IP address from one VM to another?

marcus.smith 1 Reputation point
2021-01-12T04:43:33.6+00:00

The title says it all I suppose. I've been tasked with figuring out how to transfer the Public IP address from one VM to another. The reason why is because we have test VMs that we prepare on a test resource group and then roll them out to the customer. The trouble is that we use a proxy service that depends on having the same IP address. So when we transfer the VM into production, we want to be able to transfer the IP address as well. Messing around in the test environment I get that I'm supposed to disassociate the IP address from the test VM (I'll call it VM1), shut down the production VM (VM2), and then associate the IP address with the adapter from VM1. But every time I do that both of the public IPs are lost back to the pool. Both public addresses are static and in the same geographic location. Is what I'm trying to do even possible? I'm very new to Azure and could use some help.

Azure Virtual WAN
Azure Virtual WAN
An Azure virtual networking service that provides optimized and automated branch-to-branch connectivity.
187 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,877 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. suvasara-MSFT 10,001 Reputation points
    2021-01-12T08:57:05.66+00:00

    @marcus.smith , Yes, it is possible to transfer a static IP/reserved IP from one VM to another by allocation and deallocation of NIC cards respectively. Here are the screenshots,

    Test VM with static IP:

    55637-image.png

    Prod VM with static IP:

    55638-image.png

    Even on deallocating NIC from test and attaching to Prod VM doesn't alter the PIP because It is static by nature.

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.