VMWare has a script that runs on shutdown:
if [ -x "$BINDIR"/vmrun ] ; then for i in `pidof vmware-vmx` ; do "$BINDIR"/vmrun suspend `ps -p $i -f | \ sed -ne '/vmware/s/.* \(\/.*\.vmx\)/\1/p'` soft 2> /home/vmlog done fi
The problem is that when I run it manually (sh vmware stop), it suspends all guests. However when I shutdown the host, the script executes but before it can finish suspending all guests, the host turns off.
How can I make it wait till the suspend is completed? (this is on debian squeeze).