I have installed Kali in VirtualBox and now trying to install Guest Additions to get full screen view.

I updated and installed my packages and installed dkms. When I try to install linux-headers I get the following:

# apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-4.14.0-kali1-amd64 is already the newest version (4.14.2-1kali1).
0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded.

The headers installed are as follows:

# dpkg --get-selections | grep linux-headers
linux-headers-4.14.0-kali1-amd64        install
linux-headers-4.14.0-kali1-common       install
linux-headers-amd64             install

When I try to run the Guest Additions CD I get the following:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.40 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.40 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
update-initramfs: Generating /boot/initrd.img-4.13.0-kali1-amd64
update-initramfs: Generating /boot/initrd.img-4.14.0-kali1-amd64
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Press Return to close this window...

It appears to me that the correct linux headers for the kernal are installed. Why is VBox not able to find them?

Tried updating to VBox 5.2.2 but after removing existing version and installing 5.2.2 I was unable to launch Kali-Linux - screenshot attached .

  • Upgrade virtualbox to VirtualBox 5.2.2 version (for windows or linux) virtualbox.org/wiki/Downloads theen install the guest addition.
    – GAD3R
    Dec 18, 2017 at 10:09
  • Make sure the guest additions are the right one for your Vbox Dec 18, 2017 at 10:26
  • VBox is VirtualBox Graphical User Interface Version 5.0.40_Ubuntu r115130 VBox additions is VBOXADDITIONS_5.0.40_115130
    – Chris Fgl
    Dec 19, 2017 at 9:10
  • After upgrading to 5.2.2 kali fails to launch. VBox reports "The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing" Running "/sbin/vboxconfig" did not help
    – Chris Fgl
    Dec 19, 2017 at 10:21
  • The headers for the current running kernel were not found: reboot first to have a new kernel (which had better be installed) matching the headers.
    – A.B
    May 13, 2022 at 11:46

2 Answers 2


You sould follow the tutorial to install VirtualBox Gest Additions on the Kali Linux Official Documentation.

The VirtualBox Guest Additions provide proper mouse and screen integration, as well as folder sharing, with your host operating system. To install them, proceed as follows.

Start up your Kali Linux virtual machine, open a terminal window and issue the following commands.

apt-get update
apt-get install -y virtualbox-guest-x11
  • Using the method in the official doc I get the exact same error....The installation fails during the installation of the main Guest Additions module, right after the script reports not being able to find the headers (however, this was also reported in the official documentation).
    – Chris Fgl
    Dec 19, 2017 at 9:56

if you believe u installed headers right then follow those steps

Cd /media/cdrom
sudo chmod +x VBoxLinuxAdditions.run // chmod: changing permissions of 'VBoxLinuxAdditions.run': Read-only file system. ignoere this message

sudo sh ./VBoxLinuxAdditions.run

after installation u have to reboot your system

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .