How to detect unresponsive Virtual machine?

264 Views Asked by At

I have windows virtual machine running on windows host server machine. I am controlling this virtual machine from batch script using vmrun utility. I would like to stop this VM in case it gets hung or stop responding. I can shutdown the VM using vmrun stop -hard command. But how should I detect/know that VM is unresponsive or hung from batch script?

Thanks!

1

There are 1 best solutions below

0
On

You can create a thread to ping or telnet the VM machine in predefined time intervals to monitor the machine. In case if you are not getting any response for the ping or telnet then you can restart the machine.