Locating kernel headers for vmware tools on an uekr3 oracle linux 6.7

Continuing, if you like, on an admin topic concerning UEKR3 Oracle Linux 6.5, see: Missing kernel-firmware 3.8.13-16.2.1.el6uek on Oracle Linux 6.5, I’ going to give a recipe and some explanations for getting vmtools modules successfully built in a VMware guest after complains about an invalid kernel header path.
Immediately after installing vmtools in a VMware guest, usually using /vmware-tools-distrib/vmware-install.pl, another script, usually /vmware-tools-distrib/bin/vmware-config-tools.pl comes up, asking whether you want to configure vmtools just now. Configuration essentially comprises the opt-in/out of functionality as well as building and integration of kernel modules into the running kernel. Iff you furthermore run a recent UEKR3 kernel without the according development packages, the console output may read like this:

...
Before you can compile modules, you need to have the following installed... 
make
gcc
kernel headers of the running kernel

Search in repoquery --list kernel-uek-devel-3.8.13-68.3.5.el6uek.x86_64 for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
The path "" is not a valid path to the 3.8.13-68.3.5.el6uek.x86_64 kernel headers.
Would you like to change it? [yes] y

Enter the path to the kernel header files for the 3.8.13-68.3.5.el6uek.x86_64 kernel
/usr/include/linux

The path "/usr/include/linux" is not a valid path to the 3.8.13-68.3.5.el6uek.x86_64 kernel headers.
Would you like to change it? [yes] n

WARNING: This program cannot compile any modules for the following reason(s)...

- This program could not find a valid path to the kernel headers of the running
kernel.  Please ensure that the header files for the running kernel are 
installed on this sytem.

[ Press Enter key to continue ] 

What actually happens here is quite simple but however also expressed in a misleading way such that she/he may just suppose, installing the kernel headers will fix the problem (I even tried this /usr/include/linux thing, as of the old days, won’t work you see, is none of uekr3 anyway).

Yet another roadblock comes up when a repoquery against kernel-uek-headers-3.8.13-68.3.5.el6uek.x86_64 delivers no result. In fact, repoquery will return a result for kernel headers only up to UEKR3 release 3.8.13-26.2.4.

[root@anaconda ~]# repoquery kernel-uek-headers-3.8.13-68.3.5.el6uek.x86_64

[root@anaconda ~]# repoquery kernel-uek-headers-3.8.13-26.2.4.el6uek.x86_64
kernel-uek-headers-0:3.8.13-26.2.4.el6uek.x86_64

Ooohm? Not nexessary. The point is, that the kernel-uek-headers* package has been discontinued and the wanted uek kernel header files reside with the kernel-uek-devel* package now (and even before). Ok, so, a repoquery --list for kernel-uek-devel-3.8.13-68.3.5.el6uek.x86_64 will then success in listing all those longed for kernel headers like /usr/src/kernels/3.8.13-68.3.5.el6uek.x86_64/include/uapi/linux/byteorder/big_endian.h and so on and on.

Next now is a c&p-template for release numbers and a yum install

[root@anaconda bin]# yum list kernel-uek.*
Loaded plugins: refresh-packagekit, security, ulninfo
Installed Packages
kernel-uek.x86_64   3.8.13-55.el6uek       @public_ol6_UEKR3_latest
kernel-uek.x86_64   3.8.13-55.1.5.el6uek   @public_ol6_UEKR3_latest
kernel-uek.x86_64   3.8.13-68.3.5.el6uek   @public_ol6_UEKR3_latest

[root@anaconda ~]# yum install kernel-uek-devel-3.8.13-68.3.5.el6uek.x86_64
...

… as well as restarting /vmware-tools-distrib/bin/vmware-config-tools.pl, will will yet automatically show the correct value for the kernel header path.

...
Searching for a valid kernel header path...
Detected the kernel headers at 
"/lib/modules/3.8.13-68.3.5.el6uek.x86_64/build/include".
The path "/lib/modules/3.8.13-68.3.5.el6uek.x86_64/build/include" appears to be
a valid path to the 3.8.13-68.3.5.el6uek.x86_64 kernel headers.
Would you like to change it? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-GZ77nv/vmhgfs-only'
/usr/bin/make -C /lib/modules/3.8.13-68.3.5.el6uek.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/3.8.13-68.3.5.el6uek.x86_64'
...

That’s it, have fun. Peter

One comment

  1. Buddy Thank you so much! I had a VM that’s built on VirtualBox using CentOS and last two hours I was just trying to find a solution (Not VMWare). Your solution works for VirtualBox also. If you may allow, I would like reblog this solution with my blog also.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.