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!
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.