Ubuntu – Virtualbox guest additions installed but not working – version conflict

12.04guest-additionskalivirtualbox

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.

**

Best Answer

I also had not working Guest additions. I could boot guest Kubuntu 12.04, but resolution was only 1024x720. The option Auto-resize Guest Display was greyed out too.

I had an error - "consolerc is readonly" when I tried to launch it. I noticed that consolerc file was own by root. chown myuser:myuser did not solve the problem. It was fall back to root again. So I decided to create new user.

sudo adduser newuser

sudo usermod -aG adm,sudo newuser

And it solved everything! Now I have all screen resolutions available in my guest OS. And even better - resolution changes automatically when I stretch guest OS Window, so it looks perfect. And I have no more errors related to ownership of config files.