Persuading VMware Workstation 7.1 to cooperate with Linux kernel 2.6.35

This time compilation fails with:

make: Entering directory `/tmp/vmware-root/modules/vsock-only'
make -C /lib/modules/2.6.35/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux'
CC [M] /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:312: warning: initialization from incompatible pointer type
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:359: warning: initialization from incompatible pointer type
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamConnect':
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3224: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3247: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3259: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function 'VSockVmciAccept':
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3319: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3335: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3369: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function 'VSockVmciPoll':
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3467: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamSendmsg':
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4107: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4144: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4197: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamRecvmsg':
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4431: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4471: error: 'struct sock' has no member named 'sk_sleep'
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4537: error: 'struct sock' has no member named 'sk_sleep'
make[2]: *** [/tmp/vmware-root/modules/vsock-only/linux/af_vsock.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vsock-only] Error 2
make[1]: Leaving directory `/usr/src/linux'
make: *** [vsock.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'
Unable to install vsock

To fix this, you need to do the following (as root):

cd /usr/lib/vmware/modules/source
cp -a vsock.tar vsock-orig.tar
tar xf vsock.tar
cd vsock-only/linux
patch -p0 < /path/to/vsock.patch
cd ../..
tar cf vsock.tar vsock-only
rm -rf vsock-only
vmware-modconfig --console --install-all

You should now have modules properly compiled and loaded in kernel. You can find vsock.patch attached to this blog entry. Have fun!

AttachmentSize
vsock.patch3.65 KB

Comment viewing options

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

Great post

Thanks for this post.

It's work for me. I'm using Ubuntu 10.10 and kernel 2.6.35-24

Regards,

Nix

Works fine

Thank you,

works fine for gentoo-2.6.36-r3

Thanks works form me with root only

Thanks it works for me
but with su - "root"
didn't work with sudo "strange"

Thanks!

Thank you dude.

Thankx a LOT

Your patch works very good in Ubuntu 10.10 with VMPlayer 3.0.1 227600 i386 you save me cuz I almost give up trying VMplayer in Ubuntu

I'll bookmark this blog

I created a

I created a apply-vsock-patch.sh

cp -a /usr/lib/vmware/modules/source/vsock.tar /usr/lib/vmware/modules/source/vsock-orig.tar
tar xf /usr/lib/vmware/modules/source/vsock.tar
patch -p0 /usr/lib/vmware/modules/source/vsock-only/linux < vsock.patch
cd ../..
tar cf /usr/lib/vmware/modules/source/vsock.tar /usr/lib/vmware/modules/source/vsock-only
rm -rf /usr/lib/vmware/modules/source/vsock-only
vmware-modconfig --console --install-all

Launch it as 'sudo apply-vsock-patch.sh' having the vsock.patch in the same dir.

It's me again, I've realized

It's me again, I've realized that the command "tar xf /usr/lib/vmware/modules/source/vsock.tar" does not work properly because extracts the content in the current folder instead of under source folder, so don't use the script, it needs improvement.

Thanks

It works like a charm (vmware workstation 7.1.1), you saved my day, thanks man

Thank you!

It works also for VMware Player 3.1 on Ubuntu Maverick Alpha 3.

Thanks again,
Dan.

Thanks, will try this patch

Thanks, will try this patch :)

VMware Workstation compile patch for 2.6.35

Sorry

/usr/lib/vmware/modules/source$ sudo 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.35-020635-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.35-020635-generic'
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: 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: 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: 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-headers-2.6.35-020635-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon
marty@ubuntu1:/usr/lib/vmware/modules/source$ vmware-modconfig --console --install-all

arch solution is better

hello, i did try the archlinux solution. and works perfect on Ubuntu 10.10 maverick beta 2.6.35-19 generic.

have fun

---------------------------------------

Hi srivo,

I update my system this morning, and it seems I have the same issue, I could not make the module for my kernel 2.6.35
I try to start vmplayer in a console so i can see that the compilation error is due to function iommu_{un}map_range

I could find on the kernel 2.6.35 this:
iommu-api: Remove iommu_{un}map_range functions

These functions are not longer used and can be removed
savely. There functionality is now provided by the
iommu_{un}map functions which are also capable of multiple
page sizes.

But don't worry, again with arch a solution exist and are discribe wink
I found in the wiki page of archlinux (http://wiki.archlinux.org/index.php/Vmw … are_Player):

For 2.6.35 kernel and VMware7.1.1, there's a script to patch the VMware sources :

$ cd /tmp
$ wget http://www.sputnick-area.net/scripts/vmware7.1.1-patch-kernel-2.6.35.bash
# chmod +x vmware7.1.1-patch-kernel-2.6.35.bash
# ./vmware7.1.1-patch-kernel-2.6.35.bash

I do it and after i execute:
# vmware-modconfig --console --install-all

All modules was recompile without any issue. VMWare player run well know.

------------------------------------

Here is the original post and solution

https://bbs.archlinux.org/viewtopic.php?id=103519

Hi You can try to apply this

Hi

You can try to apply this patch to the vmmon sources.

thanks that worked well in

thanks that worked well in combination of the one in the first thread

Strange mine is working, even

Strange
mine is working, even with 2.6.35.1 and VMWare 7.1.1, the latest update today

ìt worked on Vmware workstation 7.1.2

Just tried the solution as described for 7.1.1 and worked fine.

Theres one error regarding vsock-only but so far it worked fine ( I couldn't notice any performance or connectivity problem)

Here is the error reported but like I said VMware started normally.

make -C /lib/modules/2.6.35-22-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.35-22-generic'
CC [M] /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciStreamConnect’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3233: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3256: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3268: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciAccept’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3328: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3344: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3378: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciPoll’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3476: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciStreamSendmsg’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4116: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4153: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4206: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciStreamRecvmsg’:
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4440: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4480: error: ‘struct sock’ has no member named ‘sk_sleep’
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:4546: error: ‘struct sock’ has no member named ‘sk_sleep’
make[2]: *** [/tmp/vmware-root/modules/vsock-only/linux/af_vsock.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vsock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-22-generic'
make: *** [vsock.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'
Unable to install vsock
root@armagedon:/usr/lib/vmware/modules/source# make[1]: Entering directory `/usr/src/linux-headers-2.6.35-22-generic'
> CC [M] /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciStreamConnect’:
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3233: error: ‘struct sock’ has no member named ‘sk_sleep’
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3256: error: ‘struct sock’ has no member named ‘sk_sleep’
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3268: error: ‘struct sock’ has no member named ‘sk_sleep’
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c: In function ‘VSockVmciAccept’:
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3328: error: ‘struct sock’ has no member named ‘sk_sleep’
> /tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:3344: error: ‘struct sock’ has no member named ‘sk_sleep’

Works on 2.6.35-27

Applied Arch solution and got same error regarding vsock not being able to install, but vmware workstation loads fine.