How To: Install VirtualBox 3 on Fedora 12 [Tutorial]

Updated: 11/22/2009

This is a step by step tutorial on how to get VirtualBox 3 up and running on Fedora 12. Specifically, this guide was written using the VirtualBox 3.0.8 version and an i386 CPU (32-bit). It can be adapted to upcoming versions and different CPUs (64-bit). The folks at VirtualBox have made it easy to install for Fedora users and I’m going to show you how in a few easy steps. Right, open a terminal window and let’s get to it…

1.) Become privileged
su -

2.) Get the VirtualBox repo installed (you may need to install wget)
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo && cp virtualbox.repo /etc/yum.repos.d/

3.) Install VirtualBox (along with a few other needed packages)!
yum install -y VirtualBox dkms gcc
Just so you know, DKMS will “ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next kernel update” and gcc is required in order to start the VirtualBox kernel module.

4.) Run the setup file for VirtualBox:
/etc/init.d/vboxdrv setup
If you’re having issues here, try installing “kernel-PAE-devel”

5.) Add yourself to the “vboxusers” group and fix the SELinux Permissions (just in case):
usermod -G vboxusers -a <yourusername>
chcon -t textrel_shlib_t /usr/lib/virtualbox/VirtualBox.so

6.) Run, and enjoy!

Appendix A: To Properly Backup the VirtualBox Machine (.vdi):

Please refer to my other page here:

How To: Properly Backup a VirtualBox Machine (.VDI)

Appendix B: Setup a Pre-Built VirtualBox Guest Image

Please refer to my other page here:

How To: Setup a Pre-Built VirtualBox Guest Image [Tutorial/Guide]

Appendix C: Shrinking a VirtualBox Guest Image

Please refer to my other page here:

Shrinking a Dynamic VirtualBox Disk Image

Appendix D: 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! If you find yourself with problems, feel free to comment below or ask for assistance on the fedora forum thread that I have created located here. If you have something to add, or need some clarification, let everybody know!


Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:

