VMware Cloud Community
scoutt42
Enthusiast
Enthusiast

Alarm on OS Crash

I'm trying to setup an alarm to email when a OS has crashed. Why is it that vCenter sees the Guest resetting and send an alarm but when it crashes it doesn't, even though it lists it in the events of that VM that it crashed. Why can't VM Error events send an email?

0 Kudos
13 Replies
scott28tt
VMware Employee
VMware Employee

Pretty sure you used to be able to set an alarm for when there was no heartbeat from VMware Tools, and that I tested it with a tool that made Windows blue screen...


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
scoutt42
Enthusiast
Enthusiast

Thanks, I think I ran across that. But won't that trigger when a server restarts too?

0 Kudos
scott28tt
VMware Employee
VMware Employee

How else would vSphere know that the guest OS has crashed, given the breadth of guest OSes it supports?

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
scoutt42
Enthusiast
Enthusiast

I get that, but why can't I set an alarm from a VM error or off an Event Type ID? I just don't want 100's of emails if a VM restarts or gets shut down for maintenance.

0 Kudos
scoutt42
Enthusiast
Enthusiast

So, this Alarm on the Tools heartbeat is unreliable. I have it alarming when an OS doesn't even crash, or when the OS gets a high memory. And when vSphere detects an OS crash, the heartbeat didn't miss a beat.

Back to my first question, why can't we alarm on vSphere.error when it sees the crash? all the info is there, just throw the alarm

0 Kudos
scott28tt
VMware Employee
VMware Employee

Back to my previous point, how do you think ESXi/vSphere/vCenter actually knows that a guest OS has crashed given the number of guest OSes it supports?

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
scoutt42
Enthusiast
Enthusiast

Because it tells me it crashed.

 

05/06/2021, 1:25:51 PM

on

: Guest operating system has crashed.

 

And that is way different than the heartbeat. It doesn't give that message with a server that experiences high memory usage. 

0 Kudos
scott28tt
VMware Employee
VMware Employee

And where do you see that exactly?

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
scoutt42
Enthusiast
Enthusiast

Under the monitor events tab.

0 Kudos
BrianChristian
Contributor
Contributor

I would also like to create an alarm for event vim.event.VmGuestOSCrashedEvent

0 Kudos
ranob12
Contributor
Contributor

Did you manage it?

0 Kudos
scoutt42
Enthusiast
Enthusiast

This is what I ended up with, Still flakey. Although it hasn't fired off in awhile 🙂

Name: VMCrash
Description
Should detect when a VM OS has crashed.
Targets
All virtual machines in datacenter Cluster_Name
Alarm Rules
IF VM Heartbeat is equal to No Heartbeat
THEN trigger the alarm as critical
and send emails
0 Kudos
ranob12
Contributor
Contributor

Hi,

I've added a second condition that checks if VM ist powered on.

 


@scoutt42 wrote:

This is what I ended up with, Still flakey. Although it hasn't fired off in awhile 🙂

Name: VMCrash
Description
Should detect when a VM OS has crashed.
 
Targets
All virtual machines in datacenter Cluster_Name
 
Alarm Rules
IF VM Heartbeat is equal to No Heartbeat
THEN trigger the alarm as critical
and send emails

Seems to me the same. Sadly didn't find any better solution.
William Lam is writing about VEBA but I wasn't able to deploy this appliance.

 

 

0 Kudos