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:

<br />
Jul 26 11:19:19.031: app-139894085519136| Log for VMware Workstation pid=6699 version=7.1.4 build=build-385536 option=Release<br />
Jul 26 11:19:19.031: app-139894085519136| The process is 64-bit.<br />
Jul 26 11:19:19.031: app-139894085519136| Host codepage=UTF-8 encoding=UTF-8<br />
Jul 26 11:19:19.031: app-139894085519136| Logging to /tmp/vmware-root/setup-6699.log<br />
Jul 26 11:19:19.223: app-139894085519136| modconf query interface initialized<br />
Jul 26 11:19:19.224: app-139894085519136| modconf library initialized<br />
Jul 26 11:19:19.263: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.272: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.289: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.309: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.324: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.373: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.377: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.380: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.385: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.388: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.422: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.425: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.429: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.432: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.436: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.447: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.468: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.524: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.528: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.532: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.535: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.541: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.549: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.566: app-139894085519136| Your GCC version: 4.5<br />
Jul 26 11:19:19.626: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.629: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.632: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.636: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:19.639: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:20.029: app-139894085519136| Trying to find a suitable PBM set for kernel 2.6.39-3-generic.<br />
Jul 26 11:19:20.035: app-139894085519136| Building module vmmon.<br />
Jul 26 11:19:20.035: app-139894085519136| Extracting the sources of the vmmon module.<br />
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<br />
Jul 26 11:19:21.376: app-139894085519136| Failed to compile module vmmon!<br />

I found the following two threads helpful:

The second thread recommended this script to fix the problem:

<br />
#! /bin/bash<br />
# VMWare Workstation/Player _host kernel modules_ patcher v0.6.2 by ©2010 Artem S. Tashkinov<br />
# Use at your own risk.</p>
<p>fpatch=vmware2.6.39fixed.patch<br />
vmreqver=7.1.4<br />
plreqver=3.1.3</p>
<p>error()<br />
{<br />
	echo &quot;$*. Exiting&quot;<br />
	exit<br />
}</p>
<p>curdir=`pwd`<br />
bdate=`date &quot;+%F-%H:%M:%S&quot;` || error &quot;date utility didn't quite work. Hm&quot;<br />
vmver=`vmware-installer -l 2&gt;/dev/null | awk '/vmware-/{print $1substr($2,1,5)}'`<br />
vmver=&quot;${vmver#vmware-}&quot;<br />
basedir=/usr/lib/vmware/modules/source<br />
ptoken=&quot;$basedir/.patched&quot;<br />
bkupdir=&quot;$basedir-$vmver-$bdate-backup&quot;</p>
<p>unset product<br />
[ -z &quot;$vmver&quot; ] &amp;&amp; error &quot;VMWare is not installed (properly) on this PC&quot;<br />
[ &quot;$vmver&quot; == &quot;workstation$vmreqver&quot; ] &amp;&amp; product=&quot;VMWare WorkStation&quot;<br />
[ &quot;$vmver&quot; == &quot;player$plreqver&quot; ] &amp;&amp; product=&quot;VMWare Player&quot;<br />
[ -z &quot;$product&quot; ] &amp;&amp; error &quot;Sorry, this script is only for VMWare WorkStation $vmreqver or VMWare Player $plreqver&quot;</p>
<p>[ &quot;`id -u`&quot; != &quot;0&quot; ] &amp;&amp; error &quot;You must be root to run this script&quot;<br />
[ -f &quot;$ptoken&quot; ] &amp;&amp; error &quot;$ptoken found. You have already patched your sources&quot;<br />
[ ! -d &quot;$basedir&quot; ] &amp;&amp; error &quot;Source '$basedir' directory not found, reinstall $product&quot;<br />
[ ! -f &quot;$fpatch&quot; ] &amp;&amp; error &quot;'$fpatch' not found. Please, copy it to the current '$curdir' directory&quot;</p>
<p>tmpdir=`mktemp -d` || exit 1<br />
cp -an &quot;$basedir&quot; &quot;$bkupdir&quot; || exit 2</p>
<p>cd &quot;$tmpdir&quot; || exit 3<br />
find &quot;$basedir&quot; -name &quot;*.tar&quot; -exec tar xf '{}' \; || exit 4</p>
<p>patch -p1 &lt; &quot;$curdir/$fpatch&quot; || exit 5<br />
tar cf vmblock.tar vmblock-only || exit 6<br />
tar cf    vmci.tar    vmci-only || exit 7<br />
tar cf   vsock.tar   vsock-only || exit 8<br />
tar cf   vmnet.tar   vmnet-only || exit 9<br />
tar cf   vmmon.tar   vmmon-only || exit 10</p>
<p>cp -a *.tar &quot;$basedir&quot; || exit 11<br />
rm -rf &quot;$tmpdir&quot; || exit 12<br />
touch &quot;$ptoken&quot; || exit 13<br />
cd &quot;$curdir&quot; || exit 14</p>
<p>vmware-modconfig --console --install-all</p>
<p>echo -e &quot;\n&quot;<br />
echo &quot;All done, you can now run $product.&quot;<br />
echo &quot;Modules sources backup can be found in the '$bkupdir' directory&quot;<br />

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

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

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

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

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

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

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

</p>
<p>make[1]: `postbuild' is up to date.<br />
make[1]: Leaving directory `/tmp/vmware-root/modules/vsock-only'<br />
cp -f vsock.ko ./../vsock.o<br />
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'<br />
Built vsock module<br />
Starting VMware services:<br />
   VMware USB Arbitrator                                               done<br />
   Virtual machine monitor                                             done<br />
   Virtual machine communication interface                             done<br />
   VM communication interface socket family                            done<br />
   Blocking file system                                                done<br />
   Virtual ethernet                                                    done<br />
   Shared Memory Available                                             done</p>
<p>All done, you can now run VMWare Player.<br />
Modules sources backup can be found in the '/usr/lib/vmware/modules/source-player3.1.4-2011-07-26-13:41:48-backup' directory<br />

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 *