Move a VM with Azure Resource Mover

I use Azure VMs quite often for trying things out, especially when tech reviewing articles for my day job as editor of Simple Talk. Frequently, a special purpose VM will live for just a couple of days or even a few hours because they are easy enough to throw away when I’m done. I appreciate the ability to create a VM in a Resource Groups (RG) so that all the resources associated with the VM like storage and the IP address can be destroyed with one command.

It’s also easy to move a VM to another RG or switch a RG including the VM to another subscription.

Another task I may want to perform is to move a VM to another region. I found this set of steps that involves using Azure Recovery Services Vault that seems a bit complex. Fortunately, I recently heard about a new, much easier way to move VMs and other resources called Azure Resource Mover (in preview). It was announced today.

To try this out, I created a new VM called vmtestmove in the Central US Region.  I then searched for Azure Resource Mover.

The first step was to specify from the regions for the move.

In the next step, I specified that I wanted to move my VM.

The next screen explained the process.

It took a couple of minutes to add the resource. Note that the VM must be running to do the move. Once it was done, I clicked the notification and landed on the Across Regions screen. The next step is to validate dependencies. Obviously, I’m missing several resources that the VM needs.

Some dependencies were found, so I clicked Add Dependencies.

It found a network interface and the Resource Group. I selected all and clicked Add dependencies.

I then realized it would have been easier if I had just selected all the resources in the RG instead of choosing only the VM. Eventually, I refreshed the screen and saw that all the resources were in place. Notice that a new RG will be created in the target region.

At this point, I clicked the Destination Configuration of the VM and made some changes. I gave the VM a new name and upgraded to a bigger VM.

The new RG must be prepared, initiated, and moved before the other resources. I just performed the steps as I was prompted in the status and refreshed after each one.

Once I refreshed and saw that the RG was in Delete source pending status, I was ready to move the VM.  I selected everything else and clicked Prepare.

It takes a few minutes for each step, and I had to click Refresh after each one and make sure that the status changed for each item. I was notified that the step completed before it was completed for the VM. Once all the steps were complete, I saw the ‘Delete source’ pending status on each item.

At this point, I could see that the new VM was running in the East US region.

Now, I had to decide if I wanted to keep both VMs or to delete the one running in the Central region. I decided to delete it, and just manually deleted the RG to remove it and the other resources the way I would normally delete a VM. There are a couple of other items created to facilitate the move that must be deleted. Be sure to check the documentation for more information.

You also must remove the resources from the Azure Resource Mover page. This is especially important if you want to move any additional VMs or other objects in the future. Just select all the resources and click Remove.

I also decided to try moving an Azure SQL Database using this new service. Check the documentation if you need more information. The main thing that I found is that you must have a SQL server resource in place in the target region before proceeding. Otherwise, it was as straightforward as moving the VM.

The process for moving the VM to another region was simple, and I was glad that it found all the required resources for me. This functionality will be quite useful for many organizations who rely on Azure VMs for their production and downstream environments.

 

About Kathi Kellenberger

I am the editor of the online journal Simple Talk. I love talking about SQL Server to anyone who will listen, just ask my seven year old granddaughter. I love to write and teach. I am so humbled and honored to say I am a Data Platform MVP, a volunteer with LaunchCode and co-leader of PASS Women in Technology Virtual Group.
This entry was posted in Cloud computing. Bookmark the permalink.

1 Response to Move a VM with Azure Resource Mover

  1. Pingback: Moving a Virtual Machine with the Azure Resource Mover – Curated SQL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s