What is VirtualBox Guest Additions?
VirtualBox Guest Additions are a package of programs and drivers which are installed on a guest OS running in VM. It helps to improve guest's performance and make integration much more seamless. There are many other features like Host/Guest Time sync, shared folders, Mouse pointer enhancements and many more.
Here, I will focus on how to install VirtualBox Guest Additions and how to configure Shared Folder for a Fedora virtual machine?
Installing VirtualBox Guest Additions
All the commands here are run with root privileges. Get the root privileges by logging in as root or use sudo in the beginning of the commands.
Getting required packages:
Once you have the Linux guest machine installed on virtual machine, install some additional packages required for VirtualBox Guest Additions like dkms, kernel-devel, etc.
To install all the packages required run the following command:
yum install dkms binutils gcc make patch libgomp glibc-headers kernel-headers kernel-devel
Mount the VirtualBox Guest Additions
Once the package installation is done and we have the packages required by Guest Additions, lets start installing the actual thing.
Mount the Guest Additions ISO from VM menu using Device -> Install Guest Addition.
Make sure there is no other CD already mounted on your virtual machine, if there is one, then unmount it.
Install the VirtualBox Guest Additions
You can see different installer files, run the one which suits your requirement with following command:
Restart the machine and we are almost there...
Setting up the Shared Folder
Shared Folder functionality is one of the features that comes with the VBox Guest Additions. Once VBox Addition is well installed, the next is to setup a shared folder with the host machine.
Then choose the folder from the host machine to share with your guest machine (in my case host is Windows and guest is Linux Fedora 9).
After this, you need to mount the shared folder on Linux guest machine.
Create a folder where you want to mount the shared folder by
then mount the folder onto the shared folder share-host.
mount -t vboxsf
To do an auto-mount on each boot put the command in the /etc/rc.local or whichever script is run at the end of boot processes.