Tuesday, February 26, 2008


Paolo Conti wrote how to hack VMware tools to work on linux kernels 2.6.18

[CITATION FROM http://www.atlink.it/~conti/2007/12/19/vmware-uts_release/]

Well, VMWare tools sometimes fails to install into a Linux guest with recent kernel.

The error is something like this: The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version Even if the module were to compile successfully, it would not load into the running kernel.

With this bug you cannot sync the time with your hosting server, automate shutdown tasks, etc… This problem exist because the kernel source code structure is changed in recent kernels (I guess > 2.6.18). The VMWare tools installation script is looking for the string “#define UTS_RELEASE $kernel_number” into /usr/src/kernels/$(uname -r)*/include/linux/version.h but the UTS_RELEASE variable is now into the file utsrelease.h.

To fix this, you can patch the VMWare tools installation script or just add the content of utsrelease.h to version.h. I suppose the second solution is the fastest one :)

To do this:

cd /usr/src/kernels/$(uname -r)*/include/linux
cat utsrelease.h >> version.h

Happy virtualization folks! :)

No comments: