Using VirtualBox (VBox) with Linux

Installing VBox with Linux Host

Installing VBox in Linux host requires the following:

  • Qt 4.3.0 or higher;
  • SDL 1.2.7 or higher (this graphics library is typically called libsdl or similar).

As VBox uses a special kernel module to manage hardware resources, it is recommend to install DKMS:

For Fedora: #yum install dkms

For Ubuntu: $sudo apt-get install dkms

Installing VirtualBox Using YUM

  1. You can now use yum to install VirtualBox.
  2. First you need to download the repository file for yum located at
  3. Then you need to copy the repo file to yum depository folder #cp virtualbox.repo /etc/yum.repos.d/
  4. Make sure dkms is installed as mentioned above
  5. Proceed with the command #yum install VirtualBox
  6. Reboot the PC since kernel file has been modified

Installing Linux as Guest

Installation of Linux is quite easy as long as you stick to the default hardware. Although VirtualBox emulate multiple kind of hardware, some hardware emulation requires additional drivers.

Once the OS is installed, you need to install Linux guest additions for additional functionality such as sharing folders.

To install Linux guest addition, you’ll need GNU compiler, Linux kernel header and a couple of essential software in kernel development. In Fedora, you need to perform yum install as follows:

#yum install gcc kernel-devel

For Ubuntu users, most essential kernel development software has been installed.

Before proceed with guest installation you need to install DKMS

For Fedora: #yum install dkms

For Ubuntu: $sudo apt-get install dkms

Next, you need to mount the CD ISO and proceed to the main folder. Run the appropriate guest addition base on your guest OS and architecture such as:

#./ or


After installation of guest additions, you can move your mouse freely between guest and host OS. You can expand your screen size by resizing the virtual OS windows.

Sharing Folder with Host System

To share network folders, you need to configure a share folder with a share name in the virtual machine settings.

Then in Linux, you need to mount the share folder using VirtualBox file system:

#mount –t vboxfs name_of_share_folder /mnt/mount_point

please note that the above mounted folder is owned by root.

To allow user to own the files and folder use the command:

#mount -t vboxsf -o uid=1000,gid=1000 name_of_share_folder /mnt/mount_point

If you want to have it mount automatically upon each boot, put the mount command in /etc/rc.local. Using /etc/fstab has little effect, because that  file is processed before the SF module is loaded and will fail to mount the share.



Comments are closed.

%d bloggers like this: