Can an Azure VM be moved between virtual networks

John Savill

August 3, 2017

1 Min Read
Microsoft Azure Logo

Q. Can I move an Azure VM between virtual networks?

A. Historically it was not possible to move a vmNIC between virtual networks, only virtual subnets however it is possible to add and remove NICs post creation and so a possible solution to this approach would seem to be as follows:

  1. Turn off NLA requirement in the Remote tab of System control panel applet (sysdm.cpl) before changing the virtual network

  2. Deallocate the VM

  3. Add a new NIC to the VM on the desired virtual network and virtual subnet

  4. Change the primary NIC to the newly added NIC

  5. Remove the old NIC from the VM

  6. Start the VM

For the exact commands required see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/multiple-nics. Unfortunately this still does not work! The Azure fabric will not allow a VM to be connected to different virtual networks at the same time, even when the VM is deprovisioned and so this approach will not work and you always have to have at least one NIC attached to a VM so you cannot remove the VM first.

This means the only way to move a VM between virtual networks is to delete it, keep its storage and create a new VM connected to the correct virtual network using the existing disks.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like