There's 31 Comments So Far

  • Magnus
    October 28th, 2009 at 10:54 am

    You need gcc and make for the module to build too. And is the SELinux change really needed?

  • SendDerek
    October 28th, 2009 at 9:14 pm

    Thanks for letting me know.

    The SELinux change was needed for Fedora 11 and VirtualBox 2. I’m not 100% sure if it is required, but I figured better safe than sorry…

  • Fale
    November 4th, 2009 at 2:59 am

    Now is also available a fedora repo (http://download.virtualbox.org/virtualbox/rpm/fedora/12/i686/)

  • SendDerek
    November 22nd, 2009 at 11:59 pm

    Right, this guide uses the VirtualBox repository.

  • bob
    November 21st, 2009 at 2:01 am

    you don’t even need make, automake, autoconf, gcc, and probably not even kernel devel….

    and its not VirtualBox, its virtualbox

  • SendDerek
    November 21st, 2009 at 1:36 pm

    I appreciate any feedback. I’m going to try and revise the guide with a fresh install of Fedora 12. I’ll get back with the exact packages required.

  • SendDerek
    November 22nd, 2009 at 4:58 pm

    Alright, so I spent the afternoon reinstalling Fedora 12 from scratch (had to anyways for my other guide on installing Fedora 12 on a MacBook Aluminum 5,1). I have updated the guide above to reflect what is required.

    I’m not sure what you were doing, but it IS VirtualBox and you do need to install gcc in order to run the VirtualBox setup script. Again, I have updated the guide to reflect the minimal steps required to get VirtualBox running. Thanks for your input. 😉

  • noob
    November 22nd, 2009 at 11:11 pm

    cool thanx for this it helped alot!!!!

  • Eric
    November 23rd, 2009 at 5:11 pm

    I started your tutorial, but the first command line failed. Iv been trying for 4 days to get Fedora 12 to run on VirtualBox guesst addition. Could you please let me know if the first step is typed in just like it looks here i might have not typed it in right

  • SendDerek
    November 23rd, 2009 at 8:49 pm

    It sounds like your backwards from this tutorial where I’m trying to guide you through on how to install VirtualBox on top of Fedora 12 host, not the other way around as you mentioned.

  • Steve Cunningham
    November 27th, 2009 at 3:20 pm

    Thank you so much
    Fedora 11 running

    Strange VBox error messages
    so I did the yum install VirtualBox dkms gcc
    and then /etc/init.d/vbox setup

    Ahhh this worked it took 1 sec to
    Stopping VirtualBox kernel module [ OK ]
    then about 45 seconds until:

    Recompiling VirtualBox kernel module [ OK ]
    Starting VirtualBox kernel module [ OK ]

    Then VBox runs great



  • Myki
    December 4th, 2009 at 1:38 pm

    For anyone having issues compiling on Fedora12 on a fresh install (I myself did so on an EEE PC from a LiveCD) and getting failure log entries claiming kernel sources aren’t present, do this:

    yum install kernel-devel-

    After hours of fighting with it I finally got it to compile.

  • SendDerek
    December 4th, 2009 at 2:36 pm

    Ya know, I actually mentioned that in my original, unedited post but then I took it out because it didn’t seem like it was necessary. Thanks for pointing that out.

  • Chris
    February 6th, 2010 at 1:41 pm

    Yeah I was having trouble with this even with your walk through but this worked perfect for me and after I installed gcc VBox works great!!! Thanks!

  • dvz-
    December 7th, 2009 at 3:14 am

    Thanks for the post. Only thing to change:

    usermod -G vboxusers -a `whoami`

    ^^we’re assumed that we’re still logged in as root from su –
    => `whoami` returns ‘root’…

    move this line above the “VirtualBox” call, preceded by “exit.”

    # exit
    $ sudo usermod -G vboxusers -a `whoami`
    $ VirtualBox

  • SendDerek
    December 7th, 2009 at 8:20 am

    Wow. Can’t believe I missed that one. Thanks for pointing that out.

  • dvz-
    December 7th, 2009 at 10:12 am

    sure thing…as for the fixed code…

    you can keep the chcon -t … while the user is still in as root.

    but don’t forget to specify the `exit` command to get out of su -, otherwise users may still think that all is well when they follow your commands exactly, then have questions when something doesn’t work.

  • Michael
    December 14th, 2009 at 2:17 am

    For Version 3.1 just use
    »yum install -y VirtualBox-3.1 dkms gcc«

    (using of upper case letters is importent with yum)

  • mike
    December 27th, 2009 at 5:59 pm

    hello, it worked flawless on fresh installed fedora 12, on nforce shipset…
    gr8 work…..butt i hade to much problems getting it to work on fedora 9 with too much packages installed!
    ..any way 10x 4 the post

  • Noman
    December 28th, 2009 at 7:48 am

    Thanks for the write-up! Worked great. One thing that needs a last little bit of love: step 4 says ‘If you’re having issues here, try installing “kernel-PAE-devel”’. Shouldn’t this be the *-devel package for whichever kernel you’re running? Also, if you’ve updated your kernel recently be sure you’ve rebooted before doing this step so that the running kernel and the source files are in sync.

  • biscuits
    January 3rd, 2010 at 4:17 am

    Almost all of my usb devices are greyed out in xp under vbox. what to do?

  • azure
    February 14th, 2010 at 10:07 pm

    To get USB working, you must add the following to /etc/fstab

    #VirtualBox USB – 122 is the gid of vboxusers group
    none /proc/bus/usb usbfs devgid=122,devmode=664 0 0

    and make sure your user is in the vboxusers group

  • Hector
    March 1st, 2010 at 6:57 pm

    Dereck I follow your instruction with Myki sugection and virtualbox is running nicely. Thank you both.


  • Денис
    March 25th, 2010 at 2:44 pm

    Подкажите пожалуста! Поставил Virtual Box 3.1.4 на Fedora 12 . На вертуальной машине в свойствах включено ускорение процесора, и оно не отключается. У меня компьютер его не поддержует и из за этого виртуальная машина медленно работает. Почему не отключается ускорение процесора? Как это исправить?

  • David
    March 30th, 2010 at 6:09 pm

    I am running Fedora 11 on When I try to run
    $/etc/init.d/vboxdrv setup
    Stopping VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel module [FAILED]
    (Look at /var/log/vbox-install.log to find out what went wrong)
    $cat /var/log/vbox-install.log
    Error! Your kernel source for kernel cannot be found at
    /lib/modules/ or /lib/modules/
    You can use the –kernelsourcedir option to tell DKMS where it’s located.

    $yum install kernel-devel kernel-PAE-devel

    Now I try to install kernel source using yum but it is installing wrong source [] . I tried to search kernel source for but couldn’t find it anywhere. Now I am stuck as I don’t want to update my kernel version and we don’t have source for this version so I can’t proceed further with VirtualBox. Is there anyway to install VirtualBox with this particular kernel version []. Thanks you.

  • ignivs
    April 14th, 2010 at 1:15 pm

    VirtualBox: supR3HardenedMainGetTrustedMain: dlopen(“/usr/lib/virtualbox/VirtualBox.so”,) failed: /usr/lib/virtualbox/VirtualBox.so: undefined symbol: _ZN9QHashData14detach_helper2EPFvPNS_4NodeEPvEPFvS1_Eii

  • [email protected]
    April 14th, 2010 at 6:59 pm

    Simply posting an error message isn’t very useful, but I can offer some sort of advice anyways… 🙂

    Unresolved symbols are generally a problem when the module (VirtualBox.so) can’t find symbols in a dependency module. The ‘dmesg’ output should give some clues as to why this is happening and which module is missing. Also, the ‘modinfo’ command is helpful in troubleshooting as well.

    Another scenario is that the module wasn’t compiled against the kernel in which it’s being inserted into.

    Either way, you’ll want to talk with the VirtualBox guys on their official forums. Good luck!

  • vadi01
    April 14th, 2010 at 11:55 pm

    Simpler method of installing
    1. nano /etc/yum.repos.d/vbox.repo
    2. Add the following lines
    name=Fedora $releasever – $basearch – VirtualBox

    3. yum update
    4. yum install VirtualBox dkms gcc
    5. /etc/init.d/vboxdrv setup

    Ps. To enable usb drive support in your guest os, just add yourself to the vbox users group in host os.

  • rob
    September 17th, 2010 at 7:25 pm

    fixed my problem. Thank you, saved me a ton of trouble!

Who Linked To This Post?

  1. VirtualBox 3 en Fedora 11 [Parte 1 Instalación] « Fedoreando
  2. Fedora 12 調整以及安裝軟體 » sshlog

Share your thoughts, leave a comment!