Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175004 - vmware server init.d script doesn't seem to be stopping vmware-serverd process
Summary: vmware server init.d script doesn't seem to be stopping vmware-serverd process
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-18 00:34 UTC by Maurice Volaski
Modified: 2011-03-17 12:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice Volaski 2007-04-18 00:34:54 UTC
vmware-server 1.0.2.39867--at least under amd64--doesn't seem to be stopping the vmware-serverd process when it is given the stop command.

Starting works fine...
 * Starting VMware services:                                                                                                       [ ok ]
 *   Virtual machine monitor                                                                                                             [ ok ]
 *   Virtual ethernet                                                                                                                    [ ok ]
 *   Bridged networking on /dev/vmnet0                                                                                                   [ ok ]
 *   Starting VMware virtual machines...                                                                                                 [ ok ]

But in stopping,
* Stopping VMware services:                                                                                                             [ ok ]
 *   Virtual machine monitor                                                                                                             [ ok ]
 *   Bridged networking on /dev/vmnet0                                                                                                   [ ok ]
 *   Virtual ethernet                                                                                                                    [ ok ]

The vmware-serverd is left out of the above and is still running:
ps ax | grep vm
20727 ?        Ss     0:00 /opt/vmware/server/sbin/vmware-serverd -s -d

And it complains in its log:
Apr 17 20:29:39: app| Msg_Post: Could not open /dev/vmmon: No such file or directory.
Apr 17 20:29:39: app| Please make sure that the kernel module `vmmon' is loaded.
Apr 17 20:29:39: app| 
Apr 17 20:29:39: app| Msg_Post: Error
Apr 17 20:29:39: app| [msg.vmmonPosix.initFailed] Failed to initialize monitor device.
Apr 17 20:29:39: app| [localized] Failed to initialize monitor device.


because the vmmon kernel module has been removed.

The vmware-serverd must then be stopped manually by sending it a HUP signal:

Apr 17 20:30:42: app| Signal 1 caught.  Requesting shutdown.
Apr 17 20:30:42: app| Shutting down vmserverd (0).
Apr 17 20:30:47: app| IPC_exit: disconnecting all threads
Apr 17 20:30:47: app| SP: Unregistered from the poll loop

(It's possible this is a bug in vmware's internal stop script. But I'd figured I report here to confirm that it was Gentoo init script problem.)
Comment 1 Mike Auty (RETIRED) gentoo-dev 2007-04-18 07:48:49 UTC
Hi Maurice, thanks for getting in touch with us.  Please could you verify whether it's gentoo's wrapper script, or vmware's init script that's at fault as follows:

/etc/init.d/vmware start

then ensure a virtual machine is running

/etc/vmware/init.d/vmware stop

and then send the output of the last command.  It's an unwrapped version of the script, and should include whether the running virtual machines are shutting down or not.  Thanks...  5:)
Comment 2 Maurice Volaski 2007-04-18 17:52:47 UTC
OK, Gentoo is just passing on the failure of the vmware script:

root@kennedy1 /etc/init.d # /etc/vmware/init.d/vmware start
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual ethernet                                                    done
   Bridged networking on /dev/vmnet0                                   done
   Starting VMware virtual machines...                                 done
root@kennedy1 /etc/init.d # /etc/vmware/init.d/vmware stop
Stopping VMware services:
   Virtual machine monitor                                             done
   Bridged networking on /dev/vmnet0                                   done
   Virtual ethernet                                                    done
root@kennedy1 /etc/init.d # 


So look like a problem inside VMware. I found they had a bug reporting page here, https://www.vmware.com/support/sr/sr_file_bug.jsp, but it doesn't seem to functional any longer.
Comment 3 Mike Auty (RETIRED) gentoo-dev 2007-04-18 21:39:07 UTC
Ok, so the way the vmware script works is that it checks if the vmmon vmware module is in use by anything (which presumably they would be for a running vmware machine), and if they are it then enters it's process of trying to kill them all (by pid, or if no pid can be found, by launching the server daemon with the -k flag).

I'd like to ask you to start up the vmware service again, ensure that a virtual machine is running and then post the output of running "lsmod" and also:

lsmod | awk 'BEGIN {n = 0;} {if ($1 == "'"vmmon"'") n = $3;} END {print n;}'

That should tell us how many virtual machines the vmware script believes are running.  Thanks very much for your patience in trying to sort this bug out...  5:)
Comment 4 Maurice Volaski 2007-04-20 04:59:02 UTC
Start a virtual machine? That's the bug! There needs to be a virtual machine running before I can stop the server process. This makes sense? That's what I'm seeing. When I'm testing it, I have already stopped the virtual machine manually, so the script sees no machines running and just lets the server process continue running.

The script needs to have a special case when there are no machines running and send a HUP signal to the server process. 

Comment 5 Maurice Volaski 2007-04-20 05:03:01 UTC
BTW, when I do have 1 (one) virtual machine running, the result of that line of code, which is in the script, is 7 (seven)! 
Comment 6 Mike Auty (RETIRED) gentoo-dev 2007-04-20 08:23:48 UTC
Hi Maurice, 

Sorry about that, I think I've been misunderstanding your bug.  I was under the impression that you had started some virtual machines and they hadn't been being stopped automatically, but I realize now there is always one vmware-serverd process left running (which appears only to be used to automatically start any machines that were left running at shutdown.

It will only run the extra vmware-server if the file /etc/vmware/vm-list exists, and it will never issue a stop to it unless there is another virtual machine running.  Presumably the bug is that the serverd process is supposed to terminate once it has started the other servers...

I'll look into adding a HUP single if and only if there are no other virtual machines running, but it may take me a little while.  Meanwhile I've reduced the severity of this bug since it doesn't affect the normal running and operation of vmware, and it doesn't impact strongly on any other software...
Comment 7 Mike Auty (RETIRED) gentoo-dev 2007-12-22 17:50:47 UTC
Again, sorry for the delay.  During some work I've been doing on vmware-server 2 beta (which is very much still a work in progress), I found a slight bug whereby we were copying the init script from the vmware-any-any packages, rather than the one that comes with vmware-server.  It could well be that the original init scripts stop all the vmware serverd processes.  Hopefully over the next month or so, I'll get time to push out a 1.0.4-r1 release featuring this as a fix.  For the time being, please could you try re-emerge vmware-server from the overlay and check whether it solves the problem?  Thanks very much...  5:)
Comment 8 Stefan Behte (RETIRED) gentoo-dev Security 2008-03-27 11:45:08 UTC
This still seems to exists in app-emulation/vmware-server-1.0.5.80187
After stopping VMWare, there is one proces left:

/opt/vmware/server/sbin/vmware-serverd -s -d
Comment 9 Mike Auty (RETIRED) gentoo-dev 2008-03-27 20:00:08 UTC
Hmmm, sorry Craig, I thought I'd got that one sorted.  I've double checked the version that made it into the tree, and it should now be using the vmware supplied init script.  I thought this would ensure all vmware-server instances were shut down, but seemingly it doesn't.

I'll continue looking into this, to see if there's something we should be doing other than just killing the process when we're all done, but it's fairly low priority since it doesn't have a major impact on either the running of vmware or the machine afterwards, sorry...  5:(
Comment 10 Alon Bar-Lev 2008-07-02 08:15:48 UTC
Hi!
The vmware-serverd consumes some CPU even if no VM is running... This is strange.
Maybe killing it would be a temporary solution.
Alon.
Comment 11 Stefan Behte (RETIRED) gentoo-dev Security 2009-01-23 21:49:40 UTC
vmware-serverd is started via xinetd from the vmware-init.d-script.
When you stop vmware-serverd, xinetd is not stopped.
I think we cannot fix this. 
Comment 12 Vadim Kuznetsov (RETIRED) gentoo-dev 2011-03-17 12:52:22 UTC
vmware-server 1.0.x not in the portage anymore.
Bug 354383.