VMware Workstation 7.1.3 runs great on Linux kernel 2.6.37

Of course, only after you patch the installation. :) I can't remember when was the last time Workstation run without patching, that was really long long time ago. Maybe it's Linus' fault, he moves too fast, who can tell... :)

Also, you won't be able to compile and run the 2.6.37 kernel with the legacy BKL (Big Kernel Lock) disabled, Workstation still depends on lock_kernel() and unlock_kernel() primitives. Let's hope VMware fixes that in their next revision.

Anyway... the patch is relatively small this time, but many files had to be patched for the modules to compile properly, so I propose a slightly different methodology for patching.

Go to the module source directory and untar all archives:

cd /usr/lib/vmware/modules/source
for file in *
do
tar xvf $file
done

Apply the patch:

patch -p1 < /path/to/vmware-workstation-7.1.3-kernel-2.6.37.patch

Pack all archives once again, and get rid of the unpacked directories:

for file in *-only
do
tar cvf `basename $file -only`.tar $file
done
rm -rf *-only

Now you can rebuild and load modules:

vmware-modconfig --console --install-all

After that, Workstation runs fast and trouble free as usual. Have fun!

Update 2011-03-21:

VMware modules that were patched with the attached patch compile correctly also on 2.6.38. So there's nothing special to do if you use WS 7.1.3 and upgrade from 2.6.37 to 2.6.38, just recompile the modules with the above vmware-modconfig incantation and everything will work just fine.

AttachmentSize
vmware-workstation-7.1.3-kernel-2.6.37.patch2.32 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

what the fuck ever

fuck vmware, lazy fuckers dont want to support the kernels so they lose my money

VMware forum says the patch

VMware forum says the patch for 2.6.37 works for 2.6.38 so I gave it a try, but it doesn't work.

[root@workstation source]# vmware-modconfig --console --install-all
Stopping vmware (via systemctl): [ OK ]
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/2.6.38.6-26.rc1.fc15.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/2.6.38.6-26.rc1.fc15.i686'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/iommu.o
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_SetupMMU’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:103:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:113:17: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:117:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:120:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64’ [-Wformat]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:156:7: error: implicit declaration of function ‘iommu_map_range’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_VMCleanup’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:403:7: error: implicit declaration of function ‘iommu_unmap_range’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMUUnregisterDeviceInt’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:216:17: warning: ignoring return value of ‘device_attach’, declared with attribute warn_unused_result [-Wunused-result]
cc1: some warnings being treated as errors

make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/iommu.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.38.6-26.rc1.fc15.i686'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon
[root@workstation source]#

Not working with newest Kernel 2.6.39 anymore :(

Gentoo users can use this fix for using gentoo-sources-2.6.39 and VMware-Workstation 7.1.4:

https://twitter.com/#!/hjwieland/status/71720769272545280 (sorry I poorly summarized it Twitter..)

All other users, here's a great article & patch on 2.6.39:

http://weltall.heliohost.org/wordpress/2011/05/14/running-vmware-workstation-player-on-linux-2-6-39-updated/

Thanks a lot!

You saved my day.

The first try did not work properly. But it was my fault because I'm using this ' instead of ` for "tar cvf `basename $file -only`.tar $file".

D'oh!

Worked like a charm for 2.6.38

The patch worked great for 2.6.38-1 on Debian SID x64.
VMware Player 7.1.3

Thanks!

The patch does not work with 2.6.38 kernel

I'm using 2.6.38 kernel compiled from source. I followed your instructions and below you can see what errors I got. I would very appreciate any help or hint... Maybe I did something wrong? Thanks.

# vmware-modconfig --console --install-all
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.38/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-2.6.38'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/iommu.o
In file included from /tmp/vmware-root/modules/vmmon-only/linux/driver.c:31:0:
/tmp/vmware-root/modules/vmmon-only/./include/compat_wait.h:78:13: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:72:13: note: previous declaration of ‘poll_initwait’ was here
CC [M] /tmp/vmware-root/modules/vmmon-only/common/comport.o
In file included from /tmp/vmware-root/modules/vmmon-only/linux/hostif.c:59:0:
/tmp/vmware-root/modules/vmmon-only/./include/compat_wait.h:78:13: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:72:13: note: previous declaration of ‘poll_initwait’ was here
In file included from /tmp/vmware-root/modules/vmmon-only/linux/driver.h:34:0,
from /tmp/vmware-root/modules/vmmon-only/linux/iommu.h:48,
from /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:28:
/tmp/vmware-root/modules/vmmon-only/./include/compat_wait.h:78:13: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:72:13: note: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIF_SemaphoreWait’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2858:7: warning: passing argument 1 of ‘poll_freewait’ from incompatible pointer type
include/linux/poll.h:73:13: note: expected ‘struct poll_wqueues *’ but argument is of type ‘struct poll_table *’
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIF_CallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:3341:4: error: too many arguments to function ‘smp_call_function’
include/linux/smp.h:73:5: note: declared here
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIF_BrokenCPUHelper’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:3378:4: error: too many arguments to function ‘smp_call_function’
include/linux/smp.h:73:5: note: declared here
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIFFastClockThread’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:3851:4: error: ‘struct task_struct’ has no member named ‘nice’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1409:4: error: too many arguments to function ‘smp_call_function’
include/linux/smp.h:73:5: note: declared here
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/iommu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/hostif.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.38'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

Thank you for your article! I

Thank you for your article! I followed it through until
running vmware-modconfig --console --install-all yields to gcc and kernel headers must be installed dispite having gcc, kernel source and kernel-syms installed! what is going on?
P.S. Just upgraded to opensuse 11.4 32 bit

You must have kernel source

You must have kernel source unpacked, compiled and make modules_install step run. Probably vmware-modconfig looks for your /lib/modules/2.6.x/build symlink to find where the kernel source is. Unfortunately, I don't know the procedure to install kernel sources on OpenSuse, so can't help you with that. And yes, kernel source should match your running kernel, otherwise the modules won't load.

Unable to install vmmon


make[1]: Entering directory `/usr/src/linux-2.6.37-ARCH'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIFReadUptimeWork’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2004:37: warning: ‘newUpBase’ may be used uninitialized in this function
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/iommu.o
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_SetupMMU’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:156:7: error: implicit declaration of function ‘iommu_map_range’
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_VMCleanup’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:403:7: error: implicit declaration of function ‘iommu_unmap_range’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/iommu.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37-ARCH'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

What could be the problem? Could it be that I'm actually using 7.1.2 with 2.6.37 kernel? Or maybe becaus I'm on a 64-bit system?

Although I haven't tested the

Although I haven't tested the patch on a 64bit kernel, this really looks like a problem because you're using 7.1.2. Please try patching 7.1.3, there's a good chance it will work.

Thanks! Works as a charm!

Thanks! Works as a charm!

You're the man !! Thanks !!

You're the man !! Thanks !!

Great info - big thanks

You did a fantastic job here and I would thank you not only for your work but even further for publishing this info.

I think you helped a lot of people who otherwise would get lost and would have a chance to use VMware Workstation with the new kernel.

Great!

worked great on Ubuntu Lucid

worked great on Ubuntu Lucid 2.6.37-12-generic kernel

:(

This wasnt working on 36 but I saw that 37 was stable so I built it anyway, just to try it. Here are my results:

1 part failed of the patch:

mc-lptp:/usr/lib/vmware/modules/source# patch -p1 < /home/halfmike/tmp/vmware-workstation-7.1.3-kernel-2.6.37.patch
patching file vmci-only/include/compat_semaphore.h
patching file vmmon-only/linux/driver.c
Hunk #1 FAILED at 143.
1 out of 1 hunk FAILED -- saving rejects to file vmmon-only/linux/driver.c.rej
patching file vmnet-only/compat_semaphore.h
patching file vsock-only/shared/compat_semaphore.h

And I'm still getting:

/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘init_module’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:427: error: ‘struct file_operations’ has no member named ‘ioctl’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1424: error: too many arguments to function ‘smp_call_function’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:2008: error: too many arguments to function ‘smp_call_function’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2

So the driver.c is still broken, maybe I can fix the code myself, somehow? Too bad I don't know C....

Make sure that: 1) you have

Make sure that:

1) you have pristine vmware tar files before patching (best to make clean install before patching)
2) you have relevant kernel sources, best if already compiled and make modules_install step has been run

