Can not install Guest Additions in VirtualBox for CentOS 6 guest
You need to install guest editions.
"The VirtualBox Guest Additions for all supported guest operating systems are provided as a single CD-ROM image file which is called VBoxGuestAdditions.iso. This image file is located in the installation directory of VirtualBox."
create mount directory
sudo mkdir -p /media/VirtualBoxGuestAdditions
mount guest additions iso
sudo mount -t iso9660 -o loop /installation/directory/of/VirtualBox/VBoxGuestAdditions.iso /media/VirtualBoxGuestAdditions/
Install guest additions
sudo /media/VirtualBoxGuestAdditions/VBoxLinuxAdditions.run
Then mount.vboxsf file should be in sbin and you can mount with
sudo mount -t vboxsf shared ~/host
After following the steps described by the given answer and experiencing a kernel header issue i came across this link which has a command that does simplify things.
/etc/init.d/vboxadd setup
Hope it helps future explorers on this question. :)
I got the same error.When I tried to install VBoxGuestAdditions (Devices -> Insert Guest Additions CD Image) on Ubuntu 16.04 x86, it throws error message "Unable to insert the virtual optical disk ..."
SOLUTION:1. Open a terminal and enter: sudo apt-get install virtualbox-guest-utils
- Reboot and enjoy.