Assign private IP from Azure VM to new Azure VM

Uhmazing34 40 Reputation points
2024-06-05T14:28:35.95+00:00

Hello,

Recently I created a VM with Windows Server 2022 image which is not from Microsoft. Microsoft Update Manager is not compatible with this image.

Now, I want to create a new VM with the Windows Server 2022 Datacenter image from Microsoft.

However, I would like to attach the Private IP of the current VM to the new VM.

Is it possible to do this and if yes, how?

Should I create the new VM first, then delete the old VM and somehow assign the private IP to the new VM?

Thank you in advance.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,256 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 82,656 Reputation points
    2024-06-05T14:52:38.7966667+00:00

    Hi,

    Create the new VM and make sure you set it to use the same Virtual Network and subnet as the old VM.

    In the portal, navigate to the old VM -- Networking -- Network settings blade, then on right, click on network interface/ IP configuration. This will take you to network interface -- IP configurations. Next click on the IP configuration (often named "ipconfig1") to edit it.

    Set Allocation to Static and change the private IP address to something different. Click Save. Restart the VM so that the IP address change will take effect.

    Now repeat the above process with your new VM, and set the private IP address to the previous private IP.

    Please click Accept Answer and upvote if the above was helpful. If something is unclear add a comment below.

    Thanks.

    -TP

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful