Building the main Guest Additions module ...fail!

The Guest Additions may not compile on Linux kernels newer than those they were designed for. Therefore it is not unusual that older version of VirtualBox are unable to run a guest with a newer Kernel.

Quite a few of those incompatibilities were fixed in more recent releases.

To take advantage of this, and to be able to run Ubuntu 13.04 (or later) upgrading your VirtualBox software is recommended. You can download the most recent version from here:

  • Oracle Virtual Box: Downloads

just run a simple command in terminal -

sudo apt-get install virtualbox-guest-x11

After completion, reboot your virtual box.


The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.

Use

sudo apt-get install linux-generic

linux-generic is a meta-package that depends on latest kernel image and headers. Thus, it will install needed packages to compile VirtualBox additions kernel module.


If anyone still having problems, this fixed it for me:

sudo apt-get install build-essential module-assistant

Source.