4.1.2.5. Move VMs Between Resource Groups, Subscriptions, and Regions
4.1.2.5. Move VMs Between Resource Groups, Subscriptions, and Regions
💡 First Principle: A resource group or subscription is a label on a resource; a region is where the bytes physically live. Changing the label is a metadata operation that Resource Manager can do in place, but changing the region means building a copy somewhere else and switching to it. That is why Azure uses two different tools for what sounds like one task.
Scenario: After a reorganization, the finance team's VMs must move from rg-shared into rg-finance, and then into the finance department's own subscription in the same Microsoft Entra tenant. Separately, a VM deployed in East US by mistake must end up in North Europe for data residency. You need to know which tool does which move, what must travel together, and what will break afterward.
What It Is: Resource Manager move changes the resource group or subscription a resource belongs to; it doesn't change the resource's region. Azure Resource Mover moves VMs and their related resources across regions.
Moving to Another Resource Group or Subscription
| Rule | What it means for a VM |
|---|---|
| Same tenant | For a cross-subscription move, both subscriptions must be in the same Microsoft Entra tenant. |
| Dependents move together | Across subscriptions, the VM and its dependent resources (managed disks, NICs, public IPs, and so on) must sit in the same resource group and be moved in the same operation. A VM in an existing VNet moves to a new subscription only if the VNet and all its dependent resources move too. If a dependency is missing, the move fails with MissingMoveDependentResources. |
| Both groups locked | The source and target resource groups are locked for the move (up to four hours). Existing resources keep running, so the VM has no downtime, but you can't create, delete, or update resources in either group, for example to resize the VM. |
| Resource ID changes | The resource group and/or subscription segment of the ID changes, so update scripts, templates, and dashboards that reference the old ID. |
| Role assignments don't move | A role assignment on the moved resource is orphaned and must be re-created. Tags, role assignments, and policies on the old resource group don't follow the resources either. |
| Permissions | Microsoft.Resources/subscriptions/resourceGroups/moveResources/action on the source group and Microsoft.Resources/subscriptions/resourceGroups/write on the destination group. |
| Destination readiness | The destination subscription must be registered for the resource providers involved and have enough quota. A read-only lock on the source, destination, or subscription blocks the move. |
You can test a move without performing it by calling the validateMoveResources operation (the portal runs validation for you before every move). You also can't move a resource group itself to another subscription, only the resources inside it.
What You Can't Move Without Extra Work (VM move limitations)
- Marketplace plan VMs: VMs created from Marketplace resources with plans attached can't be moved across subscriptions. The workaround is to redeploy: accept the plan's terms in the new subscription and re-create the VM from the OS disk.
- Azure Disk Encryption (Key Vault integrated): The VM can move to another resource group when it's deallocated, but to move it to another subscription you must disable encryption first.
- Azure Backup: Stop backup (keeping the data) and delete the VM's restore point collection (
AzureBackup_<VM name>_..., usually inAzureBackupRG_<location>_1), then move the VM and reconfigure backup. If soft delete is on, either disable it or wait 14 days after deleting the restore points. - Not supported: VMs in an availability set can't be moved individually; low-priority VMs and low-priority scale sets can't be moved; scale sets with a Standard SKU load balancer or Standard SKU public IP can't be moved; VMs using scheduled patching can't be moved across resource groups or subscriptions.
Moving to Another Region with Azure Resource Mover
Resource Mover handles VMs and their disks (including encrypted VMs), NICs, availability sets, VNets, public IPs, NSGs, and internal and public load balancers. The workflow is a series of states:
- Add resources to a move collection for a source and destination region (the VM's resource group is added automatically) and resolve dependencies with Add dependencies.
- Prepare. The Site Recovery Mobility agent is installed on the VMs and their data starts replicating to the target region, with no effect on the source VM; templates are generated for the other resources.
- Initiate move. Replica VMs are created in the target region. The source VM is shut down, so expect some downtime (usually minutes).
- Commit to finish, or Discard to roll back a test move. Commit stops replication but doesn't touch the source VM or its networking.
- Delete source resources when you're satisfied. Nothing is deleted automatically.
Afterward, uninstall the Mobility service if you don't need it, re-create Azure RBAC assignments, and plan for new public IP addresses, because public IPs aren't retained across regions. Your account needs Owner on the subscription the first time you add resources, because Resource Mover creates a system-assigned managed identity and assigns it a role.
Practical Implementation: Move a VM and Its Dependencies with Azure CLI and PowerShell
# Collect the VM and every dependent resource ID, then move them in ONE operation
vm=$(az vm show -g rg-shared -n vm-fin01 --query id -o tsv)
nic=$(az network nic show -g rg-shared -n vm-fin01-nic --query id -o tsv)
osdisk=$(az disk show -g rg-shared -n vm-fin01-osdisk --query id -o tsv)
pip=$(az network public-ip show -g rg-shared -n vm-fin01-pip --query id -o tsv)
# Same subscription, new resource group
az resource move --destination-group rg-finance --ids $vm $nic $osdisk $pip
# New subscription (same tenant): add the destination subscription ID
az resource move --destination-group rg-finance \
--destination-subscription-id <finance-subscription-id> --ids $vm $nic $osdisk $pip
$ids = (Get-AzResource -ResourceGroupName rg-shared |
Where-Object Name -like 'vm-fin01*').ResourceId
Move-AzResource -DestinationResourceGroupName rg-finance -ResourceId $ids
# Across subscriptions, add -DestinationSubscriptionId <finance-subscription-id>
Visual: Which Move Tool
⚠️ Common Pitfall: Moving the VM alone across subscriptions while its disk, NIC, or public IP sits in another resource group. Consolidate the dependents into one resource group first, move them together, then redistribute them in the target subscription if you need to.
⚠️ Exam Trap: Resource Manager move never changes a region. If the requirement says "move to West Europe", the answer is Azure Resource Mover (or a redeploy), not az resource move or Move-AzResource. Conversely, a resource-group move doesn't stop the VM: the groups are locked against changes, but the VM keeps running.
Key Trade-Offs:
- Move vs. Redeploy: A Resource Manager move keeps the VM's disks and configuration without downtime, but carries the move restrictions; redeploying from templates or disks avoids them but is a rebuild.
- Lock Duration vs. Batch Size: Moving many resources in one operation keeps dependencies intact but holds both resource groups locked longer; Resource Manager rejects requests of more than 800 resources.
- Rehearsal vs. Downtime: Discard lets you test a region move before committing, but initiating the move still shuts down the source VM, so even a rehearsal needs a maintenance window.
Reflection Question: For a VM created from a Marketplace plan, protected by Azure Backup, and encrypted with Azure Disk Encryption, which steps must happen before it can move to another subscription, and which tool would you use if it also had to change regions?