Wanna see this logo while booting your 2.6 kernel? Click here!

08.08.2007 15:42

VMware Tools 6.0.0-45731: vmxnet doesn't compile on 2.6.22, patch available


Today someone sent me an e-mail requesting information on about how to compile the VMware Tools 6.0.0-45731 with linux kernel 2.6.22 headers.
First I tried all modules separately and found out, that - on my system - all of them compiled fine, but vmxnet didn't. The error messages were:

vi-edv003:/tmp/vmtest/vmxnet-only# make
Using 2.6.x kernel build system.
make -C /lib/modules/2.6.22.1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22.1'
  CC [M]  /tmp/vmtest/vmxnet-only/vmxnet.o
/tmp/vmtest/vmxnet-only/vmxnet.c: In function 'vmxnet_tx':
/tmp/vmtest/vmxnet-only/vmxnet.c:1220: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1222: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1223: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1226: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1367: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1368: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1368: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1368: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1368: error: 'struct sk_buff' has no member named 'nh'
/tmp/vmtest/vmxnet-only/vmxnet.c:1445: error: 'struct sk_buff' has no member named 'h'
/tmp/vmtest/vmxnet-only/vmxnet.c:1446: error: 'struct sk_buff' has no member named 'h'
make[2]: *** [/tmp/vmtest/vmxnet-only/vmxnet.o] Error 1
make[1]: *** [_module_/tmp/vmtest/vmxnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.1'
make: *** [vmxnet.ko] Error 2
vi-edv003:/tmp/vmtest/vmxnet-only#

Well, sk_buff, my good old friend :)
It wasn't very difficult to patch and therefore I'll provide the patch plus an updated tarball for vmxnet here for your convenience:
Downloads:

Installation Instructions

1. Click on the "Install VMware Tools" option in your Virtual Machine

2. Mount the VMware Tools CD
mount /cdrom

3. Copy the tar.gz file to a temporary location and extract it

cp /cdrom/VMwareTools-6.0.0-45731.tar.gz /tmp
cd /tmp
tar xzf VMwareTools-6.0.0-45731.tar.gz

4. Replace the shipped tarballs with the ones you downloaded here
cp /where/you/downloaded/my/tarballs/*.tar /tmp/vmware-tools-distrib/lib/modules/source

5. Install VMware Tools
cd /tmp/vmware-tools-distrib
./vmware-install.pl

After you did that, all modules should compile flawlessly.
If they don't, don't hesitate to contact me.