Critical Azure VM in Availability Set experienced ungraceful reboot during platform maintenance; how to set up Scheduled Events alerts?

Cooper Turner 20 Reputation points
2026-09-21T23:13:19.8133333+00:00

Despite being deployed within an Availability Set, a critical Azure VM instance underwent an unexpected hard reboot during a scheduled platform maintenance window. To prevent uncoordinated downtime in the future, how do we properly capture and alert on Azure Scheduled Events (or Metadata Service maintenance notifications) to trigger automated failovers or notifications prior to maintenance execution?

Windows for business | Windows Server | Storage high availability | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Daphne Huynh (WICLOUD CORPORATION) 1,570 Reputation points Microsoft External Staff Moderator
    2026-09-22T08:25:58.3666667+00:00

    Welcome to Microsoft Q&A!

    Thank you for providing the detailed information and context regarding your environment.

    While Availability Sets are designed to reduce the risk of simultaneous maintenance across multiple instances, individual VMs can still be affected by platform maintenance activities such as host reboots, redeployments, or live migrations. To help applications prepare for these events and minimize service impact, this is a recommendation using Azure Scheduled Events, which are exposed through the Azure Instance Metadata Service (IMDS).

    Scheduled Events provide advance notifications for upcoming maintenance actions, including:

    • Reboot
    • Redeploy
    • Freeze
    • Live Migration

    These notifications can be used to trigger proactive actions such as:

    • Gracefully failing over to a secondary node
    • Draining active connections
    • Temporarily removing the VM from a load balancer pool
    • Saving application state or checkpoints
    • Sending operational alerts to support teams

    For VMs that are part of an Availability Set, Scheduled Events are delivered to all VMs within the set. You can identify the affected VM by reviewing the Resources field included in the event payload.

    A common implementation approach is:

    1. Poll the IMDS Scheduled Events endpoint from within the VM.
    2. Detect events with a status of Scheduled.
    3. Trigger automation such as Azure Automation runbooks, Logic Apps, scripts, or cluster failover processes.
    4. Forward event data to Azure Monitor or Log Analytics for centralized monitoring.
    5. Configure Azure Monitor alerts and Action Groups to send notifications through email, SMS, webhooks, Microsoft Teams, or other supported channels.

    In addition to monitoring Scheduled Events from within the VM, it is also recommended to configure Azure Service Health Planned Maintenance alerts. Service Health provides advance notification of planned maintenance at the subscription level and can notify administrators before the maintenance window begins.

    Please note that not all platform maintenance operations require a VM reboot. Some activities are performed through live migration and may have minimal impact. However, Scheduled Events remain the recommended mechanism for receiving VM-level maintenance notifications and initiating automated mitigation actions before maintenance occurs.

    References: Maintenance and updates - Azure Virtual Machines | Microsoft Learn

    Scheduled Events for Windows VMs in Azure - Azure Virtual Machines | Microsoft Learn

    Planned maintenance overview - Azure Service Health | Microsoft Learn

    Use the portal for maintenance notifications - Azure Virtual Machines | Microsoft Learn

    I hope this helps clarify how to proactively monitor and respond to Azure platform maintenance events.

    If you find it useful, please click Accept Answer.

    Thank you for choosing Microsoft Q&A.

    Was this answer helpful?

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.