VMWare server broken after kernel upgrade -- missing modules

Asked by Matthew R

Hi All,

Just did an automatic upgrade this morning that included a kernel update and a restart. Am now running 2.6.22-15-generic x86_64. After the restart I went to start up my windows XP VM in VMWare server 1.06, which I installed via synaptic. The VMWare server console starts up just fine, but when I try to resume my VM, I get an error message that says:

Unable to change virtual machine power state: The process exited with an error: End of error message.
Not very helpful. I took a look and sure enough the vmware server kernel modules are missing for the new kernel:

matthew@m-rich:~$ ls -l /lib/modules/2.6.22-14-generic | grep vmware
drwxr-xr-x 2 root root 4096 2008-06-20 09:40 vmware-server
matthew@m-rich:~$ ls -l /lib/modules/2.6.22-15-generic | grep vmware
matthew@m-rich:~$

I tried reinstalling the vmware server (and vmware kernel modules) packages but I actually got an error during the post install script -- I'm guessing this is because the modules come pre compiled and it errored out trying to load them into a running kernel of a different version.

Help?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
pure_ascii
Solved:
Last query:
Last reply:
Revision history for this message
Best pure_ascii (pureascii) said :
#1

Hi Matthew,

I'm running Kubuntu 7.10 (Gutsy Gibbon) and had the same problem with VMware Server 1.0.4 (from Canonical repository) after the kernel update to 2.6.22-15-generic x86_64.
What Ubuntu version are you running and where did you get debs for VMware Server 1.0.6?

The following steps solved my problem:

sudo apt-get install vmware-server-kernel-source
cd <temp dir>
tar xvjf /usr/src/vmware-server.tar.bz2
cd modules/vmware-server-kernel/
export KPKG_DEST_DIR=<where the deb package should go> # otherwise fakeroot won't work
export KVERS=`uname -r`
fakeroot debian/rules binary-modules
sudo dpkg -i $KPKG_DEST_DIR/vmware-server-kernel-modules-`uname -r`*.deb
cd -
rm -r modules
sudo /etc/init.d/vmware-server restart

Hope this will work for you, too.

Regards,
pure_ascii.

Revision history for this message
Matthew R (mrich) said :
#2

Thanks pure_ascii, that solved my question.

Revision history for this message
Josir (josir-jsk) said :
#3

Thanks pure_ascii. The solution worked perfectly.

I would add just one line:

sudo mv *.deb /var/cache/apt/archives

As some guys backup all their deb packages using aptoncd, it's wise to copy it to the cache dir.
Thanks again.

Revision history for this message
Gram (gram-roadstarclinic) said :
#4

This worked great after working through some dependencies (Gutsy).

I already had build-essential installed, but also needed kernel-devel. Without kernel-devel the make command executed by the debian/rules file would fail while trying to install (make: **[binary-modules] Error 1). I assume something similar would happen without build-essential.

Also found I had to replace every instance of 'uname -r' in the instructions provided by pure_ascii with the output of that command. When I run uname -r at my command line I get this: 2.6.22-15-generic (don't cut and past this into your commands - run the command and use the output from your system).

So replaced every instance of 'uname -r' above with 2.6.22-15-generic (no quotes).

Worked like a champ.

Thanks pure_ascii for the great solution.

Revision history for this message
pure_ascii (pureascii) said :
#5

Hello Gram,

sorry that I didn't name linux-kernel-devel (which should include all deps (incl. build-essential) to build kernel modules). I think I already had it for some other reason.

Maybe I should have mentioned that the quotes in my code are backward quotes `...`, that do inline command execution. I thought everybody would do copy & paste and get it right without thinking about it. Perhaps i will use ksh-style $(...) to make it easier human-readable next time.

I'm very pleased that I helped some guys with my solution.

Meanwhile I upgraded to hardy (which did some strange things shuffling my 2 NICs and gave me some work to get sound and my 32bit apps working again). Sadly I found no packages for hardy, so I installed VMware-Server 1.0.6 from tar.gz. It worked without an any-to-any patch, but I'm not sure if I did some other tricks.
But I still would prefer some debs.

Regards
pure_ascii