Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
How are shutting down the host? Usually, the init process waits for all processes to exit normally. –  Khaled Jan 1 '12 at 18:33
    
shutdown -r now (tried using the regular gnome shutdown menu as well). Neither works because as soon as the script starts shutting down the guests....the host powers off. The line vmrun suspend does not seem to block. Although it does block if I manually run it in the terminal..so not sure what is wrong. –  firebird Jan 1 '12 at 18:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.