Azure

How to move Azure VM to other subscription?

How to move Azure VM to other subscription?

Scenario:

A team member is working on a dedicated virtual machine and has set-up some of required software to perform the various activities. The setup is really critical and would difficult for any new team member. This team member has resigned and moving out of the organization. A new team member would replace his/her position but the challenge is to re-setup the working virtual machine.

As I stated above that the set-up is really difficult and annoying task. What should be the best and easiest approach?

Well, there is a straight forward solution of such critical issue i.e. move the virtual machine from Subscription A to Subscription B. Here Subscription A is assigned to the employee who is leaving the organization and Subscription B is assigned to the new employee. That way, the readymade virtual machine will be transferred to the new employee with creating a new one.

Pre-requisite:

There must be at least 2 different subscription. One is the source subscription and other one the target subscription.

Steps:

  1. Login to Azure Portal
  2. Reach out to the virtual machine which needs to be transferred
  3. You’ll find the “Move” option in the action bar

 

It is very important to know before movement – “New resource IDs are created as part of the move. After the VM has been moved, you will need to update your tools and scripts to use the new resource IDs.”

The movement can also be performed using Powershell command:

Move-AzResource -DestinationSubscriptionId "<myDestinationSubscriptionID>" ` -DestinationResourceGroupName "<myDestinationResourceGroup>" `-ResourceId <myResourceId,myResourceId,myResourceId>

Abhishek Maitrey

With over 15 years of IT experience in various renowned MNCs like Wipro Technologies, Cognizant Technology Solutions (CTS), etc Abhishek is one of the active members of C-Sharpcorner events, NCR Xamarin Developers group and Agile Meetups. He has worn the hats of different roles during his corporate tenure and currently works as Applications Development/Support manager in an MNC in Noida, still, he calls himself as a developer by passion. Along with technical knowledge of Microsoft Azure DevOps, ASP.Net Core, C#, ASP.Net, Angular, etc. He is also well versed in project management verticals like ITIL processes and Agile/Scrum methodology. A happy husband and father of two lovely kids. He likes the association of professionals, leadership, public speaking. Reach out him by [email protected] or follow on twitter: @abhimaitrey