Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you move VMs with managed disks between resource groups

Tags:

azure

Created a VM recently and managed disks are now an option, so after looking at all the benefits I decided we should use these for VMs going forward. Now I want to tidy up the resource groups I'm managing. I can move all the old VMs between resource groups, but the new VM can't be moved. The validation fails saying that the resource group of the managed disk cannot be changed. Is this correct?

like image 319
Cormac O'Brien Avatar asked Mar 10 '17 14:03

Cormac O'Brien


People also ask

Can we move VM from one resource group to another?

You can move a VM and its associated resources to another resource group by using the Azure portal. Go to the Azure portal to manage the resource group containing the VM to move. Search for and select Resource groups.

Can a virtual machine be part of multiple resource groups?

Yes, you can use the Vnet in the different resource group. But the limitation is your Vnet and VM must be in the same region.


1 Answers

By now, we're moving VMs with managed disk following this procedure:

  1. Stop VM
  2. Create managed disks snapshots
  3. Create new managed disks from snapshots in the new Resource Group
  4. Deploy new vm using using managed disks in the new Resource Group

I'm sure moving managed disk is comming soon (I hope)

like image 50
Antonio J. Aguilar Bravo Avatar answered Nov 15 '22 07:11

Antonio J. Aguilar Bravo