Login Main site Create account

29.06.2007 12:33

Updating VMware Tools to compile under 2.6.21.5


Today I deployed a new virtual machine on our ESX hosts at work. This time it should be a linux guest (Debian 4.0) with the most recent stable kernel version (2.6.21.5) but when trying to install the VMware tools package (VMware Tools 3.0.1 build-43424) some of the provided kernel modules (namely vmmemctl, vmhgfs and vmxnet) refused to compile on 2.6.21.5.

Fortunately, there was not much todo to make them compile again but I wasn't able to find a working patch in the VMware community forums nor anywhere else, so I want to provide the updated module sources here for your convenience.

1. vmmemctl

The following error messages appear when trying to compile the vmmemctl module:
Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
make -C /lib/modules/2.6.21.5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21.5'
  CC [M]  /tmp/vmware-config0/vmmemctl-only/os.o
/tmp/vmware-config0/vmmemctl-only/os.c:26:26: error: linux/config.h: No such file or directory
make[2]: *** [/tmp/vmware-config0/vmmemctl-only/os.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmemctl-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
make: *** [vmmemctl.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
Downloads:


2. vmhgfs

The following error messages appear when trying to compile the vmhgfs module:
Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.21.5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21.5'
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/dev.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/driver.o
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsChangeFileAttributes':
/tmp/vmware-config0/vmhgfs-only/driver.c:763: error: 'struct inode' has no member named 'i_blksize'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsInitializeInode':
/tmp/vmware-config0/vmhgfs-only/driver.c:835: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsIget':
/tmp/vmware-config0/vmhgfs-only/driver.c:884: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsCreate':
/tmp/vmware-config0/vmhgfs-only/driver.c:1535: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsLookup':
/tmp/vmware-config0/vmhgfs-only/driver.c:1635: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsMkdir':
/tmp/vmware-config0/vmhgfs-only/driver.c:1727: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsDelete':
/tmp/vmware-config0/vmhgfs-only/driver.c:1854: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsRename':
/tmp/vmware-config0/vmhgfs-only/driver.c:2046: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c:2048: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsRevalidate':
/tmp/vmware-config0/vmhgfs-only/driver.c:2288: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsSetattr':
/tmp/vmware-config0/vmhgfs-only/driver.c:2425: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsOpen':
/tmp/vmware-config0/vmhgfs-only/driver.c:2801: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsDirOpen':
/tmp/vmware-config0/vmhgfs-only/driver.c:3414: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsClearInode':
/tmp/vmware-config0/vmhgfs-only/driver.c:4105: error: 'struct inode' has no member named 'u'
/tmp/vmware-config0/vmhgfs-only/driver.c: At top level:
/tmp/vmware-config0/vmhgfs-only/driver.c:4245: warning: initialization from incompatible pointer type
/tmp/vmware-config0/vmhgfs-only/driver.c: In function 'HgfsGetSb':
/tmp/vmware-config0/vmhgfs-only/driver.c:4454: error: too few arguments to function 'get_sb_nodev'
/tmp/vmware-config0/vmhgfs-only/driver.c: At top level:
/tmp/vmware-config0/vmhgfs-only/driver.c:4500: warning: initialization from incompatible pointer type
make[2]: *** [/tmp/vmware-config0/vmhgfs-only/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
Unable to build the vmhgfs module.
Downloads:


3. vmxnet

The following error messages appear when trying to compile the vmxnet module:
Building the vmxnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config2/vmxnet-only'
make -C /lib/modules/2.6.21.5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21.5'
  CC [M]  /tmp/vmware-config2/vmxnet-only/vmxnet.o
/tmp/vmware-config2/vmxnet-only/vmxnet.c:11:26: error: linux/config.h: No such file or directory
/tmp/vmware-config2/vmxnet-only/vmxnet.c: In function 'vmxnet_open':
/tmp/vmware-config2/vmxnet-only/vmxnet.c:813: warning: passing argument 2 of 'request_irq' from incompatible pointer type
/tmp/vmware-config2/vmxnet-only/vmxnet.c: In function 'vmxnet_tx':
/tmp/vmware-config2/vmxnet-only/vmxnet.c:945: error: 'CHECKSUM_HW' undeclared (first use in this function)
/tmp/vmware-config2/vmxnet-only/vmxnet.c:945: error: (Each undeclared identifier is reported only once
/tmp/vmware-config2/vmxnet-only/vmxnet.c:945: error: for each function it appears in.)
make[2]: *** [/tmp/vmware-config2/vmxnet-only/vmxnet.o] Error 1
make[1]: *** [_module_/tmp/vmware-config2/vmxnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21.5'
make: *** [vmxnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config2/vmxnet-only'
Unable to build the vmxnet module.
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-3.0.1-43424.tar.gz /tmp
cd /tmp
tar xzf VMwareTools-3.0.1-43424.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.
Comments added earlier to http://tuxx-home.at/archives/2007/06/29/T12_33_53/index.html:
Guest on 2007-07-12 14:52:22 wrote:
Hi Alexander,

I just got 2.6.21-2 from testing and I have similar, but different problems. This is the first error I got:

[code]
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.21-2-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.21-2-686'
CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:80:
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.21-2-686'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.
[/code]

Any idea what I can do to make it work?
Alexander Griesser on 2007-07-13 09:28:50 wrote:
Unfortunately, the vmmon module is not part of the ESX vmware tools and
therefore I couldn't test it, but vmware-any-any-update109 seems to make it
work again. It can be downloaded from

http://ftp.cvut.cz/vmware/

Please check for the latest version of vmware-any-any-update in this directory,
extract it and run "runme.pl" to patch your installed sources accordingly.

On my system it compiled flawlessly.
Guest on 2007-07-20 22:45:14 wrote:
Hello!

I'd like to thank you very much for your help, it worked fine :-D

Bye.

Douglas
Guest on 2007-08-01 10:09:01 wrote:
Hello,
It worked fine too with my Trustix Secured Linux 3.05 with modified kernel 2.6.19.7-2tr.
Thank's a lot !

Myrmex
Guest on 2007-08-15 09:56:32 wrote:
I've had the same problem(using debian testing) like the post #2 and vmware-any-to-any helped!
Now it works just great! thanks a lot!
Guest on 2007-08-16 11:11:45 wrote:
Worked like a charm on Vmware Server 1.01. Thank you, couldn't have gotten this myself.
Guest on 2007-08-31 13:21:45 wrote:
Greetings,

Your fix also worked on :
Windows XP Pro SP2 host
VMWare server 1.03.44356
Ubuntu guest with kernel 2.6.20-16

Problem was vmware tools problems 2 and 3 above.

You seem to be the only guy out there who has this issue nailed.

Many thanks. I owe you one.
Scott

Alexander Griesser on 2007-08-31 14:40:24 wrote:
Thanks for all your feedback. I'm really wondering why noone else (especially
VMware itself) doesn't fix that on their own :-/
Guest on 2007-09-06 22:17:16 wrote:
Thank you! This solved my problem. I have the same guest cfg as 2007-08-31 13:21:45.
Guest on 2007-09-25 20:58:36 wrote:
super helpful. thank you.
Guest on 2007-10-17 16:08:59 wrote:
Brilliant! Worked a treat on following setup:

Host: VMWare ESX Server 3.01
Guest: Fedora Core 6
Kernel: 2.6.22.9-61

Fantastic work, thank you soooo much.
Guest on 2007-12-05 09:36:25 wrote:
very thanks

from switzerland :)
Guest on 2008-01-25 14:45:28 wrote:
Can you provide them for 2.6.20-15 as well please?
Alexander Griesser on 2008-01-25 17:15:09 wrote:
The vmware tools should work on 2.6.20-15 out of the box. If they don't, please describe the problem when compiling and/or installing them in more detail at http://forum.tuxx-home.at/.
Guest on 2008-02-12 17:47:19 wrote:
Hi, I encountered the 2nd problem, and installed the modified version of vmhgfs module. Running vmware-config-tools.pl produced the following. Thanks in advance.
Vilho

...

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config25/vmhgfs-only'
make -C /lib/modules/2.6.23.15-137.fc8/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.23.15-137.fc8-x86_64'
CC [M] /tmp/vmware-config25/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config25/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config25/vmhgfs-only/dev.o
CC [M] /tmp/vmware-config25/vmhgfs-only/driver.o
/tmp/vmware-config25/vmhgfs-only/driver.c:4263: warning: initialization from incompatible pointer type
/tmp/vmware-config25/vmhgfs-only/driver.c: In function ‘HgfsGetSb’:
/tmp/vmware-config25/vmhgfs-only/driver.c:4477: warning: return makes pointer from integer without a cast
/tmp/vmware-config25/vmhgfs-only/driver.c: At top level:
/tmp/vmware-config25/vmhgfs-only/driver.c:4526: warning: initialization from incompatible pointer type
CC [M] /tmp/vmware-config25/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/vmware-config25/vmhgfs-only/main.o
CC [M] /tmp/vmware-config25/vmhgfs-only/staticEscape.o
LD [M] /tmp/vmware-config25/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware-config25/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/vmware-config25/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.23.15-137.fc8-x86_64'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config25/vmhgfs-only'
Unable to make a vmhgfs module that can be loaded in the running kernel:
insmod: error inserting '/tmp/vmware-config25/vmhgfs.o': -1 File exists
There is probably a slight difference in the kernel configuration between the
set of C header files you specified and your running kernel. You may want to
rebuild a kernel based on that directory, or specify another directory.
Alexander Griesser on 2008-02-12 18:31:57 wrote:
According to the insmod error reported above it seems as if vmhgfs is already loaded on your system and therefore vmware-config-tools.pl is unable to load it. The compilation of the module worked fine, just a few warnings, nothing to really care about.

Please make sure that the vmware tools are stopped when trying to compile the modules again for your running kernel. Check with `lsmod | grep vm` and if necessary, manually unload them first using `rmmod`.
Guest on 2008-02-17 21:18:45 wrote:
After a few iterations i got them compiled and installed but:
it says in the bar in the bottom of vm window "Your VMware Tools are out dated" (or similar), or "You do not have VMware Tools installed".

I'm using VMware Server 1.0.4 so maybe there are some significant differences between workstation and server..

Vilho
Alexander Griesser on 2008-02-18 08:57:20 wrote:
Then you didn't install the latest available tools in your guest OS.
In the VMware Server console, you should be able to mount the vmware tools iso image into your guest OS (VM -> Install/Upgrade VMware Tools). Check the version there and try to compile this version for your running guest. If you experience troubles, please follow up at http://forum.tuxx-home.at/ as debugging such issues in here is painful (the comment system isn't suitable for this ;) ).
Guest on 2008-03-03 20:51:41 wrote:
Actually I had the same issue on the latest version of VMware Server 1.0.4. The VMWare Tools version included is VMwareTools-1.0.4-56528.tar.gz. I am running Fedora 8 guest kernel 2.6.23.15-137 in Windows Server 2003 host.<BR /><BR />I was able to resolve the vmxnet compilation issues simply by yumming identical versions of kernel and kernel-devel. That module works ok.<BR /><BR />For vmhgfs, I was receiving the identical error to the original post above. After downloading the patched tar file, I received the same insmod error documented by \"Guest on 2008-02-12 17:47:19\" above. And I too noticed that my VMware Tools were \"out of date\". The solution was to just download and run the patch instead - the tar file posted above is apparently from a slightly older version. Then vmhgfs-only/driver.o compiles cleanly and the kernel module loads without error - but when the guest operating system daemon attempts to start I see lots of debug messages on the console and <BR />the service cannot start.<BR />
Alexander Griesser on 2008-03-04 09:57:12 wrote:
Thanks for clearing this up!
Guest on 2008-03-17 21:59:34 wrote:
I've seen "fixes" for this around the net, but nobody thought of providing the new tar balls. I followed everything in other instructions I found around the net, but to no avail could get the vmxnet library working. Your fix was perfect for Ubuntu 7.10 (gutsy gibbon) 2.6.22
Alexander Griesser on 2008-03-17 23:27:34 wrote:
I'm happy to hear that I could help you :) Please bookmark my VMware updates project page at:

http://projects.tuxx-home.at/?id=vmware_updates

All latest updates, etc. can be found there.

Your comment (HTML tags will be stripped !!):

To verify You are not a bot, type down text from this image.

Your try: