Share via

Failed guest OS does not trigger any action

Matt Schlarb 1 Reputation point
2019-12-06T11:55:39.433+00:00

A failing guest OS (eg. kernel panic) does not trigger any action. I know from Hyper-V that you could monitor the guest OS heartbeat and define an action when heartbeat is lost. Is there any possibility in Azure to restart a frozen VM? Other cloud providers will restart the VM when it is not responsive...

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


2 answers

Sort by: Most helpful
  1. Matt Schlarb 6 Reputation points
    2020-01-10T18:31:28.643+00:00

    Ok I got it now. It was a little bit of a hassle because the metric "Hearbeat" is not available under standard VM metrics (waagent), but only in connection with Log Analytics (omsagent). Connect VM to Log Analytics Workspace where your create a monitoring rule with a condition that monitors the VM's Hearbeat signal. As action, create a PowerShell automation runbook which reboots the VM. Basically it's like @theodorbrander mentioned, only the Log Analytics part was missing.

    Was this answer helpful?

    1 person found this answer helpful.

  2. Iwan van de Wetering 1 Reputation point
    2019-12-30T15:59:03.63+00:00

    Restart-AzureRmVM -ResourceGroupName "ResourceGroup" -Name "VirtualMachine"
    From Azure CLI
    regards

    Iwan

    Was this answer helpful?


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.