app-emulation/vmware-server-2.0.2.203138-r1 fail to suspend manually started VMs on OS shutdown This due a dependency of the vmware supplied init script. I fixed it by updating the /etc/init.d/vmware script to call the vmware supplied script in the expected way: start() { test -x /etc/vmware/init.d/vmware || \ eend 1 "vmware init script not found. Aborting" || return 1 /etc/vmware/init.d/rc3.d/S90vmware start | vmware_prettify start return $? } stop() { /etc/vmware/init.d/rc6.d/K08vmware stop | vmware_prettify stop return $? }
The fix is included in the description. Also some of the vmware supplied scripts appear to expect root to in the vmware Administrator role. I added root to the wmware Administrator role before updating the init script and so might also be a requirement for correct shutdown of manually started VMs.
Just for completeness, here is the diff. *** vmware-server-2.rc 2009-05-09 22:55:17.000000000 +0100 --- /etc/init.d/vmware 2010-12-11 22:20:36.323070485 +0000 *************** *** 59,69 **** test -x /etc/vmware/init.d/vmware || \ eend 1 "vmware init script not found. Aborting" || return 1 ! /etc/vmware/init.d/vmware start | vmware_prettify start return $? } stop() { ! /etc/vmware/init.d/vmware stop | vmware_prettify stop return $? } --- 59,69 ---- test -x /etc/vmware/init.d/vmware || \ eend 1 "vmware init script not found. Aborting" || return 1 ! /etc/vmware/init.d/rc3.d/S90vmware start | vmware_prettify start return $? } stop() { ! /etc/vmware/init.d/rc6.d/K08vmware stop | vmware_prettify stop return $? }
Thanks. I won't fix. 1.) there are no such folders rc3.d/ or files S* and K* 2.) In systems with rcX.d S* and K* files a just a symlinks. 3) Well, "manual" means manual starts and stop.
You are incorrect. On my Gentoo system with vmware-server2 installed: blue ~ # ls -l /etc/vmware/init.d/rc3.d/ total 0 lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 K08vmware -> /etc/vmware/init.d/vmware lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 S90vmware -> /etc/vmware/init.d/vmware blue ~ # ls -l /etc/vmware/init.d/rc6.d/ total 0 lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 K08vmware -> /etc/vmware/init.d/vmware The script /etc/vmware/init.d/vmware check $0 to see how it was called at line 1059 and suspends manually stared VMs if $0 starts with K. Please fix this in the ebuild for the benefit of other gentoo users. The script
(In reply to comment #3) > Thanks. I won't fix. 1.) there are no such folders rc3.d/ or files S* and K* > 2.) In systems with rcX.d S* and K* files a just a symlinks. 3) Well, "manual" > means manual starts and stop. > Hi Vadim Sorry, I meant to reply not comment You are incorrect on counts 1, 2 & 3. 1. The app-emulation/vmware-server-2.0.2.203138-r1 build installs /etc/vmware/init.d/rc3.d/ and /etc/vmware/init.d/rc6.d/ 2. In systems with rcX.d S* and K* symlinks, these are not 'just' symlinks but are used to start and stop services. 3. On vmware-server2 'manual' means start and stop but on system shutdown, provided it is called via the K08vmware symlink, the vmware provided /etc/vmware/init.d/vmware script suspends all running VMs. On my Gentoo system with vmware-server2 installed: blue ~ # ls -l /etc/vmware/init.d/rc3.d/ total 0 lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 K08vmware -> /etc/vmware/init.d/vmware lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 S90vmware -> /etc/vmware/init.d/vmware blue ~ # ls -l /etc/vmware/init.d/rc6.d/ total 0 lrwxrwxrwx 1 root vmware 25 Nov 28 00:53 K08vmware -> /etc/vmware/init.d/vmware The script /etc/vmware/init.d/vmware checks the basename of $0 to see how it was called at line 1059 and suspends manually stared VMs if $0 starts with K. i.e. #line 1245 SCRIPTNAME="$0" BASENAME=`basename "$SCRIPTNAME"` .... #line 1055 # If the 'K' version of this script is running, the system is # stoping services not because the user is running vmware-config.pl # or running the initscript directly but because the user wants to # shutdown. Suspend all VMs. if [ "`echo $BASENAME | sed -ne '/^K[0-9].vmware/p'`" ] ; then if [ -x "$vmdb_answer_BINDIR"/vmrun ] ; then for i in `pidof vmware-vmx` ; do "$vmdb_answer_BINDIR"/vmrun suspend `ps -p $i -f | \ sed -ne '/vmware/s/.* \(\/.*\.vmx\)/\1/p'` 2> /dev/null done fi fi .... Please use my supplied diff to fix this ebuild for the benefit of other gentoo users. Regards Norman
(In reply to comment #5) > 2. In systems with rcX.d S* and K* symlinks, these are not 'just' symlinks but There is nothing in gentoo that will install that. I mean K*, S* vmware server was removed from the tree. Bug 374599.