Missing Kernel Header when installing VBox-Guest Extensions on CentOS
When installing the VirtualBox guest-extensions on a fresh CentOS installation the installer asks for the kernel headers to compile the necessary modules. To install these just type:
yum install kernel-devel kernel-headers
Here is the important part: when the installer for the guest-extensions keeps complaining that The headers for the current running kernel were not found you need to update your CentOS system first!
yum update # updates the complete system
What happened here? The kernel headers from the repository are newer than the currently installed kernel (remember, fresh install). So either you install the kernel headers version specific for that kernel (not recommended) or you just update the kernel to the most recent version.