Check if your Azure VM is about to reboot

Check if your Azure VM is about to reboot

Q. How can I check if my Azure VM is about to reboot?

A. The Azure fabric has introduce the ability to query the metadata of the VM from inside the VM which will show if any maintenance operation is about to happen in the next 5 minutes. Within the Azure VM navigate to URL:

http://169.254.169.254/metadata/v1/maintenance

If the returned data is {} then no maintenance activities are happening within the next 5 minutes. If your VM is about to reboot then an EventID and EventCreationTime will be returned that notifies you of the impending reboot.

More data can be found at https://azure.microsoft.com/en-us/blog/what-just-happened-to-my-vm-in-vm-metadata-service/.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish