Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

Move your Azure resources in CLI instead of using the portal

  • April 21, 2022
  • 4 min read
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.


A great feature in Azure is the possibility to move resources to:

– Another resource group

– Another subscription

– Another region

The list of resources that you can move is available here: Move operation support by resource type – Azure Resource Manager | Microsoft Docs

In this example, I will move a MySQL Database Server from a subscription A to a subscription B. By the portal, it is easy, but it can take a long time to do the validation and the move:

Move resources

After waiting each time the long validation period, I find another way to do not wait so many time: with CLI.

The first command to execute to validate that we can do the move is az resource invoke-action. Let’s do this for our resource:

If the answer is empty, you are good to go to move the resource. Otherwise, you will have the error, for example, if you use Private Endpoint, you will not be able to move your resource:Private Endpoint

Private Endpoint 2

In my case I can move the resource. I will use the az resource move command to do the job:

After few minutes, we can see that the resource moved to the other subscription:The resource moved to the other subscription

The resource moved to the other subscription 2

Resource group

Like this it is very simple to automate the move of resources to another resource group/subscription/region. The only limitation is that not all resources can move at this time.

Hey! Found Florent’s article helpful? Looking to deploy a new, easy-to-manage, and cost-effective hyperconverged infrastructure?
Alex Bykovskyi
Alex Bykovskyi StarWind Virtual HCI Appliance Product Manager
Well, we can help you with this one! Building a new hyperconverged environment is a breeze with StarWind Virtual HCI Appliance (VHCA). It’s a complete hyperconverged infrastructure solution that combines hypervisor (vSphere, Hyper-V, Proxmox, or our custom version of KVM), software-defined storage (StarWind VSAN), and streamlined management tools. Interested in diving deeper into VHCA’s capabilities and features? Book your StarWind Virtual HCI Appliance demo today!