For so many people the patch worked, so it should also work for you.

Though, with distribution/vendor (heavily patched) kernels, your mileage really can vary. I tested only with Linus' kernel tree.

Ok, I was trying VMPLayer 3.1.4

I should have tried VMplayer 3.1.3, I'll give it a try and see if it works as expected.

Tried this on Ubuntu x64 2.6.38

I got the same error on driver.c.rej, I read it trought and it seems the file changed, so I added the logic anyway, it all compiled and installed but vmmon still won't start, however now vmnet starts great.

any ideas?

so how can you have pristine

so how can you have pristine vmware tar files? and how can i run make nodules_install step? sorry noobie here..

I forgot to clear the

I forgot to clear the previous config the last time around. Everything patched fine. But this time I get a different error:

/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIFDoIoctl’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:3706: error: ‘const struct file_operations’ has no member named ‘ioctl’
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:3710: error: ‘const struct file_operations’ has no member named ‘ioctl’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/hostif.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

As a side note, I saw this last night and built my 37 kernel with CONFIG_HIGH_RES_TIMERS=n So I dont understand why I would still get this error

If I'm following the code

If I'm following the code correctly, I think you got it backwards. Meaning, you should've _defined_ CONFIG_HIGH_RES_TIMER (=y) to get past that error.

At the top of hostif.c there's this chunk:

# ifdef CONFIG_HIGH_RES_TIMERS
# include <linux/hrtimer.h>
# define VMMON_USE_HIGH_RES_TIMERS

So VMMON_USE_HIGH_RES_TIMERS will be defined if CONFIG_HIGH_RES_TIMERS is.

Then the code that produces the error you're reporting is surrounded with:

#ifndef VMMON_USE_HIGH_RES_TIMERS

Meaning, only if VMMON_USE_HIGH_RES_TIMERS is NOT defined (#ifndef) you will get an error.

Try again with high res timers enabled. Do it carefully, once again. Then report what happened.

:)

worked great. thanks!

Thanks again!!

Thanks again!!

Thank you. Just what i

Thank you. Just what i needed.

Actually, for me it doesn't

Actually, for me it doesn't work. None of the patches for linux kernels work, I always get the same error after running
./patch -p1 < ./vmware-workstation-7.1.3-kernel-2.6.37.patch
or
./patch-modules_v62.sh

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN original/vmci-only/include/compat_semaphore.h patched/vmci-only/include/compat_semaphore.h
|--- original/vmci-only/include/compat_semaphore.h 2010-11-11 21:02:54.000000000 +0100
|+++ patched/vmci-only/include/compat_semaphore.h 2011-01-06 02:34:52.000000000 +0100
--------------------------

Done!!!

Just move the folders inside the tmp folder to the parent folder.

[ ]'s

can i rum vmware in kernel

can i rum vmware in kernel 2.6.38.2 fedora 15 gnome 3
plz help