17
Jun

How To: Install VirtualBox 4.0 on Fedora 15

This is a step by step tutorial on how to get VirtualBox 4.0 up and running on Fedora 15 (Lovelock). Specifically, this guide was written using the VirtualBox 4.0 (32-bit) version (Package: kernel-devel.i686 0:2.6.38.8-32.fc15). 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. Open a terminal window and let’s get to it…

Step 1: Download, Copy, and Edit Repository File

This is a one-liner command that will download, copy, and edit the VirtualBox repository file at once.

su -c 'curl http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo > /etc/yum.repos.d/virtualbox.repo; sed -i "s,enabled=0,enabled=1,g" /etc/yum.repos.d/virtualbox.repo'

Step 2: Update Repository and Install VirtualBox-3.2

This command will update yum repositories to include the new VirtualBox repository file we copied in the last step and then it will attempt to install VirtualBox-3.2 with dependencies.

su -c 'yum update; yum install -y VirtualBox-4.0 dkms gcc'

Note: At this point, for me, the installer created the vboxusers group and then registered and started the VirtualBox module. I was able to move immediately to Step 5 and run the command VirtualBox to start VirtualBox and run a virtual machine. I’m going to hope your results are the same, but for the sake of being complete and robust, I’m still going to include the steps for manually running the VirtualBox driver setup and vboxusers group setup.

Step 3: Run VirtualBox Setup Script

This command will run the VirtualBox driver setup script (see small note below command).

su -c '/etc/init.d/vboxdrv setup'

If you’re having issues, try installing “kernel-devel” OR “kernel-PAE-devel” if the output of ‘uname -r’ contains the suffix of .PAE. Only install one or the other to avoid confusion.

Step 4: Setup Groups for VirtualBox Access

This command will add you to the vboxusers group. Replace “username” with your actual username found by using the whoami command.

su -c 'usermod -G vboxusers -a username'

If you find that you’re getting SELinux errors or denials, try adding VirtualBox.so as an exception with this command:
su -c 'chcon -t textrel_shlib_t /usr/lib/virtualbox/VirtualBox.so'

Step 5: Run VirtualBox

Finally, run VirtualBox and have fun with it!

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

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 1 Comment So Far

Who Linked To This Post?

  1. Run two operating systems at once (VirtualBox) | A Linux Blog

Share your thoughts, leave a comment!