2
votes

I have Azure WebRole and I have to change its System Locale dynamically. For that, I tried to reboot instance in WebRole Start-up task with Windows shutdown -r command and it works.

But after the reboot, I can't connect to the instance with Remote desktop. (like the load balancer doesn't work...) I guess I need to use some Azure management functions to reboot formally.

In this situation, Which way should I take to reboot itself simply?

Thanks!

2
did you try RequestRecycleJim O'Neil
@JimO'Neil I'm pretty sure RequestRecycle does not reboot the VM.user94559
Thank you! I tried RequestRecycle, but no action taken in spite of no error.ms-skr

2 Answers

2
votes

shutdown -r should work fine. I've used it quite a bit.

I couldn't find a good code snippet for you, but Wade does a reboot in his startup task here: http://www.wadewegner.com/2011/01/using-expression-encoder-4-in-a-windows-azure-worker-role/

The reboot in that example is an effect of another command he runs, but it works the same way.

0
votes

I have confirmed with Microsoft Azure Support Team that this is a bug in Windows 2008 SP2 instances. If you can upgrade to either Windows 2008 R2 (osFamily=2), or Windows 2012 (osFamily=3) instances, the issue is resolved in those OS versions.