Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

Windows Azure Troubleshooting - Taking specific Windows Azure Instance offline

Windows Azure Troubleshooting - Taking specific Windows Azure Instance offline

Rate This
  • Comments 3

When you have lots of instances running on Windows Azure, you may need to investigate issues on a specific instance however there is not direct way, you can offline specific instance from your total instances. To investigate a specific instance your first requirement is to take that instance out of the network load-balancer so that you can enable offline troubleshooting.  Azure Service Management portal does not provide such functionality however you can use PowerShell and Windows Azure cmdlets on the Compute nodes to remove your instance away from Load Balancer. To use it, you must have Remote login enabled on your Windows Azure application.

 

Here are the steps:

  1. Remote login to your specific instance you would want to make offline
  2. Launch PowerShell as Administrator
  3. Run command - Add-PSSnapIn Microsoft.WindowsAzure.ServiceRuntime
  4. Select ‘R’ to run the untrusted code
  5. Run command - ‘Set-RoleInstanceStatus –busy’
  6. Please leave PowerShell window open to keep instance in offline mode (If you will close the PowerShell window the instance will become Active again). You will also see a message about it in PowerShell command window.
  7. Now it will take about 2-5 minutes and after that time your specific instance will be off line.

 

The PowerShell command window look like as below:

 

Now let’s check the Windows Azure Management Portal for instance status:

 

To verify that we have offline the same instance run PS command “Get-RoleInstance –Current” as below”

 

 

After I close the PowerShell Windows my specific instance will become responsive again in next 2-5 minutes as below:

 

That’s it!!

 

Leave a Comment
  • Please add 3 and 8 and type the answer here:
  • Post
  • If the instance is set to be offline, will it be still chargeable?

    Is there any way to set the instance offline with asp.net?

  • For Windows Azure Compute, you will be charged all the time once application is deployed, until you delete it.

  • Is the current Azure still support this feature. I have tried these steps but execution @ step 2 states "Cannot load windows Powershell snap-in "Microsoft.Windows.ServiceRuntime.."

    Please share your thoughts.

    Regards,

    Sumit C.

Page 1 of 1 (3 items)