VMware Cloud Community
pramodnaik
Contributor
Contributor

VM Monitoring - heartbeat

In our environment, the VM monitoring is set to VM Monitoring Only and databse heartbeating is set to Select Any of the cluster datastore.

We had an incident where a Oracle RAC server got rebooted. At the time of reboot, the vmware tools service was NOT running. We do NOT see the VM reboot by HA alert in the vcenter log.

Question is,  will vmware tools reboot a VM if the tools service is not running? Anybody has any experience with VM monitoring while its not running?

8 Replies
pratjain
VMware Employee
VMware Employee

VM Monitoring with HA requires VMware tools service to be running which is how it checks the guest heartbeats from VM Monitoring service.

As the VMware tools was service was stopped , there were no guest heartbeats from the VM causing HA to reboot the VM

Regards, PJ If you find this or any other answer useful please mark the answer as correct or helpful.
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

Fully agree with Prateek.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

0 Kudos
prangi
Enthusiast
Enthusiast

VM/App monitoring uses a heartbeat mechanism kind of similar to HA. If heartbeats, and, in this case, VMware Tools heartbeats, are not received for a specific (and configurable) amount of time, the virtual machine will be restarted. These heartbeats are monitored by the HA agent and are not sent over a network, but stay local to the host.

Ref : http://www.yellow-bricks.com/2012/06/05/vm-monitoring-only-using-vmware-tools-heartbeat/

0 Kudos
pramodnaik
Contributor
Contributor

So, if vmware tools service chashes or i stop the service, the VM should reboot? I shutdown tools service on one of my VMs and it 10 minutes and NO reboot.

If the tools service is down or has crashed or not installed, the VM monitoring would be rebooting the VMs all the time!

my understanding is, If the tools service is down or has crashed or not installed, the VM monitoring feature is diabled.

is it possbile for you to test too?

0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

Here is my input on this::

----By default VM monitoring is disabled. Hence until you do not enable VM monitoring, HA will just restart VMs only in case of host failure. HA will not be aware about whether Guest is running or not etc. If something goes wrong with VM, HA will not restart. No question of monitoring VMware tools.

----If VM monitoring is configured, admin is expected to make sure VMware tools are running fine.

-If VM monitoring is enabled but if you stopped VMware tool service, as per me, Guest should be restarted on the same host. Now how often it will restart/timeout value etc is depends on your configuration.

  - By default, vSphere HA will restart the VM if the heartbeat between the host and the VM ha snot been received within a 30 second interval * vSphere HA restarts the VM after each of the first 3 failures every hour & Default min uptime is 120 sec.  It is mean that, if vmware tools are not running or stopped >>HA will wait for 30 seconds>>will restart the VM>>first wait for 120 sec as uptime is 120 sec. >>again will wait for 30 sec>>first wait for 120 sec as uptime is 120 sec.>>will restart the VM >>first wait for 120 sec as uptime is 120 sec.>>again wait for 30 sec>>will restart the VM>>>by now VM got restarted 3 times, then HA will wait for next approx. 1 Hour & will repeat the restart pattern again if VMware tools are not ruuning. Default min uptime is 120 sec.

- You can above Vm monitoring setting by your own as follows:

Failure interval = 300 sec (Ha will wait for 5 min & if it does not get any hearbeats, will restart the VM)

Min uptime = 300 sec (after 1st restart, it will wait for 5 min & will again see heartbeast for 5 additional min, if it does not get heartbeat, it restarts that VM)

Max per-VM resets = 3  (It will restart for 3 times)

Max reset time windows = 1 hour (again will wait for around 50 min, as 10 min are over in 3 restart already)


In your case, you stopped VMware tool and even after 10 min, VM did not restart. did you configure VM monitoring Failure interval more than 10 min? Also if VM is generating IO(disk or nw) then VM will not be restarted. 


Let me know which version of vCenter and ESXI are u using (build numbers etc)




----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Sateesh_vCloud

I can see discussions are concentrated on only one part of VM Monitoring and sharing below link ...

Capture.PNG

vSphere HA VM Monitoring - Back to Basics | VMware vSphere Blog - VMware Blogs

------------------------------------------------------------------------- Follow me @ www.vmwareguruz.com Please consider marking this answer "correct" or "helpful" if you found it useful T. Sateesh VCIX-NV, VCAP 5-DCA/DCD,VCP 6-NV,VCP 5 DCV/Cloud/DT, ZCP IBM India Pvt. Ltd
0 Kudos
mjha
Hot Shot
Hot Shot

HA will reboot a VM if it doesn't received any heartbeats from a VM in a specified time interval. Its the responsibility of vmware tools to send these heartbeats to HA master(FDM). Since in your case vmware tools were stopped so this was the default behaviour of HA to reboot VM. If you specify both VM and application monitoring then HA will first try to restart your application 3 times and if it is unsuccessfull then it restarts the whole VM. But for monitoring applications you have to install VMware vCenter Hyperic Server and also install hyperic agents on those VM's where you want to monitor applications.

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly. Manish Jha | Operations Support Engineer | vCloud Air Operations vExpert 2015-17 | vExpert-NSX | vExpert-Cloud | VCAP6-DCV | VCP6-DCV | RHCE-7 Website : http://vstellar.com
0 Kudos
mjha
Hot Shot
Hot Shot

Vicky has explained in much depth about the HA behaviour in case of application and VM monitoring is enabled.

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly. Manish Jha | Operations Support Engineer | vCloud Air Operations vExpert 2015-17 | vExpert-NSX | vExpert-Cloud | VCAP6-DCV | VCP6-DCV | RHCE-7 Website : http://vstellar.com
0 Kudos