33 C
Dubai
Tuesday, September 21, 2021
spot_img

Azure Resource Mover to move resources to another region

We had to move some Azure Resource groups from UAE North to Central US to improve the latency of the sites without using any additional Azure technologies. let’s see how we can achieve that using the Azure Resource Mover.

Please note all the resource types are not supported at the moment. Currently, it supports

  • Azure VMs and associated disks
  • NICs
  • Availability sets
  • Azure virtual networks
  • Public IP addresses
  • Network security groups (NSGs)
  • Internal and public load balancers
  • Azure SQL databases and elastic pools

It uses Azure site recovery to create a replica of the Virtual machines disks. For all other resources it generates ARM templates and it will use them to recreate it automatically in the new the datacenter and it will allow us to remove the source data after migration which is optional.

Open Azure Resource Mover in Azure Portal

Click on Add resources choose the Source and Destination Region. In my case, it’s UAE North to Central US.

You have now chosen the resources you wish to move to the destination region.

Note that the corresponding Resource Groups will be automatically added, and there won’t be any impact on other resources within the Resource group.
The Azure Resource Mover will help you navigate through the following steps in the upcoming screens.

Validate dependencies: Validate whether resources you want to move have dependencies on other resources in the source region. After validation, add the dependent resources to the move.

Prepare: The preparation process depends on the resource being moved, but might typically include exporting an ARM template or initiating data replication. This doesn’t have any impact on the availability of the resources in the source region.

Initiate move: Bring up the resources in the destination region. The process depends on the resource you’re moving, but might typically include recreating the resource in the target region or bringing up a replica copy.
Finish up the move

Discard (optional): After verifying the resources in the destination region, you can optionally roll back the move.

Commit: If everything’s running as expected in the destination region, you can commit the move. This step may result in downtime depending on the source resource type.

Delete source: Finally, after everything’s up and running in the new region, delete the resources in the source region. This is important to avoid double billing, and to ensure a stable infrastructure.

Metadata information related to this move will be stored in Resource group – ‘ResourceMoverRG-uaenorth-centralus-eus2’ which will be created in the region – East US 2. I am granting permission to create a System Assigned Managed Identity on my behalf to access the resources in the subscription.

Choose the resources you wish to move from that source region and click on next

You can see an error that says to move the resource group first in order to move the resources within them.

Let’s prepare, Initiate and commit the resource group name, but you will note delete source as we haven’t moved the resources within the resource group yet.

  • Prepare
  • Initiate Move
  • Commit Move

Error details
Error Id CommitRequiredForDependencies
Error message
The following dependent resources need to be committed: /subscriptions/cb186f94-cb63-4dd7-0000-72add3b4ab86/resourceGroups/az-pr-centralus-web-rg.
Possible Causes: Certain dependencies should be ‘Committed’ before proceeding with this step.
Recommended Action: Commit the dependent resources and proceed. If already committed, please wait for the update to take effect. If the issue persists, contact support.

You can see some unsupported resources like SSH Key. if you move the virtual machine the disk associated with them will get copied automatically and you can safely ignore that disk is showing as unsupported and being removed.

Now, let’s prepare to initiate and commit the resource group creation to Central US. Preparing resource group creation which creates it with a new name. where the ARM template can be customized if you wish to change the name.

Initiate Move of the resource group

Now, let’s commit.

Now commit the resource group creation.

Now the resource group is created in Central US with a new name. let’s get started with the other resources.

Prepare the other resources.

Virtual Machine Prep takes a bit longer as the associated disks are being replicated in the backend.

You can see the replicated disk in the destination resource group.

Now let’s initiate the move as the preparation is completed.  (Requires Down Time for Source Resources – Initiate Move take the Source Virtual Machine to stopped state )

Initiate move

Once you feel the target resources are up with a new public IP. Change the required public DNS.  Now you can commit a move.

We had issues moving the moving when resources having the resource lock is enabled. we removed the resource lock and re did the whole process Virtual machine booted just fine. but still not sure resource lock was causing the issue or ASR. ( Just a guess – if you encounter such issue)

Now the Virtual Machine came up online and recreated the SSH keys in my case and deleted the source resource group and its resources.

Move Completed from UAE North to Central US seamlessly.

Satheshwaran Manoharanhttps://www.azure365pro.com
Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Azure365pro.com. Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here