VMware Communities > VMTN > Desktop Products > VMware Workstation > Discussions

This Question is Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1 2 3 Previous Next
44 Replies Last post: Jan 10, 2008 1:10 PM by kirenaj
Reply

vmware WS6: kernel 2.6.22 - VMnet refuses to compile.

May 10, 2007 7:12 PM

Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
the problem when running vmware-config.pl so it can compile the modules:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.21-git13-SPTNK1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21'
CC [M] /tmp/vmware-config0/vmnet-only/driver.o
CC [M] /tmp/vmware-config0/vmnet-only/hub.o
CC [M] /tmp/vmware-config0/vmnet-only/userif.o
/tmp/vmware-config0/vmnet-only/userif.c: In function ‘VNetCopyDatagramToUser’:
/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘h’
/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘nh’
/tmp/vmware-config0/vmnet-only/userif.c:636: error: ‘const struct sk_buff’ has no member named ‘h’
make[2]: *** [/tmp/vmware-config0/vmnet-only/userif.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
Unable to build the vmnet module.

I have gone as far as removing the licensing restriction in paravirt_ops.c, and patching my kernel to git13 (which has the paravirt_ops patch aswell). This has removed the compiling error for vmmon's "unknown symbol" and many other problems for modules that use different licenses other than GPL.

It appears I'm unable to win having paravirt_ops enabled. Disabling it is the last resort... althrough I don't see any relevence between this and paravirt_ops. I have an idea what this is, but I'm at a loss as to where to start.

edit: I forgot to include I have CONFIG_COMPAT_VDSO disabled.

"# CONFIG_COMPAT_VDSO is not set"

info:

OS - ArchLinux 0.8, self maintained kernel.

uname -a
Linux SPUTNIK1 2.6.21-git13-SPTNK1 #1 PREEMPT Fri May 11 05:59:04 CST 2007 i686 AMD Athlon(tm) AuthenticAMD GNU/Linux

glib 1.2.10-6
glib2 2.12.12-1
glibc 2.5-8
gcc version 4.1.2 20070423 (prerelease)

VMware-workstation-6.0.0-45731

Any help would be greatly appreciated.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 10, 2007 9:35 PM
Click to view KevinG's profile Guru KevinG 16,980 posts since
Jan 8, 2004
VMware Moderator
Looks like you are using kernel 2.6.21 and not 2.6.22 as listed in the subject field. Did you disable paravirtualization support in the kernel config?
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 11, 2007 12:25 AM
in response to: KevinG
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
Ahh.. I just noticed the typo I made in the topic title. No, I'm running 2.6.21-git13. Vanilla 2.6.21 kernel from kernel.org and it's following patchset.

I haven't disabled paravirtualisation support within the kernel so that I may use the VMI. If I disable paravirtualisation the option to use VMI becomes disabled within menuconfig.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 12, 2007 3:24 AM
in response to: KevinG
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
To clarify, paravirtualisation has nothing to do with the compilation error.

I wanted to double check before posting, so I recompiled my kernel without paravirtualisation, and tried running vmware-config.pl again which returned the same result.

The only option I see would be downgrading the kernel to 2.6.20. I would like to avoid this and find someway to get 2.6.21 working if that's possible.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 13, 2007 12:40 PM
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
commit b0e380b1d8a8e0aca215df97702f99815f05c094
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue Apr 10 21:21:55 2007 -0700

[SK_BUFF]: unions of just one member don't get anything done, kill them

Renaming skb->h to skb->transport_header, skb->nh to skb->network_header and
skb->mac to skb->mac_header, to match the names of the associated helpers
(skb[_[re]set]_{transport,network,mac}_header).

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

commit cfe1fc7759fdacb0c650b575daed1692bf3eaece
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri Mar 16 17:26:39 2007 -0300

[SK_BUFF]: Introduce skb_network_header_len

For the common sequence "skb->h.raw - skb->nh.raw", similar to skb->mac_len,
that is precalculated tho, don't think we need to bloat skb with one more
member, so just use this new helper, reducing the number of non-skbuff.h
references to the layer headers even more.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


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

vmnet - userif.c

/*
* If truncation occurs, we do not bother with checksumming - caller cannot
* verify checksum anyway in such case, and copy without checksum it is
* faster.
*/
if (skb->pkt_type == PACKET_OUTGOING && /* Packet must be outgoing */
skb->ip_summed == VM_CHECKSUM_PARTIAL && /* Without checksum */
skb->h.raw != skb->nh.raw && /* We must know where header is */
skb->len == count) { /* No truncation may occur */
size_t skl;
int csum;
u_int16_t csum16;

skl = skb->h.raw - skb->data;
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
}

--------------------------------------------------------------------------------
vmnet - userif.c

which translates to:

/*
* If truncation occurs, we do not bother with checksumming - caller cannot
* verify checksum anyway in such case, and copy without checksum it is
* faster.
*/
if (skb->pkt_type == PACKET_OUTGOING && /* Packet must be outgoing */
skb->ip_summed == VM_CHECKSUM_PARTIAL && /* Without checksum */
skb->transport_header != skb->network_header && /* We must know where header is */
skb->len == count) { /* No truncation may occur */
size_t skl;
int csum;
u_int16_t csum16;

skl = skb->transport_header - skb->data;
if (VNetCopyDatagram(skb, buf, skl)) {
return -EFAULT;
}

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

additional files altered:

bridge.c
filter.c
vnetInt.h
smac_compact.c

those who wish to use the 2.6.21 kernel, you must patch your kernel to 2.6.22rc1. www.kernel.org - simply download the kernel 2.6.21 and download 2.6.21 RC1, then patch it.

you should have paravirtualisation enabled in your kernel, followed by the VMI. it is not required, and the vm-modules will still build. this fix applys to their vmnet. it is VERY important you patch your kernel to 2.6.22rc1 otherwise you'll get the famious GPL error if you choose to include paravirtualisation support.

download the file I have placed here into /usr/lib/vmware/modules/source/ and rerun vmware-config.pl

http://76.223.200.211:8001/vmware/vmnet.tar

my entire goal was to use paravirtualisation without the need of using a so called ''supported platform'' (ie *buntu) which is not an acceptable answer as I absolutely love ArchLinux, and like maintaining my own kernel.

I hope this will help others out there who are likeminded.

Message was edited by:
sputnik66

Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 15, 2007 4:29 AM
in response to: sputnik66
Click to view c_g-hills's profile Enthusiast c_g-hills 46 posts since
Nov 9, 2005
Here is a compatible vmxnet for 2.6.22-rc1 on VMware Workstation 6:-
http://chaz6.com/storage/files/vmxnet-2.6.22-rc1-vmws6.tar
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 15, 2007 9:13 AM
in response to: c_g-hills
Click to view c_g-hills's profile Enthusiast c_g-hills 46 posts since
Nov 9, 2005
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 17, 2007 7:36 PM
Click to view NigelCunningham's profile Novice NigelCunningham 24 posts since
Apr 19, 2007
I didn't try the above download, but have found (from trying to get Madwifi going too) that most people are doing less than is needed for 64 bit machines. For 64 bit, the code has been changed to use offsets for the various skb headers. This tarball:

http://stage.suspend2.net/downloads/all/vmnet.tar

Compiles on my AMD64 machine. (Not tried on 32 bit).

Nigel.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 20, 2007 7:03 AM
in response to: NigelCunningham
Click to view phbaer's profile Lurker phbaer 3 posts since
Mar 22, 2005
Here's yet another patch that works for me (2.6.22, AMD64):

http://npw.net/~phbaer/vmware-workstation-6.0_linux-kernel-2.6.22.patch

A tar is available as well:

http://npw.net/~phbaer/vmnet.tar

It has not yet been tested on a IA32 platform! Other patches I tried all generated dmesg messages like

...
[18015.990080] protocol 0608 is buggy, dev eth1
[18017.132883] protocol 0008 is buggy, dev eth1
...
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 24, 2007 4:42 PM
in response to: phbaer
Click to view schege's profile Lurker schege 3 posts since
Feb 12, 2007
Tested on IA32 and it works for me using 2.6.22-rc1.

Thanks
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 28, 2007 11:13 AM
in response to: schege
Click to view gruna's profile Novice gruna 7 posts since
May 28, 2007
Hi,

i do use kernel 2.6.22 and still get this message on my 32 bit:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmnet-only'
make -C /lib/modules/2.6.22-rc2-git7-43-default/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make -C ../../../linux-2.6.22-rc2-git7-43 O=../linux-2.6.22-rc2-git7-43-obj/i386/default modules
CC [M] /tmp/vmware-config1/vmnet-only/driver.o
CC [M] /tmp/vmware-config1/vmnet-only/hub.o
CC [M] /tmp/vmware-config1/vmnet-only/userif.o
/tmp/vmware-config1/vmnet-only/userif.c: In function ‘VNetCopyDatagramToUser’:
/tmp/vmware-config1/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘h’
/tmp/vmware-config1/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘nh’
/tmp/vmware-config1/vmnet-only/userif.c:636: error: ‘const struct sk_buff’ has no member named ‘h’
make[4]: *** [/tmp/vmware-config1/vmnet-only/userif.o] Fehler 1
make[3]: *** [_module_/tmp/vmware-config1/vmnet-only] Fehler 2
make[2]: *** [modules] Fehler 2
make[1]: *** [modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make: *** [vmnet.ko] Fehler 2
make: Leaving directory `/tmp/vmware-config1/vmnet-only'
Unable to build the vmnet module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 28, 2007 6:33 PM
in response to: gruna
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
my second connection's IP has changed. I will host this on my primary connection aswell when I return to my home (which will be in a few hours)

http://76.223.206.140:8001/vmware/vmnet.tar

be sure to replace the one in /usr/lib/vmware/modules/source/vmnet.tar with the above, then run vmware-config.pl again.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 28, 2007 10:01 PM
in response to: sputnik66
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 29, 2007 12:52 AM
in response to: sputnik66
Click to view gruna's profile Novice gruna 7 posts since
May 28, 2007
Thanks for help, but it still doesn't work.

make[1]: Entering directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make -C ../../../linux-2.6.22-rc2-git7-43 O=../linux-2.6.22-rc2-git7-43-obj/i386
/default modules
CC [M] /tmp/vmware-config4/vmnet-only/driver.o
CC [M] /tmp/vmware-config4/vmnet-only/hub.o
CC [M] /tmp/vmware-config4/vmnet-only/userif.o
CC [M] /tmp/vmware-config4/vmnet-only/netif.o
CC [M] /tmp/vmware-config4/vmnet-only/bridge.o
CC [M] /tmp/vmware-config4/vmnet-only/filter.o
/tmp/vmware-config4/vmnet-only/filter.c: In function ‘VNetFilterHookFn’:
/tmp/vmware-config4/vmnet-only/filter.c:232: error: ‘struct sk_buff’ has no memb er named ‘nh’
make[4]: *** [/tmp/vmware-config4/vmnet-only/filter.o] Fehler 1
make[3]: *** [_module_/tmp/vmware-config4/vmnet-only] Fehler 2
make[2]: *** [modules] Fehler 2
make[1]: *** [modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-rc2-git7-43-obj/i386/default'
make: *** [vmnet.ko] Fehler 2
make: Leaving directory `/tmp/vmware-config4/vmnet-only'
Unable to build the vmnet module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
Reply Re: vmware WS6: kernel 2.6.22 - VMnet refuses to compile. May 29, 2007 7:37 AM
in response to: gruna
Click to view sputnik66's profile Novice sputnik66 11 posts since
Apr 29, 2007
I see what's going on. It fails because I have the majority of options such as netfilter disabled in my kernel, which doesn't require additional changes to vmnet in order to compile on mine.

I only changed what was required for vmnet to compile on my system. I didn't take others into account and I appologise. Arrogance is not bliss.

Thanks for the output you've given. I will attempt to port the rest over as quickly as possible.
1 2 3 Previous Next
Actions