Randall R Schulz skrev:
On Sunday 11 March 2007 12:14, Anders Norrbring wrote:
...

I don't think it's a long time, after all, it has to shut down 17 VMs
before exiting.. ;)  I'm certain it can be solved somehow, I just
don't see it ATM.. I'll keep looking at it.

It's easy enough to write a script that does not return until no instances of a given executable are running, especially if the executable is a unique one, which VMware's executive is ("vmware-vmx", at least as of version 5.5 under a Linux host OS). A simple while loop using pidof is enough:

  while pidof vmware-vmx >/dev/null 2>&1; do
    echo vmware-vmx still running
    sleep 2
  done


The next part, getting the shutdown process to wait might be a little trickier. I recommend studying the manual pages for init and inittab. I think in essence adding a wait-style action (i.e., one with "wait" in its third field) for run level 0 that invokes the wait-for-VMware-to-exit script should suffice.


Good luck. Let us know what you come up with. I occasionally shut down without remembering to stop my VMware process ('cause I tend to keep the window minimized and often forget that's running).


Randall Schulz

I don't see how that would make any real difference.. The /etc/init.d/vmware script does NOT exit until all vmware-vmx processes are stopped. The problem as I see it is that the master process (init) gets sick of waiting for the script to exit, it thinks its stuck somewhere and simply kill it and continues to shut down.. Or it may not even kill it, it just goes on to kill the server.

--

Anders Norrbring
Norrbring Consulting

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to