Redeploy an Azure VM to a Different VM Host using Azure CLI

In this short blog post, I will show you how to redeploy or move an Azure Virtual Machine to a different host using Azure CLI.

My recommended method of using Azure CLI is using Azure Cloud Shell, which is always up to date with the latest Azure CLI version.

Redeploying a VM

Sometimes Virtual Machines on the Azure platform can perform a bit slow if the underlying host is overloaded.

Therefore Azure gives us the option to move the VM using redeployment of the VM.

To redeploy an Azure VM, using Azure CLI or Azure Cloud Shell and use the following command.

Note: Change the resource group and VM name.

az vm redeploy --resource-group containers --name deploywin2019c

Just remember that the VM will be restarted, so make sure you do it after hours or let all stockholders know before.