Showing posts with label folders. Show all posts
Showing posts with label folders. Show all posts

Monday, February 20, 2012

Installing Guest additions in VirtualBox; Windows 7 host.

In order to share folders, clipboard and other things you must install the Virtualbox Guest Additions. The iso file that you need to mount in your CentOS guest is located in the VirtualBox installation directory and is named VBoxGuestAdditions.iso.

EDIT: I just realized that the option to mount the guest additions iso file is right in the menu! From the guest window, click on Devices > CD/DVD Devices > Install Guest Additions
If you don't see it there, you are probably using an older version of Virtualbox and should follow the directions below.

From the guest window, click on Devices > CD/DVD Devices > Choose a virtual CD/DVD disc file...
You might see the file name in the list already, but if not, you need to navigate to the installation directory of Virtualbox itself (C:\Program Files\Oracle\Virtualbox by default) and select the iso file.




Before you jump into installing the Virtualbox Guest Additions, you should prepare your system as suggested by the Virtualbox documentation. To do this, run the following command:

# yum -y update && yum -y install gcc make kernel-devel
# reboot


Now from the command line in the CentOS guest mount the image as a virtual device:
# mount -t iso9660 /dev/cdrom /mnt

After this, run the set up:
# cd /mnt
# sh ./VBoxLinuxAdditions.run

Now you are supposed to install a package named dkms, but this is not available by default in the CentOS yum repo. Whenever you run updates on the kernel in your CentOS guest, you will need to run this command:

/etc/init.d/vboxadd setup