Tutorial: Move Azure VMs across regions
In this article, learn how to move Azure VMs, and related network/storage resources, to a different Azure region, using Azure Resource Mover. .
In this tutorial, you learn how to:
- Check prerequisites and requirements.
- Select the resources you want to move.
- Resolve resource dependencies.
- Prepare and move the source resource group.
- Prepare and move the other resources.
- Decide whether you want to discard or commit the move.
- Optionally remove resources in the source region after the move.
Tutorials show the quickest path for trying out a scenario, and use default options.
|Resource Mover support||Review supported regions and other common questions.|
|Subscription permissions||Check you have Owner access on the subscription containing the resources that you want to move
Why do I need Owner access? The first time you add a resource for a specific source and destination pair in an Azure subscription, Resource Mover creates a system-assigned managed identity (formerly known as Managed Service Identify (MSI)) that's trusted by the subscription. To create the identity, and to assign it the required role (Contributor or User Access administrator in the source subscription), the account you use to add resources needs Owner permissions on the subscription. Learn more about Azure roles.
|VM support||Check that the VMs you want to move are supported.
- Verify supported Windows VMs.
- Verify supported Linux VMs and kernel versions.
- Check supported compute, storage, and networking settings.
|Destination subscription||The subscription in the destination region needs enough quota to create the resources you're moving in the target region. If it doesn't have quota, request additional limits.|
|Destination region charges||Verify pricing and charges associated with the target region to which you're moving VMs. Use the pricing calculator to help you.|
- After checking that VMs meet requirements, make sure that VMs you want to move are turned on. All VMs disks that you want to be available in the destination region must be attached and initialized in the VM.
- Make sure VMs have the latest trusted root certificates, and an updated certificate revocation list (CRL). To do this:
- On Windows VMs, install the latest Windows updates.
- On Linux VMs, follow distributor guidance so that machines have the latest certificates and CRL.
- Allow outbound connectivity from VMs:
Select resources you want to move.
- All supported resource types in resource groups within the selected source region are displayed.
- Resources that have already been added for moving across regions aren't shown.
- You move resources to a target region in the same subscription as the source region. If you want to change the subscription, you can do that after the resources are moved.
In the Azure portal, search for resource mover. Then, under Services, select Azure Resource Mover.
In Overview, click Get started.
In Move resources > Source + destination, select the source subscription and region.
In Destination, select the region to which you want to move the VMs. Then click Next.
In Resources to move, click Select resources.
In Select resources, select the VM. You can only add resources supported for move. Then click Done.
In Resources to move, click Next.
In Review, check the source and destination settings.
Click Proceed, to begin adding the resources.
After the add process finishes successfully, click Adding resources for move in the notification icon.
After clicking the notification, review the resources on the Across regions page.
- Added resources are in a Prepare pending state.
- The resource group for the VMs is added automatically.
- If you want to remove an resource from a move collection, the method for doing that depends on where you are in the move process. Learn more.
If resources show a Validate dependencies message in the Issues column, click the Validate dependencies button. The validation process begins.
If dependencies are found, click Add dependencies.
In Add dependencies, leave the default Show all dependencies option.
- Show all dependencies iterates through all of the direct and indirect dependencies for a resource. For example, for a VM it shows the NIC, virtual network, network security groups (NSGs) etc.
- Show first level dependencies only shows only direct dependencies. For example, for a VM it shows the NIC, but not the virtual network.
Select the dependent resources you want to add > Add dependencies. Monitor progress in the notifications.
Validate dependencies again.
Move the source resource group
Before you can prepare and move VMs, the VM resource group must be present in the target region.
Prepare to move the source resource group
During the Prepare process, Resource Mover generates Azure Resource Manager (ARM) templates using the resource group settings. Resources inside the resource group aren't affected.
Prepare as follows:
In Across regions, select the source resource group > Prepare.
In Prepare resources, click Prepare.
After preparing the resource group, it's in the Initiate move pending state.
Move the source resource group
Initiate the move as follows:
In Across regions, select the resource group > Initiate Move
ln Move Resources, click Initiate move. The resource group moves into an Initiate move in progress state.
After initiating the move, the target resource group is created, based on the generated ARM template. The source resource group moves into a Commit move pending state.
To commit and finish the move process:
- In Across regions, select the resource group > Commit move.
- ln Move Resources, click Commit.
After committing the move, the source resource group is in a Delete source pending state.
Prepare resources to move
Now that the source resource group is moved, you can prepare to move other resources that are in the Prepare pending state.
In Across regions, verify that resources are now in a Prepare pending state, with no issues. If they're not, validate again and resolve any outstanding issues.
If you want to edit target settings before beginning the move, select the link in the Destination configuration column for the resource, and edit the settings. If you edit the target VM settings, the target VM size shouldn't be smaller than the source VM size.
Now that the source resource group is moved, you can prepare to move the other resources.
Select the resources you want to prepare.
- During the prepare process, the Azure Site Recovery Mobility agent is installed on VMs, to replicate them.
- VM data is replicated periodically to the target region. This doesn't affect the source VM.
- Resource Move generates ARM templates for the other source resources.
- After preparing resources, they're in an Initiate move pending state.
Initiate the move
With resources prepared, you can now initiate the move.
In Across regions, select resources with state Initiate move pending. Then click Initiate move.
In Move resources, click Initiate move.
Track move progress in the notifications bar.
- For VMs, replica VMs are created in the target region. The source VM is shut down, and some downtime occurs (usually minutes).
- Resource Mover recreates other resources using the ARM templates that were prepared. There's usually no downtime.
- After moving resources, they're in an Commit move pending state.
Discard or commit?
After the initial move, you can decide whether you want to commit the move, or to discard it.
- Discard: You might discard a move if you're testing, and you don't want to actually move the source resource. Discarding the move returns the resource to a state of Initiate move pending.
- Commit: Commit completes the move to the target region. After committing, a source resource will be in a state of Delete source pending, and you can decide if you want to delete it.
Discard the move
You can discard the move as follows:
- In Across regions, select resources with state Commit move pending, and click Discard move.
- In Discard move, click Discard.
- Track move progress in the notifications bar.
After discarding resources, VMs are in an Initiate move pending state.
Commit the move
If you want to complete the move process, commit the move.
In Across regions, select resources with state Commit move pending, and click Commit move.
In Commit resources, click Commit.
Track the commit progress in the notifications bar.
- After committing the move, VMs stop replicating. The source VM isn't impacted by the commit.
- Commit doesn't impact source networking resources.
- After committing the move, resources are in a Delete source pending state.
Configure settings after the move
- The Mobility service isn't uninstalled automatically from VMs. Uninstall it manually, or leave it if you plan to move the server again.
- Modify Azure role-based access control (Azure RBAC) rules after the move.
Delete source resources after commit
After the move, you can optionally delete resources in the source region.
A few resources, for example key vaults and SQL Server servers, can't be deleted from the portal, and must be deleted from the resource property page.
- In Across Regions, click the name of the source resource that you want to delete.
- Select Delete source.
Delete additional resources created for move
After the move, you can manually delete the move collection, and Site Recovery resources that were created.
- The move collection is hidden by default. To see it you need to turn on hidden resources.
- The cache storage has a lock that must be deleted, before it can be deleted.
Delete as follows:
Locate the resources in resource group
Check that all the VM and other source resources in the source region have been moved or deleted. This ensures that there are no pending resources using them.
Delete the resources:
- The move collection name is
- The cache storage account name is
- The vault name is
- The move collection name is
In this tutorial, you:
- Moved Azure VMs to another Azure region.
- Moved resources associated with VMs to another region.
Now, trying moving Azure SQL databases and elastic pools to another region.