I am using ESXi 6.5 (free licence). Occasionally, one of my virtual servers (ubuntu 18.04) running on the esxi host freezes. Symptoms: the server is no longer accessible via http(s) or ssh and doesn't respond to ping. It is also not accesible via the console. The vmware tools status goes from 'Yes' to 'Installed but not running'). The vm remains 'powered on'. The esxi host and the other vms running on it all remain fully functional. There are no obvious resource issues. I can manually restart the vm via the esxi web interface or remote-restart the failed virtual machine via the vSphere Mobile app.
Obviously I need to investigate the reason why this one vm periodically fails, but that is a separate question, and not what this post is about.
My question is this: is there a watchdog function I can enable to restart the linux virtual machine automatically? Failing an inbuilt watchdog function (I can't find any via the web interface), is there a way of achieving this by connecting to the esxi host ssh service and restarting the vm with a scripted cli command? (I can use ping for monitoring)
Thanks, Jon