Whenever an RDP connection is not working or you have trouble accessing your application on an Azure VM, Azure Redeploy can help solve the issue on Windows-based VMs. This article outlines what the Redeploy tool is and how and when to use it.

Travis Roberts

Travis Roberts is a Cloud Infrastructure Architect at a Minnesota based consulting firm. Travis has 20 years of IT experience in the legal, pharmaceutical and marketing industries, and has worked with IT hardware manufacturers and managed service providers. Travis has held numerous technical certifications over the span of his career from Microsoft, VMware, Citrix and Cisco.

Virtual Machines in Azure are bound to an Azure host server at the time of creation.  Unlike most popular on-premises hypervisors, there is no live migration tool that does a non-disruptive VM move to a new host.  The VM will only move to a new host if the host it resides on fails or if the VM is moved with the Redeploy tool. This article outlines what the Redeploy tool is, as well as how and when to use it.

The Microsoft documentation states that Redeploy moves the VM to a new host.  More specifically, redeploy starts by capturing the state of the VM.  Next, the VM is shut down and removed from the host.  The virtual disks are left in place.  The VM is recreated on a different host with the same settings and virtual disks.  Once finished, the VM is restarted.

Troubleshooting with Redeploy ^

Redeploy is used to troubleshoot issues with VMs, in particular it may resolve issues with remote connectivity such as RDP.  Problems that Redeploy may address are not limited to connectivity issues, however.  Although not common, underlying host issues could impact a VM in multiple ways. For example, I have seen an underlying host issue cause random reboots on a virtual appliance that Redeploy resolved.

From the perspective of the VM, nothing has changed after it has been Redeployed.  It has the same settings as before and the same OS and data disks.  At the virtual machine level, the redeploy is nothing more than a reboot.  This is important because if the problem is with the OS, a redeploy won’t fix the issue.  The problem will move to the new host with the VM.

At what point is Redeploy appropriate to use?  If you can’t access the VM, Redeploy is a good first step.  Odd issues that are not identifiable with normal troubleshooting steps could be a symptom of an underlying host issue.  Redeploy the VM early in the troubleshooting process to rule out host issues as the problem.

Redeploy a VM in the Portal ^

The Redeploy process is straight forward.  The most important thing to keep in mind is that Redeploy will shut down the VM and it will be unavailable until the VM is reprovisioned on the new host.

Start by verifying the VM is in a running state.

Verify the VM is running

Verify the VM is running

Find and click on the Redeploy option next to an icon of a hammer under Support + Troubleshooting.

Azure Portal Redeploy option

Azure Portal Redeploy option

This will take you to the Redeploy page.  The only option is the redeploy button at the bottom of the screen.  Clicking Redeploy will take the VM offline and start the Redeploy process.

Start Redeploy in the Portal

Start Redeploy in the Portal

It takes just a few minutes to complete.  Once finished, the VM is running on a new host.  The Activity Logs will show that the Redeploy ran and if it was successful.

Redploy activity logs

Redploy activity logs

Redeploy a VM by Command Line ^

PowerShell is an option for those who prefer command line, or need to add Redeploy to an automation task.  Redeploy is part of the Set-AzVM or Set-AzureRMVM command, depending on the Azure PowerShell module in use.  The input required for the command includes the VM name and the Resource Group:

The complete command and output are illustrated below.  Notice the Status indicates success as well as the start and end time.  Any errors would also display in the output should a problem occur.

Redeploy a VM with PowerShell

Redeploy a VM with PowerShell

Summary ^

For many organizations, the journey to the cloud starts with migrating servers from on-premises data centers to Azure.  Understanding the tools available to manage servers in azure will help resolve issues faster if they should occur.  Redeploy is one tool in the Azure toolbox to help address issues and get servers up and running faster in the event of an underlying host issue.

Are you an IT pro? Apply for membership!

Your question was not answered? Ask in the forum!

3+

Users who have LIKED this post:

  • avatar
  • avatar
Share
0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2019

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account