VMware Communities
Krellan
Enthusiast
Enthusiast

Here is patch for Workstation 6.5.1 on Linux 2.6.29 kernel

Here is something I'm proud of: a complete patch for getting VMware Workstation 6.5.1 to correctly compile its kernel modules against the new Linux 2.6.29 kernel.

It's attached.

I read the other threads here:

http://communities.vmware.com/message/1210084

http://communities.vmware.com/message/1141306

There were also patches posted to these threads, but after looking at them, I was concerned. There seems to be a serious error, as cap_raise() has been blindly changed to cap_raised(), which is actually a different API that has a completely different effect (it's a query instead of a set). Linux 2.6.29 changed capabilities a lot, evidently, and broke a lot of old code. I had to put in wrapper functions to call the capabilities change, because the new kernel shuffled things around quite a bit.

Also, the Makefile itself was failing to find the Linux kernel headers in many situations. This was a bug in VMware's Makefile: it wasn't including the $(HEADER_DIR) in its check for various features, which was causing misdetection of a lot of things earlier (the poll_initwait() problem).

I made what I believe are the minimum possible changes in order to get it to compile and load cleanly against 2.6.29. It's also in a single, unified, patch, that covers all 5 of the known working VMware modules (ignore vmppuser, it's pretty much dead code, I don't know why VMware still ships it, since it's not used by vmware-modconfig in any way that I could find).

To use this patch, download it from the attachment, gunzip it, then go to your /usr/lib/vmware/modules/source directory. Untar all of the files. Apply the patch with "patch -p1". After the patch has applied, re-tar all the files. Then, run "vmware-modconfig --console --install-all" again, under Linux 2.6.29, and it should now work. Please let me know your results, if it doesn't work. I tested it on an x86_64 machine with VMware Workstation 6.5.1 and it worked, but anything else is untested.

Exercises left to the reader:

1) Make a script to help people install this patch easier. It's error-prone to have to untar and re-tar files by hand.

2) Add in the KERNEL_VERSION checks to the code. Right now, I changed it just for 2.6.29. It could be made portable to other kernel versions as well by isolating the 2.6.29 changes in their own #if blocks.

Hope this helps!

Josh

Reply
0 Kudos
43 Replies
gmarcotte3
Contributor
Contributor

uninstalled then installed again then ran the script it ran without any errors but after doing

vmware-modconfig --console --install-all

I get

.....

tmp/vmware-root/modules/vmmon-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’

include/linux/poll.h:67: note: previous declaration of ‘poll_initwait’ was here

/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1423: 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:1987: error: ‘struct task_struct’ has no member named ‘euid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘uid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘fsuid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘uid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘egid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘gid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘fsgid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘gid’

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:2007: error: too many arguments to function ‘smp_call_function’

make[2]: *** Error 1

make[1]: *** Error 2

make[1]: Leaving directory `/usr/src/kernels/2.6.29.4-167.fc11.i686.PAE'

make: *** http://vmmon.ko Error 2

make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'

Unable to install vmmon

~~~~(\_~~~~
Reply
0 Kudos
woopps
Contributor
Contributor

Thanks a lot, Krellan and bergerkos.

I installed VMWare 2.0.1 server on Fedora 11Kernel 2.6.29.4-167.fc11.x86_64 with Krellan's patch kit and bergerkos's trick. Everything went through smoothly.

Great job. All your efforts are greatly appreciated.

Reply
0 Kudos
gmarcotte3
Contributor
Contributor

got it to install and run by uninstalling VMworkstation. making sure /usr/lib/vmware/ was clean then reinstalled vmware 6.5 by doing:

  1. export LANG=C

then

  1. rpm -i VMware-Workstation-6.5.2-156735.i386.rpm

and it ran without any errors and the /usr/lib/vmware director

looks clean

then

  1. bash ./vmware-6.5.2-modules-2.6.29-fix.sh

and then

  1. vmware-modconfig --console --install-all

this ran ok then rebooted and try vmware load

and it works

~~~~(\_~~~~
Reply
0 Kudos
disruptor
Contributor
Contributor

Hi i've used the patch for linux distribution Mandriva 2009.1 with kernel 2.6.29.6-desktop-2mnb.

It works. I've used it as you describe .

Many thanks.

Reply
0 Kudos