VMWare Player Broken for Kernel 2.6.39-3-generic

I had a problem with VMWare Player this morning. So, here is my troubleshooting. Hopefully, it helps someone else.

VMWare Kernel Prompt

Here is the error:
Kernel Build Error

Here’s what the log said:

Jul 26 11:19:19.031: app-139894085519136| Log for VMware Workstation pid=6699 version=7.1.4 build=build-385536 option=Release
Jul 26 11:19:19.031: app-139894085519136| The process is 64-bit.
Jul 26 11:19:19.031: app-139894085519136| Host codepage=UTF-8 encoding=UTF-8
Jul 26 11:19:19.031: app-139894085519136| Logging to /tmp/vmware-root/setup-6699.log
Jul 26 11:19:19.223: app-139894085519136| modconf query interface initialized
Jul 26 11:19:19.224: app-139894085519136| modconf library initialized
Jul 26 11:19:19.263: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.272: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.289: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.309: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.324: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.373: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.377: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.380: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.385: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.388: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.422: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.425: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.429: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.432: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.436: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.447: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.468: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.524: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.528: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.532: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.535: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.541: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.549: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.566: app-139894085519136| Your GCC version: 4.5
Jul 26 11:19:19.626: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.629: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.632: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.636: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:19.639: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:20.029: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.
Jul 26 11:19:20.035: app-139894085519136| Building module vmmon.
Jul 26 11:19:20.035: app-139894085519136| Extracting the sources of the vmmon module.
Jul 26 11:19:20.096: app-139894085519136| Building module with command: /usr/bin/make -C /tmp/vmware-root/modules/vmmon-only auto-build SUPPORT_SMP=1 HEADER_DIR=/lib/modules/2.6.39-3-generic/build/include CC=/usr/bin/gcc GREP=/usr/bin/make IS_GCC_3=no VMCCVER=4.5.2
Jul 26 11:19:21.376: app-139894085519136| Failed to compile module vmmon!

I found the following two threads helpful:

The second thread recommended this script to fix the problem:

#! /bin/bash
# VMWare Workstation/Player _host kernel modules_ patcher v0.6.2 by ©2010 Artem S. Tashkinov
# Use at your own risk.

fpatch=vmware2.6.39fixed.patch
vmreqver=7.1.4
plreqver=3.1.3

error()
{
	echo "$*. Exiting"
	exit
}

curdir=`pwd`
bdate=`date "+%F-%H:%M:%S"` || error "date utility didn't quite work. Hm"
vmver=`vmware-installer -l 2>/dev/null | awk '/vmware-/{print $1substr($2,1,5)}'`
vmver="${vmver#vmware-}"
basedir=/usr/lib/vmware/modules/source
ptoken="$basedir/.patched"
bkupdir="$basedir-$vmver-$bdate-backup"

unset product
[ -z "$vmver" ] && error "VMWare is not installed (properly) on this PC"
[ "$vmver" == "workstation$vmreqver" ] && product="VMWare WorkStation"
[ "$vmver" == "player$plreqver" ] && product="VMWare Player"
[ -z "$product" ] && error "Sorry, this script is only for VMWare WorkStation $vmreqver or VMWare Player $plreqver"

[ "`id -u`" != "0" ] && error "You must be root to run this script"
[ -f "$ptoken" ] && error "$ptoken found. You have already patched your sources"
[ ! -d "$basedir" ] && error "Source '$basedir' directory not found, reinstall $product"
[ ! -f "$fpatch" ] && error "'$fpatch' not found. Please, copy it to the current '$curdir' directory"

tmpdir=`mktemp -d` || exit 1
cp -an "$basedir" "$bkupdir" || exit 2

cd "$tmpdir" || exit 3
find "$basedir" -name "*.tar" -exec tar xf '{}' \; || exit 4

patch -p1 < "$curdir/$fpatch" || exit 5
tar cf vmblock.tar vmblock-only || exit 6
tar cf    vmci.tar    vmci-only || exit 7
tar cf   vsock.tar   vsock-only || exit 8
tar cf   vmnet.tar   vmnet-only || exit 9
tar cf   vmmon.tar   vmmon-only || exit 10

cp -a *.tar "$basedir" || exit 11
rm -rf "$tmpdir" || exit 12
touch "$ptoken" || exit 13
cd "$curdir" || exit 14

vmware-modconfig --console --install-all

echo -e "\n"
echo "All done, you can now run $product."
echo "Modules sources backup can be found in the '$bkupdir' directory"

I copied the script into a file and set the permissions to executable:

skp@pecan:/tmp$ gedit vmware-fix
skp@pecan:/tmp$ chmod 777 vmware-fix 
skp@pecan:/tmp$ 

Unfortunately, it didn’t work — my version of VMWare is too new! Here’s the output:

skp@pecan:/tmp$ ./vmware-fix
Sorry, this script is only for VMWare WorkStation 7.1.4 or VMWare Player 3.1.3. Exiting
skp@pecan:/tmp$ vmplayer --version
VMware Player 3.1.4 build-385536

