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!
VirtualBox
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!
Sources:
http://www.virtualbox.org/wiki/Linux_Downloads
Feel free to
buy me a soda if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that I hope you'll be interested in:
Here are some similar posts that you may be interested in:
- Shrinking a Dynamic VirtualBox Disk Image
- How-To: Setup a Pre-Built VirtualBox Guest Image [Tutorial/Guide]
- How To: Install ExifTool on Fedora Linux [Tutorial]
- Fedora 12 Constantine on MacBook Aluminum 5,1 [Guide]
- Create/Compress/Archive Almost Any File in Linux (tar, tar.gz, tar.bz2, gz, bz, zip, 7z, rar, etc…)
You need gcc and make for the module to build too. And is the SELinux change really needed?
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…
Now is also available a fedora repo (http://download.virtualbox.org/virtualbox/rpm/fedora/12/i686/)
@Fale:
Right, this guide uses the VirtualBox repository.
you don’t even need make, automake, autoconf, gcc, and probably not even kernel devel….
and its not VirtualBox, its virtualbox
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.
@bob:
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. ;)
cool thanx for this it helped alot!!!!
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
@Eric:
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.
Thank you so much
Fedora 11 running 2.6.30.9-96.fc11.i686.PAE
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
thanks
steve
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-2.6.31.5-127.fc12.i686
After hours of fighting with it I finally got it to compile.
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.
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!
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
Wow. Can’t believe I missed that one. Thanks for pointing that out.
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.
For Version 3.1 just use
»yum install -y VirtualBox-3.1 dkms gcc«
(using of upper case letters is importent with yum)
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
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.
Almost all of my usb devices are greyed out in xp under vbox. what to do?
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
Dereck I follow your instruction with Myki sugection and virtualbox is running nicely. Thank you both.
Hector
Подкажите пожалуста! Поставил Virtual Box 3.1.4 на Fedora 12 . На вертуальной машине в свойствах включено ускорение процесора, и оно не отключается. У меня компьютер его не поддержует и из за этого виртуальная машина медленно работает. Почему не отключается ускорение процесора? Как это исправить?
I am running Fedora 11 on 2.6.30.9-96.fc11.i686.PAE. 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 2.6.30.9-96.fc11.i686.PAE cannot be found at
/lib/modules/2.6.30.9-96.fc11.i686.PAE/build or /lib/modules/2.6.30.9-96.fc11.i686.PAE/source.
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 [2.6.30.10-105.2.23.fc11] . I tried to search kernel source for 2.6.30.9-96.fc11.i686.PAE 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 [2.6.30.9-96.fc11.i686.PAE]. Thanks you.