title | description | services | documentationcenter | author | manager | tags | ms.custom | ms.service | ms.collection | ms.topic | ms.tgt_pltfrm | ms.workload | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Redeploy Windows virtual machines in Azure |
How to redeploy Windows virtual machines in Azure to mitigate RDP connection issues. |
virtual-machines |
virtual-machines |
genlin |
dcscontentpm |
azure-resource-manager,top-support-issue |
sap:Cannot connect to my VM, devx-track-azurepowershell, devx-track-azurecli |
virtual-machines |
windows |
troubleshooting |
vm-windows |
infrastructure |
11/03/2021 |
genli |
[!INCLUDE Feedback]
If you have been facing difficulties troubleshooting Remote Desktop (RDP) connection or application access to Windows-based Azure virtual machine (VM), redeploying the VM may help. When you redeploy a VM, Azure will shut down the VM, move the VM to a new node within the Azure infrastructure, and then power it back on, retaining all your configuration options and associated resources. This article shows you how to redeploy a VM using Azure PowerShell or the Azure portal.
If the VM is stuck in a failed state, try reapplying your VM's state before redeploying.
Note
A virtual machine can encounter issues caused by user configurations or host infrastructure. If you have exhausted all other options under the troubleshooting menu, we suggest redeploying your virtual machine to a new host.
Warning
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.
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
Make sure you have the latest Azure PowerShell 1.x installed on your machine. For more information, see How to install and configure Azure PowerShell.
The following example deploys the VM named myVM
in the resource group named myResourceGroup
:
Set-AzVM -Redeploy -ResourceGroupName "myResourceGroup" -Name "myVM"
[!INCLUDE virtual-machines-common-redeploy-to-new-node]
If you are having issues connecting to your VM, you can find specific help on troubleshooting RDP connections or detailed RDP troubleshooting steps. If you cannot access an application running on your VM, you can also read application troubleshooting issues.
[!INCLUDE Azure Help Support]