Lesson 5 of 5 Azure Virtual Machines

Moving VMs Between Resource Groups, Subscriptions and Regions

This lesson explains the different methods for moving a VM depending on its destination.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how VMs are moved to another resource group or subscription.
  • Explain how VMs are moved to another region with Azure Resource Mover.
  • Identify what changes after a VM is moved.

Moving to another resource group or subscription

Within the same Microsoft Entra tenant, a VM is moved with the Move command on its resource group or resource page (Move to another resource group or Move to another subscription), az resource move or Move-AzResource. The VM's dependent resources, such as managed disks, NICs, public IPs and the availability set, are usually moved with it, and moving a virtual network requires moving all resources that depend on it. The portal validates the move first.

The VM keeps running, but its resource ID changes, so role assignments on the VM, scripts, alerts and backup references must be updated. For a subscription move, the target must have the resource providers registered and enough quota. VMs protected by Azure Backup need special steps (stop protection while retaining data), and some configurations, such as VMs with Marketplace plans in certain cases, have restrictions.

True or false

Moving within a tenant

Exam skills 3.2.3

Check what changes when a VM moves to another resource group or subscription.

Log in to try this activity Interactive activities are free with an account.

Moving to another region

A move operation never changes a resource's region. Moving a VM to another region means recreating it there. Azure Resource Mover is the main tool: it collects the VM and its dependencies (VNet, NSG, public IP, load balancer), then runs the stages shown below, using Azure Site Recovery replication behind the scenes for the VM's disks.

  1. Add resources

    Select the VM and the target region; Resource Mover adds dependencies to validate.

  2. Prepare

    Prepare the source resources (for VMs, replication starts) and the target resource group.

  3. Initiate move

    Create the resources in the target region; the source VM is stopped for VMs.

  4. Commit

    Commit the move, or discard it to roll back.

  5. Delete source

    Delete the source resources once the target is verified.

Alternatives are replicating with Azure Site Recovery and failing over, restoring from an Azure Backup recovery point in the target region (cross-region restore), or redeploying from a template and copying data. Resource Mover can also move a VM into an availability zone in the same region.

The following diagram matches each kind of VM move to its method.

The method for each VM move. Moving within a subscription uses Move to another resource group, with the VM's disks and NIC; moving to another subscription in the tenant uses Move to another subscription after registering providers and checking quota; and changing region uses Azure Resource Mover, because the VM must be recreated.
The scenario is illustrative.
Put in order

A Resource Mover move

Exam skills 3.2.3

Arrange the stages of moving a VM to another region with Azure Resource Mover.

Log in to try this activity Interactive activities are free with an account.
Worked example

Three kinds of move

An administrator must move VM1 from RG-Test to RG-Prod in the same subscription, move VM2 to a subscription in the same tenant used by another department, and move VM3 from West Europe to Sweden Central. Which method should be used for each?

Move VM1 and its disks and NIC with Move to another resource group. Move VM2 with Move to another subscription after registering the required providers and checking quota in the target. Move VM3 with Azure Resource Mover, because a region change requires recreating the VM. In all cases, update role assignments and references that use the old resource IDs.

Check yourself

Can a VM be moved to a subscription in a different Microsoft Entra tenant with the Move operation?

Show answer

No. Moves between subscriptions require both to be in the same tenant.

Exam Tips

Remember for the exam

  • Resource group and subscription moves keep the VM running but change its resource ID.
  • Move dependent resources, such as disks and NICs, with the VM.
  • Region moves recreate the VM: Azure Resource Mover or Site Recovery.
  • Moves between subscriptions require the same tenant.