Help with switching a vm to another existing virtual network

HOlly Boyer 26 Reputation points
2022-08-01T16:42:51.22+00:00

I have a vm that we created in Azure, with a virtual network that only has the default subnet (10.0.0.0/24). I want to change it to a subnet that we created after we created this vm that is on another vnet. How do i move this vm to the other virtual network with an already existing subnet so that i can change the private ip address to the 10.50.5.x that we created in the new vnet?

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,773 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jackson Martins 10,606 Reputation points MVP Volunteer Moderator
    2022-08-01T17:13:52.517+00:00

    Hi @HOlly Boyer
    Sorry,
    It's not possible to change VNET from VM; you can recreate it by deleting the VM but keeping the disks and creating the VM with the new Subnet using an existing disk

    226886-delete-vm.png

    Get in touch if you need more help with this issue.

    --please don't forget to "Accept the answer" if the reply is helpful--

    4 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Dale Alexander 5 Reputation points
    2023-02-14T06:34:03.9533333+00:00

    I disagree with the official answer. You can shutdown the VM...add a new network interface within the new vnet, removing the old interface and reboot. This is a possible option.

    1 person found this answer helpful.

  2. Erick 1 Reputation point
    2022-12-16T22:07:42.403+00:00

    This is still just awful. Azure puts an unnecessary gate on requiring a VM have a NIC attached. This is 100% not necessary. I should be able to detach a NIC from a VM even when that VM has no other NIC attached.


  3. Dale Alexander 5 Reputation points
    2023-02-14T06:32:04.7266667+00:00

    I don't think the answer is correct.

    If you shutdown the vm...and add a new network interface within the the new virtual network, removing the old network afterwards and restarting the VM, you can move the VM to a new network space. Maybe I'm wrong, but i've done the above without issue.


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.