I've set up Windows XP virtual machines on an Ubuntu host to perform certain automated tasks. I copy files from the Ubuntu machine over to the XP machines using vmrun, execute the files, and receive reports back. All this is done using bash.
If the files I copy and run over in the vm crash the vm and cause a BSOD for some reason, the whole automation gets stuck. Is there any way to find out the state of the Windows XP machine ?
Any help is appreciated
---------- Post updated 06-30-11 at 01:13 PM ---------- Previous update was 06-29-11 at 11:12 PM ----------
I managed to find a crude solution for this. I've introduced a timeout in the bash script like this:
bash vmrun.sh & sleep 120 ; kill $!
So, if the script doesn't finish execution in the vmware guest within 120 seconds, for whatever may be the reason [BSOD, machine hung machine rebooted etc.], I kill it.
Pinging the machine was one of the first solutions I thought of, but unfortunately when the VM goes down, ping would just hang. It would not throw any errors I could work with. The same goes for querying a PID on the VM, or querying for a file in a directory using vmrun. They would all just hang and wait for the machine to reboot without throwing errors.
It's not one software that I'm running VMWare. I'm running malware that come into my honeypot in an automated way to get the analysis reports...kind of like threatexpert.com. I can run them in wine, but I need more accurate reports.