This is my setup.
Host Guest
Ubuntu 12.04 LTS Kali Linux Gnome 3.22.2
3.11.0-26-generic 4.9.0-kali3-amd64
Now that I had installed virtualbox in host and booted into the guest OS successfully. Everything was updated in guest.
apt-get update
apt-get upgrade
The source file in /etc/apt/sources.list
had this (Guest OS)
#Kali Sources
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
When I tried to install linux headers
apt-get install linux-headers-$(uname -r)
I got nothing to update, showed that everything was up-to-date.
Adding Guest Additions:
In Virtualbox,
Devices-> Install Guest Additions CD Image
it showed that no disk file was there on /usr/share/virtualbox/
.
So, I navigated to the so directory, and to my happiness there was an image file named VBoxGuestAdditions.iso I mounted it and ran the script
VBoxLinuxAdditions.run
It showed that everything was copied and I had to reboot. On reboot, it showed a couple of lines that
FAILED: Virtualbox guest addition kernel modules like so.
For your info,
apt-get install build-essential linux-headers-generic dkms
apt-get dist-upgrade
was already done perfectly.
If I click View->View Fullscreen mode it doesn't work. The option Auto-resize Guest Display was greyed out.
It was a sign that guest additions was not installed.
So, I tried to purge the virtualbox-dkms and try everything again
But, it showed that 0 to upgrade. And that, the existing one is already a newer version.
I once read in a post that virtualbox installation in both guest and host would conflict each other. So, I went to the terminal of host and tried
sudo apt-get update
sudo apt-get upgrade
It asked for 269Mb of installation. I checked the file list. There was no virtualbox in it. I let it run.
Rebooted the host. Still no luck.
I went to the Ubuntu software center and searched for
virtualbox
It said remove
as it was already installed.
Tried sudo apt-get install virtualbox
Nothing new to install, it showed.
Couldn't help myself with that.
**