VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1 2 Previous Next 23 Replies Last post: Jun 9, 2009 11:46 PM by mierzenp  

[Linux] After upgrading kernel from 2.6.28 (stab) to 2.6.29-rc1 / Vmware compile problem posted: Jan 11, 2009 3:11 PM

Click to view mierzenp's profile Novice 7 posts since
Jan 11, 2009
Hi,

I know this is Relase Candidate 1 Kernel, but i can't compile vmmon.ko using vmware-config.pl.
The same config i've used for previus stabile kernel
OS: Slackware 12.2 @ S5000VSASATA
VmWare ver: VMware-server-2.0.0-122956.i386.tar.gz
GCC version 4.2.4

root@server:~# vmware-config.pl
Making sure services for VMware Server are stopped.

Stopping VMware autostart virtual machines:
Virtual machines FAILED
Stopping VMware management services:
VMware Virtual Infrastructure Web Access
VMware Server Host Agent FAILED
Stopping VMware services:
+VMware Authentication Daemon OK +
+VM communication interface socket family: OK +
+Virtual machine communication interface OK +
+Virtual machine monitor OK +
+Bridged networking on /dev/vmnet0 OK +
+Host network detection OK +
+Bridged networking on /dev/vmnet2 OK +
+Virtual ethernet OK +

None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? yes

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel?
[/lib/modules/2.6.29-rc1-uniserver-XeonS5000VSA-SATAfix-test/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /lib/modules/2.6.29-rc1-uniserver-XeonS5000VSA-SATAfix-test/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.29-rc1'
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:31:
/tmp/vmware-config1/vmmon-only/./include/compat_wait.h:78: error: conflicting types for 'poll_initwait'
include/linux/poll.h:67: error: previous declaration of 'poll_initwait' was here
In file included from /tmp/vmware-config1/vmmon-only/./common/vmx86.h:31,
from /tmp/vmware-config1/vmmon-only/linux/driver.h:29,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:101:
/tmp/vmware-config1/vmmon-only/./include/x86apic.h:97:1: warning: "APIC_BASE_MSR" redefined
In file included from /usr/src/linux-2.6.29-rc1/arch/x86/include/asm/fixmap_32.h:29,
from /usr/src/linux-2.6.29-rc1/arch/x86/include/asm/fixmap.h:5,
from /usr/src/linux-2.6.29-rc1/arch/x86/include/asm/apic.h:8,
from /usr/src/linux-2.6.29-rc1/arch/x86/include/asm/smp.h:13,
from include/linux/smp.h:33,
from include/linux/topology.h:33,
from include/linux/mmzone.h:767,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /tmp/vmware-config1/vmmon-only/./include/compat_module.h:27,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:26:
/usr/src/linux-2.6.29-rc1/arch/x86/include/asm/apicdef.h:132:1: warning: this is the location of the previous definition
/tmp/vmware-config1/vmmon-only/linux/driver.c: In function 'LinuxDriverSyncCallOnEachCPU':
/tmp/vmware-config1/vmmon-only/linux/driver.c:1423: error: too many arguments to function 'smp_call_function'
/tmp/vmware-config1/vmmon-only/linux/driver.c: In function 'LinuxDriver_Ioctl':
/tmp/vmware-config1/vmmon-only/linux/driver.c:1987: error: 'struct task_struct' has no member named 'euid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1987: error: 'struct task_struct' has no member named 'uid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1988: error: 'struct task_struct' has no member named 'fsuid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1988: error: 'struct task_struct' has no member named 'uid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1989: error: 'struct task_struct' has no member named 'egid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1989: error: 'struct task_struct' has no member named 'gid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1990: error: 'struct task_struct' has no member named 'fsgid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:1990: error: 'struct task_struct' has no member named 'gid'
/tmp/vmware-config1/vmmon-only/linux/driver.c:2007: error: too many arguments to function 'smp_call_function'
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** _module_/tmp/vmware-config1/vmmon-only Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.29-rc1'
make: *** http://vmmon.ko Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/go/unsup-linux-products" and
"http://www.vmware.com/go/unsup-linux-tools".

Execution aborted.

So, thats all ;) Any ideas, patches :)

Click to view stericho's profile Lurker 5 posts since
Jan 31, 2005
Same here.

Patching the *ID stuff isn't too hard.


But somehow also the compat stuff fails.

Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Ok, I hate to say "SOLVED" because I've only got VMMON and VMNET working with 2.6.29-rc1. For me that is good enough to use it for now :)

Please be kind and gentle. This is not what I do for a living. The Linux kernel data structures are evolving (in a good direction I think) -- I just haven't kept up with them.

If it works for you I am very happy. If it doesn't and you're a coder, PLEASE FIX, and tell me what I did wrong (and there's one #warning where I couldn't figure out something).

Thanks.

Ehud

P.S. I attached it, but just in case it gets corrupt, here's a link to it as well.

P.P.S. I did not TEST the patch. I merely diffed the source vmmon-only and vmnet-only directories after fixing them so the modules build and install.

vmware 2.6.29-1 patch for vmware workstation 6.5.1 x86_64

Attachments:
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008
I have vmblock done but can't seem to get the patch generated. Working on it.

E

Click to view stericho's profile Lurker 5 posts since
Jan 31, 2005
Great work, Ehud!

Will test this evening, though your attached patch contains a diff between an old patch in /tmp/old and the actual one.

A hint for diff'ing: copy the whole untar'ed vmmon-only folder to vmmon-only.orig, and diff the folder, like

cp -R vmmon-only vmmon-only.orig
# edit stuff in vmmon-only
diff -Naur vmmon-only.orig vmmon-only > foo.patch
Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Yes, thank you for your help!

Attached is a patch that allows vmmon, vmnet, vmblock, and vmci to build on 2.6.29-rc2. There is one thing in vmnet I did not figure out so it will print out:

warning EHUD gotta figure out what this does and how to fix it: atomic_add(skb->truesize, &sk->sk_wmem_alloc);

Not that I'm lazy, it was just very late after a few days it all started swimming together and when I was doing diffs I was doing diffs against identical copies I'd already cp -r'd and then I'd get zero size diffs, and then when I tried to fix it I was getting huge diffs because I wasn't taking stuf out of /orig that I hadn't changed. In short, I was tired but figured it was a start and others could use it.

This is a better start ;)

Regards,

Ehud

Caveats: This has only been tested with vmware-workstation-6.5.1-126130 on x86_64 arch. It should provide concepts that should allow it to port anywhere else even if the patch itself is not directly applicable. I'm happy to accept advice. I'm not so good on "why" since kernel structures change faster than I can keep up with them (and this evolution is a good thing!)

Click to view stericho's profile Lurker 5 posts since
Jan 31, 2005

Thanks a lot, Ehud. Great stuff!

Just tested it, and it works (running windows 7 beta and a FreeBSD VM), but I also only have a 64bit host machine to test it.

Just the fix for the vsock module was missing, and there was some cruft in the patch caused by some already compiled .o files in your folder(s)

I allowed myself to modify your patch with those things changed. Attached.

Thanks again!


Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Awesome! Thanks for fixing it!!

Ehud

Click to view sedorox's profile Novice 12 posts since
Feb 19, 2006

This patch worked for me. However, it worked for me for Workstation, yet this is listed under VMWare Server. I almost didn't find it! Hopefully someone from VMWare will see this, and by the time 2.6.29 is released, a new release of 6.5 is out there.

I'm compiling against:

Linux PC010233L 2.6.29-rc3-zen1-1-07438-g2953ca1 #1 SMP PREEMPT Mon Feb 2 16:37:24 EST 2009 x86_64 Intel(R) Core(TM)2 Duo CPU E8200 @ 2.66GHz GenuineIntel GNU/Linux

I think I might link to this from the Workstation forums, this way others who might have the problem, can patch it.

And it took me a while to figure our how to patch it, as you guys didn't give directions, and I'm not 100% up on patching :p But I got it! Yay!

Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

Congratulations on figuring out how to do it! There are plenty of patch threads and I didn't want to seem redundant.

I only posted it here because this was the only thread about 2.6.28... and I figured I'd help the OP out with my patch from Workstation.

Feel free to link. Next time I'll do what I should have done which is open a thread in Workstation and link back to it here :)

E

P.S. It works on 2.6.29-rc2 and 2.6.29-rc3 also

Click to view vouchy's profile Lurker 1 posts since
Feb 13, 2009

Hi,

I am a newby How do I patch the file with .patch file provided??

Regards

vouchy

Click to view csh-harmful's profile Lurker 1 posts since
Feb 6, 2006
Is there any patch available for VMware Server2 and kernel 2.6.29 release ?
Click to view seddy's profile Lurker 2 posts since
Mar 27, 2009

Same problem here:

Debian Lenny/Squeeze, Kernel 2.6.29

make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Fehler 1
make[1]: *** _module_/tmp/vmware-config0/vmmon-only Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.29'
make: *** http://vmmon.ko Fehler 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.


Click to view Ehud's profile Novice 16 posts since
Feb 27, 2008

There is a patch posted here somewhere that works just fine, and has worked for me from 2.6.29-rc1 through 2.6.29(release).

vmware-workstation-6.5.1.126130-2.6.29_x86_64.patch

Ehud

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities