Link to home
Start Free TrialLog in
Avatar of Barthax
BarthaxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VMWare Server 2 requires vmware-config after each boot on Linux

I use VMWare Server 2 on an Ubuntu 10.  I shutdown last thing & boot up again first thing.  Every boot up, the VMWare Server 2 fails to function - the web interface is inaccessible and starting the vmware-vmrc from the command-line fails to connect.  Running 'sudo /usr/bin/vmware-config.pl' results in the following:

====
The following VMware kernel modules have been found on your system that were
not installed by the VMware Installer.  Please remove them then run this
installer again.

vmnet
vmmon
vmci

I.e. - 'rm /lib/modules/2.6.32-24-generic/misc/<ModuleName>.{o,ko}'

Execution aborted.
====

At this point, I follow the instructions (note that the vsock.* is unafflicted) with 'sudo rm /lib/modules/2.6.32-24-generic/misc/vm*' and re-run the vmware-config.pl with full path.  This time it uses the init.d script for vmware to shut it down and everytime achieves:

====
Making sure services for VMware Server are stopped.

Stopping VMware autostart virtual machines:
   Virtual machines                                                    done
Stopping VMware management services:
   VMware Virtual Infrastructure Web Access
   VMware Server Host Agent                                            done
Stopping VMware services:
   VMware Authentication Daemon                                        done
   VM communication interface socket family:                           done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Bridged networking on /dev/vmnet0                                   done
   Host network detection                                              done
   DHCP server on /dev/vmnet1                                          done
   Host-only networking on /dev/vmnet1                                 done
   DHCP server on /dev/vmnet8                                          done
   NAT service on /dev/vmnet8                                          done
   Host-only networking on /dev/vmnet8                                 done
   Virtual ethernet                                                   failed
Unable to stop services for VMware Server

Execution aborted.
====

My only recourse is to reboot (which thankfully is not long), log in & re-run the vmware-config.pl script once again and VMWare Server 2 kicks into life.

Note that the installation is from VMware-server-2.0.2-203138.i386.tar.gz with the AMD patch: VMware-server-2.0.2-203138-update-2.patch if that helps any.

I'd like to put an end to this cycle. :)
Avatar of Barthax
Barthax
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

After the reboot (which I've just done :) ) the vmware-config.pl -default is run & goes through the init.d script successfully then it outputs for each module as they are compiled.  The vmmon module out is given below & the others are similar:


None of the pre-built vmmon modules for VMware Server is suitable for your 
running kernel.  Do you want this program to try to build the vmmon module for 
your system (you need to have a C compiler installed on your system)? [yes] 

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.32-24-generic/build/include] 

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.32-24-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-24-generic'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/task.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
This program previously created the file 
/lib/modules/2.6.32-24-generic/misc/vmmon.o, and was about to remove it.  
Somebody else apparently did it already.

This program previously created the file 
/lib/modules/2.6.32-24-generic/misc/vmmon.ko, and was about to remove it.  
Somebody else apparently did it already.

The vmmon module loads perfectly into the running kernel.

Open in new window

Avatar of Barthax

ASKER

Thanks, bgoering.  I'll give them a go. :)
Avatar of Barthax

ASKER

Hmmm... two reboots later & it's definitely not changing the circumstances.  I plan to look into it more as I think I may have missed something.  Not forgotten. ;)
Avatar of Barthax

ASKER

Thanks bgoering.  Of the above two latest links, the first one confirms in the responses beneath that it does not fix the issue I face - indeed the author confirms it happens to himself.  The second is a general "how to" getting it working in the first instance - I'm long past that one. ;)
Avatar of Barthax

ASKER

I've decided to try altering the vmware startup script & add in a new script which removes the modules on shutdown.
Avatar of Barthax

ASKER

So here's the attempt.  The script is in /etc/init.d and I've called it vmware-mod-rem.  chmod +x vmware-mod-rem is done to ensure it is executable and it works from a command window.  I've linked it into the /etc/r5.d directory as S02vmware-mod-rem and K50vmware-mod-rem - very early start but late closure compared to the K0x entries for vmware.

The check before running vmware-config.pl is of the vmmon.o - the first item built by the vmware-config.pl.

Just need to test booting (which I haven't got time today as I've wasted 30 mins preparing).
#!/usr/bin/env bash

case $1 in
         start)
		if [ ! -e "/dev/vmmon" ] ; then
			mknod /dev/vmmon c 10 165
			chmod 600 /dev/vmmon
		fi
		for a in `seq 0 9` ; do
			if [ ! -e "/dev/vmnet$a" ] ; then
				mknod /dev/vmnet$a c 119 $a
				chmod 600 /dev/vmnet$a
			fi
		done
		if [ ! -e /lib/modules/`uname -r`/misc/vmmon.o ] ; then
			/usr/bin/vmware-config.pl -default
		fi
         ;;
         stop)
		rm /lib/modules/`uname -r`/misc/vm*
         ;;
esac

Open in new window

Avatar of Barthax

ASKER

Minor update: had to alter the shebang to #!/bin/sh before it worked... and the minor mistake of putting the links in the wrong run level. :D  The files now get recompiled on reboot but VMWare doesn't start automatically.  Attempting to start it manually indicates the modules are for the wrong version of the kernel (still).  Thankfully, I can remove the modules, recompile them & start VMWare without any further reboots now.... That's at least one step closer. :)
SOLUTION
Avatar of bgoering
bgoering
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Barthax

ASKER

Good idea, thanks bgoering.  I've switched the script to bash & added a "env >/root/envbuild" line to get some detail.  It's 5:20 here, so I won't be returning to this until sometime next week.  Here's hoping. :)
Avatar of Barthax

ASKER

Hmmm... it compiled afresh on boot up - the file time stamps prove that.  Unfortunately, the ethernet portion of VMWare Server is not 100%, returning me to where I was.  The environment output is in the code block for this post - that seems sufficient, IMO.

So, I'm thinking now that it is boot order of something else which may be afflicting the build.  I'm going to push the rebuild script to last (S99) for the next boot.
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
PWD=/
LANG=en_GB.utf8
SHLVL=1
_=/usr/bin/env

Open in new window

Avatar of Barthax

ASKER

I found http://communities.vmware.com/thread/8767 and it has the suggestion of prepending "VMWARE_DEBUG=yes" before vmware scripts to get the debug output.

The script reckons it has found a conflict of IPs:
   Host-only networking on /dev/vmnet1Host-only networking disabled because 172.16.29.1
appears to be a real, physical, existing address.

Trouble is, this only exists after VMWare has failed... So, I know this is something in the network portion of VMWare which is causing it.  I've altered my script with belt-and-braces stop-vmware-at-all-costs-and-remove-the-modules knowledge and I'm going for another reboot.
Avatar of Barthax

ASKER

I've just noticed (post-reboot) that there's more than one vmware entry in the rc2.d.  I've removed them now, so my script is the only one involved.  Postponing more on this until tomorrow.
Sounds like you are on the right track - good luck
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Barthax

ASKER

On checking, there is a different environment by the time S99 kicks in.  Naturally, there's some improvements to be made to the above script (like not appending to the same file forever!).  I think that does me.  Thanks for the assistance, bgoering.
Good job, glad you were able to achieve a workaround.
Avatar of Barthax

ASKER

One extra thing: the vmware-config.pl puts an S90vmware back in rc2.d.  So the end of the start portion of my script now also removes this entry.