Even though it didn’t work for me, I wanted to leave that in my post in case you have the 3.1.3 version.

Instead, I found another fix that worked:

Downloaded vmware2.6.39patchv3.tar

skp@pecan:~/Downloads$ tar -xjvf vmware2.6.39patchv3.tar.bz2 
patch-modules_2.6.39.sh
vmware2.6.39fixedv3.patch
skp@pecan:~/Downloads$ chmod 777 patch-modules_2.6.39.sh 
skp@pecan:~/Downloads$ sudo ./patch-modules_2.6.39.sh 
[sudo] password for skp: 
patching file vmblock-only/linux/dentry.c
patching file vmblock-only/linux/filesystem.c
patching file vmci-only/linux/driver.c
patching file vmmon-only/linux/driver.c
patching file vmmon-only/linux/hostif.c
patching file vmmon-only/linux/iommu.c
patching file vmnet-only/driver.c
patching file vmnet-only/filter.c
patching file vmnet-only/hub.c
patching file vsock-only/linux/af_vsock.c
patching file vsock-only/linux/util.c
Stopping VMware services:
   VMware USB Arbitrator                                               done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/2.6.39-3-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
...

And, it did work! Everything seems to be running now!


make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vsock-only'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'
Built vsock module
Starting VMware services:
   VMware USB Arbitrator                                               done
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   Shared Memory Available                                             done


All done, you can now run VMWare Player.
Modules sources backup can be found in the '/usr/lib/vmware/modules/source-player3.1.4-2011-07-26-13:41:48-backup' directory

10 thoughts on “VMWare Player Broken for Kernel 2.6.39-3-generic

  1. I’m trying to use VMware 3.1.4 in Mandriva 2011, with kernel 2.6.39, but this is what I get, and it keeps asking me for the headers… 🙁 any idea?

    #./patch-modules_2.6.39.sh
    patching file vmblock-only/linux/dentry.c
    patching file vmblock-only/linux/filesystem.c
    patching file vmci-only/linux/driver.c
    patching file vmmon-only/linux/driver.c
    patching file vmmon-only/linux/hostif.c
    patching file vmmon-only/linux/iommu.c
    patching file vmnet-only/driver.c
    patching file vmnet-only/filter.c
    patching file vmnet-only/hub.c
    patching file vsock-only/linux/af_vsock.c
    patching file vsock-only/linux/util.c
    gcc and kernel headers must be installed

    All done, you can now run VMWare Player.
    Modules sources backup can be found in the ‘/usr/lib/vmware/modules/source-player3.1.4-2012-01-29-23:22:12-backup’ directory

  2. @asel Make sure that you have the kernel headers or kernel source installed. Each distribution is slightly different in this aspect. I found this link for Mandriva that looks promising:
    http://forum.mandriva.com/en/viewtopic.php?t=76188

    Basically, it looks like you can check to see if the packages are installing with the command:
    sudo rpm -qa | grep kernel-source

    The post mentions two packages: kernel-source and kernel-source-latest.

    Then, these lines look like they are also required. You will probably have to adjust for your kernel version as this was from 2007:
    cd /usr/src/linux-2.6.22.12-desktop-1mdv
    make mrproper
    cp /boot/config-2.6.22.12-desktop-1mdv .config
    vi Makefile (EXTRAVERSION=.12-desktop-1mdv)
    make oldconfig && make prepare && make modules_prepare

    I hope that helps.

  3. @digitaleagle Thanks for your reply. I have kernel headers installed,and both source and source-latest. I tried those commands, but I got this:

    # vi Makefile (EXTRAVERSION=.4-4.2-desktop)
    bash: syntax error near unexpected token `(‘

    gcc and headers are installed, so no idea why it stops at the point I wrote above… :S

    1. @asel,

      Sorry I haven’t gotten back on this quickly, but I think possibly that line is a little misleading.

      I think you are supposed to edit the Makefile. They suggest vi, but you could use gedit if that is easier — gedit Makefile.

      The top of my Makefile looks like this:
      VERSION = 3
      PATCHLEVEL = 0
      SUBLEVEL = 13
      EXTRAVERSION =
      NAME = Sneaky Weasel

      # *DOCUMENTATION*

      I think they are suggesting to change that 4th line from this:
      EXTRAVERSION =
      to this:
      EXTRAVERSION = .4-4.2-desktop

      I hope that helps. Or, have you already figured something else out?

      1. @digitaleagle
        thanks again. the problem solved itself. Mandriva updated the kernel and I installed vmware 4.0.2 in the new kernel. it works! no need fot a patch or anything, it just works now. the only problem is that vmware doesn’t let me update vmware tools, but it’s not a big one as it’s working fine and fast =)
        thank you anyway!!

Leave a Comment

Your email address will not be published. Required fields are marked *