Redeploy Linux virtual machine to new Azure node
If you face difficulties troubleshooting SSH or application access to a Linux virtual machine (VM) in Azure, redeploying the VM may help. When you redeploy a VM, it moves the VM to a new node within the Azure infrastructure and then powers it back on. All your configuration options and associated resources are retained. This article shows you how to redeploy a VM using Azure CLI or the Azure portal.
After you redeploy a VM, all the data that you saved on the temporary disk and Ephemeral disk is lost. The dynamic IP addresses associated with virtual network interface are updated.
Use the Azure CLI
Install the latest Azure CLI and log in to your Azure account using az login.
Redeploy your VM with az vm redeploy. The following example redeploys the VM named myVM in the resource group named myResourceGroup:
az vm redeploy --resource-group myResourceGroup --name myVM
Use the Azure classic CLI
Classic VMs will be retired on March 1, 2023.
If you use IaaS resources from ASM, please complete your migration by March 1, 2023. We encourage you to make the switch sooner to take advantage of the many feature enhancements in Azure Resource Manager.
For more information, see Migrate your IaaS resources to Azure Resource Manager by March 1, 2023.
Install the latest Azure classic CLI and log in to your Azure account. Make sure that you are in Resource Manager mode (
azure config mode arm).
The following example redeploys the VM named myVM in the resource group named myResourceGroup:
azure vm redeploy --resource-group myResourceGroup --vm-name myVM
Use the Azure portal
- Go to the Azure portal, select the VM you wish to redeploy.
- In the Help section, select Redeploy + reapply, and then select Redeploy to migrate it to a new Azure host.
If you are having issues connecting to your VM, you can find specific help on troubleshooting SSH connections or detailed SSH troubleshooting steps. If you cannot access an application running on your VM, you can also read application troubleshooting issues.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure community support.