I add the guest additions so I can have an adjustable screen size for the VM. I am a visual learner so deal with it.
So when I install Virtualbox it asks if I want the updated guest additions and I say yes which causes it to install in c:\Program Files\Oracle\Virtualbox\VBoxGuestAdditions.iso.
My Kali virtual box needs two things at this point:
- A cd-rom device enabled. So it can insert the guest additions into it from the Devices menu.
- No images associated with that CD rom otherwise when you attempt to insert the guest additions it will error as busy.
But your quest has a few pitfalls remaining.
So crack open a bash terminal in Kali and change directory /media/cdrom.
Then attempt to run (as root) VBoxLinuxAdditions.run. It will fail with a you do not have permissions. The image has been mounted without the ability to run anything.
To fix this:
- cd /etc
- vi fstab
- change the line for /media/cdrom0 and replace "noauto" with exec
The line should now look like:
/dev/sr0 /media/cdrom0 udf,iso9660 user,exec 0 0
Then perform a:
umount /media/cdrom0
mount /media/cdrom0
You should now be able to run VBoxLinuxAdditions.run
However that in itself might fail with:
Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
The reason for this is that it is attempting to compile something and it does not have headers to compile with.
apt-get update
apt-get install linux-headers-`uname -r`
Then try again with VBoxLinuxAdditions.run
References:
References:
- https://forums.kali.org/showthread.php?18973-Issues-installing-VirtualBox-Guest-Additions
- https://forums.virtualbox.org/viewtopic.php?f=3&t=58799