Skip to content

Migrate Azure VM’s between Azure Tenants

Migrate Azure VM’s between Azure Tenants

In this post, we will look at a request from a customer to assist them with migrating Azure VM’s from one Azure Tenant to another. This request come at the back of a merger and the VM’s had complex configurations which will take longer to rebuild. The customer wanted a solution that will save them time and efforts.

As part of this VM migration process I will use the Azure Storage Explorer which can be downloaded HERE.

To get started we need to launch the Storage Explorer and Add accounts from both Tenants which has permissions in the Subscriptions under Accounts.

Select a subscription in each Tenant, where the VM is located and where you want to move it to.

During this process the VM in the source subscription should be powered Off, if not powered Off the Copy process will fail.

Once done, click on “Open Explorer” at the bottom of the page.

Shape

Description automatically generated with medium confidence

In the explorer view you will see the two Subscriptions one in each Azure Tenant.

Migrate the VM

In this step we will copy the VM disk from the one subscription to another, to do this we need to browse to the location where the VM disks are located.

  1. Expand Disks and select the resource group where the VM disks are located.

A picture containing text

Description automatically generated

  1. On the right-hand side select the VM disk.

  1. Once selected, click on “Copy” at the top of the screen.

  1. Now we need to head over to the second subscription and expand Disks and then select the Resource group where you want to past the VM Disk.

  1. Click on “Past” from the top of the screen.

Graphical user interface, application

Description automatically generated

  1. Next you will need to specify some additional information for the disk that you are moving to the new tenant.
  2. Location
  3. Availably Zone
  4. Account Type

In my scenario I don’t need to change any of the above and will keep the default as displayed. Click on “Past” to start the process.

You can monitor the copy process at the bottom of the screen under activities.

You can click on refresh on storage explorer to view the newly copied disk.

Graphical user interface, text, application, email

Description automatically generated

New step is to create a new VM from the dis that we have just copied.

Navigate to the Azure Portal > Resource Groups open the resource group where you have copied to disk to and click on the newly copied disk.

  1. Click on + Create VM

  1. Complete all the needed information for creating a new VM. I won’t go through the whole process of creating a VM.

You will notice under “Image” the disk you copied will be listed here.

Now that we have completed the VM creation lets connect to the VM using RDP.

To access the VM you will need to use the admin credentials stored on the copied disk.

Launch the downloaded RDP file or select your preferred method to connect to Azure VM’s.

Graphical user interface, application

Description automatically generated

And there you have it, successfully connected to the VM that we have moved from the one Tenant to another.

This is a quick and easy way of moving VM’s between Tenants and reduces the added complexity of setting up VPN gateways etc.

Hope those reading finds its useful.

Sharing is caring!

Published inAzureAzure VMPowerShell

Be First to Comment

Leave a Reply

Your email address will not be published.