Pages

15 August 2009

How to Install Virtual Box on Linux (Fedora)

This is how to get VirtualBox up and running on Linux Fedora 10.  Also, this tutorial is for the 32-Bit version of VirtualBox, so you’ll have to customize a little more to get the 64-bit version running. Everything in the “code” sections should be copy/pasted/typed into the terminal.
Right, let’s get to it:

PreStep.) Open the terminal and get into super user mode:

    su -

1.) Get the latest VirtualBox package (as of now, 2.0.6) from the VirtualBox website for Fedora 9 and install it (generally, after a few months, the Fedora 10 link will be available).

    wget http://download.virtualbox.org/virtualbox/2.0.6/VirtualBox-2.0.6_39765_fedora9-1.i386.rpm && rpm -ivh VirtualBox-2.0.6_39765_fedora9-1.i386.rpm

2.) Get the kernel-devel package:

    yum install make automake autoconf gcc kernel-devel dkms

3.) Run the setup file for VirtualBox:

    /etc/init.d/vboxdrv setup

4.) Add yourself to the “vboxusers” group and fix the SELinux Permissions:

    usermod -G vboxusers -a username
    chcon -t textrel_shlib_t /usr/lib/virtualbox/VirtualBox.so

5.) Run, and enjoy!

    VirtualBox

6.) To Get USB Support:

    1 – create a new group called “usb”;
    2 – locate file usbfs: in my case is /sys/bus/usb/drivers (I suggest to find the file with a usb device inserted;
    3 – modify file /etc/fstab inserting a line containing the right path and the number corresponding the “usb” group :
    none /sys/bus/usb/drivers usbfs devgid=503,devmode=664 0 0
    4 – command mount -a;
    5 – start VB and try…;

Source: Fedora Forums
7.) To Properly Backup the VirtualBox Machine (.vdi):
Please refer to my other page here:
How To: Properly Backup a VirtualBox Machine (.VDI)
8.) To Get Sound Working:
Highlight your virtual machine and click on the “Settings” button. Click on the “Sound” category, and then check the “Enable Sound” option. In the drop-down box, select “PulseAudio”. You should now have sound.
That’s it!