Redeploying a virtual machine

There will be times when you have issues trying to connect to an Azure virtual machine via RDP. Finding access to applications running on a virtual machine can also be problematic. If you encounter these types of issues, redeploying the virtual machine may help.

Redeploying a virtual machine simply moves the virtual machine to a new node within Azure and then powers it back on. Its configuration settings and associated resources are all retained. You could liken this process to using the vMotion feature in VMware when migrating a virtual machine to a different host.

One thing to keep in mind, however, is that when a virtual machine is redeployed, the temporary disk is lost, and any dynamic IP addresses associated with the virtual network interfaces are updated (and could therefore change). This is no different to when a virtual machine is topped and deallocated.

Run the following command to redeploy the myVM4 virtual machine:

Set-AzureRmVM -Redeploy -ResourceGroupName "VMLab" -Name "myVM4"

As shown in the preceding code, the Set-AzureRmVm command shuts the myVM4 virtual machine down, moves it to another node in Azure, and then turns it back on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.143.181