Recently, I got the requirement to move my Azure VM from one resource group to another. In this article, I will walk you through all the steps to move VM from one Resource Group to another in Azure.
Table of Contents
How To Move VM From One Resource Group To Another In Azure
Let us discuss all the approaches individually.
Approach-1: Using Azure Portal
To move VM from one Resource Group to another in Azure, follow the below steps.
1. Log in to Azure Portal.
2. Search for Virtual Machines and click on the search result in Virtual Machines under the services as shown in the below screenshot.

3. Now, click on the specific Virtual Machine from the list.

4. Click the move link next to the Resource Group name on the Overview page, as shown in the screenshot below.

5. On the Target section, Select the new Resource Group from the drop-down, or you can click the Create new link to create a new Resource Group and then click the Next button as shown in the screenshot below.

6. On the Resources to Move screen, it will validate whether the VM is eligible for movement or not, if it is valid, it will show the validation status as succeeded, and then click on the Next button.

7. On the Review tab, select the terms and condition and then click the Move button.

Now, the Resource Group has been moved successfully to the new Resource Group, as shown in the screenshot shown below.

Approach-2: Using Azure PowerShell
We can use the Move-AzResource PowerShell command to move a new Resource Group, as mentioned below.
Move-AzResource -DestinationResourceGroupName "newresgroup" -ResourceId "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/MyNewResGrp/providers/Microsoft.Compute/virtualMachines/AzurelessonsNewVM"After executing the above command, click the Yes button for the confirmation. Now, I got the expected output as shown in the screenshot shown below.



Approach-3: Using Azure CLI
az resource move --destination-group "MyNewResGrp" --ids "/subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourceGroups/MyNewResGrp/providers/Microsoft.Compute/virtualMachines/AzurelessonsNewVM"After executing the above command, I got the expected output, as shown below, and the Azure VM has been moved successfully to the new destination Resource Group.


Video Tutorial
You may also like following the articles below.
- How To Attach Network Interface To Azure VM
- How To Swap OS Disk In Azure VM
- How to increase disk size in Azure VM

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
