I’ve mentioned previously that my preferred virtualization platform is VMware Workstation. That remains true …but VirtualBox does have the distinct advantage of being free-of-charge. So unless I want to insist that my readers find AU$291.50 for VMware’s offering, it behooves me instead, from time to time, to use the virtualization platform I know we can all afford.
So here is my two-minute recipe guide to getting the latest VirtualBox product installed (for zero dollars!) on Scientific Linux 6.1. (You could always just download the relevant rpm and install it directly, but I prefer to do all my package management via yum wherever possible, so that’s the approach described here).
1. Get the gpg key
VirtualBox is supplied as a bunch of rpm packages which have been digitally signed. By checking the signature, you know no-one’s messed about with the packages before they reached you. It therefore makes sense to obtain and install the digital key needed to do that signature check. It’s easy to do, as root, at a command prompt, by issuing these two commands:
wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc rpm --import oracle_vbox.asc
2. Create the yum repository
Again as root, issue this command to create a new, blank repository file:
gedit /etc/yum.repos.d/virtualbox.repo
Now paste in these contents to the empty file:
[virtualbox] name=RHEL/CentOS-$releasever / $basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/6.0/$basearch enabled=1 gpgcheck=1 gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
Save the file changes and close down gedit. Just in passing, you might note that I’ve changed this file from the version which Oracle themselves makes available on the VirtualBox website. Specifically, their baseurl uses an environment variable, called $releasever, where I have hard-coded in the number 6.0. The trouble, of course, is that if you are using the latest versions of Scientific Linux or Centos, you’ll be picking up a releasever of 6.1 or 6.2 …and no such directory exists on the VirtualBox servers. You’d need to manually check out those server’s directory structure to see if that situation changes over time.
3. Install the Software
As root once more, the following one-liner will display all the different versions of VirtualBox that are available for installation:
yum search VirtualBox
You might see this sort of output in return:
Loaded plugins: refresh-packagekit virtualbox | 951 B 00:00 virtualbox/primary | 4.4 kB 00:00 virtualbox 17/17 ============== N/S Matched: VirtualBox ============== VirtualBox-3.2.x86_64 : Oracle VM VirtualBox VirtualBox-4.0.x86_64 : Oracle VM VirtualBox VirtualBox-4.1.x86_64 : Oracle VM VirtualBox
This shows that Oracle keeps a couple of older versions of the software alive and available, should you need to use them. Most people, though, will really only need the latest version, so pick that from the list and issue an appropriate “yum install” command. In my case, given the above output, this command will do the right thing:
yum -y install VirtualBox-4.1.x86_64
It’s a 58MB download or so, and as it’s installed you might see this message appear:
Running Transaction Installing : VirtualBox-4.1-4.1.8_75467_rhel6-1.x86_64 1/1 Creating group 'vboxusers'. VM users must be member of that group!
This gives you the clue to the last stage of the installation process…
4. Assigning Group Privileges
The software installation has created a new O/S group, called vboxusers, but it won’t have made your user account a member of that group. That needs to be fixed.
From the Gnome top panel, clieck System > Administration > Users and Groups. Find your user details on the Users tab and double-click the entry. Switch to the Groups tab, scroll down and check the vboxusers group name:
Click [OK] to save the change, and you’re done, though you’ll need to log off and back on before the group membership changes take practical effect.
If you prefer doing everything at the command line, just edit /etc/group (as root, of course) and add a :your-username entry to the end of the vboxusers line, which will probably be the last line of the file. In my case, for example, the line ended up reading vboxusers:x:501:hjr -which simply means that user ‘hjr’ is now a member of the vboxusers group. (Again, it’ll take a log off and fresh log on before the new group membership actually takes effect).
Either way, you’re now done and can run the VirtualBox program successfully, with the program launcher being found in Applications > System Tools.
5. USB Support
The version of VirtualBox installed by the above procedure will be unable to access USB 2.0 devices that might be plugged into your physical host. However, this shortcoming can be fixed by installing the “Oracle/VirtualBox Extension Pack”. Download it from the VirtualBox website and then just double-click the file when the download completes. You should see the following appear:
Click the [Install] button there, agree to the license, authenticate as root and all should be done in a matter of seconds. You’re now ready to build and run fully-functional virtual machines.




You can get workstation for $199 US if you don’t go through the store option.
If you go to http://www.vmware.com/products/workstation/overview.html and then select the buy online option it defaults to the US price. If you go through the store it defaults to the AUD price which is significantly more.
Chris, as one who paid the US$ price for my VMware Workstation precisely because of the bad-exchange-rate reasons you highlight, I agree that your purchasing tip is an important one to keep in mind. However, no matter how you get to the point of purchasing, the price still won’t be zero -which, in context, is the main point being addressed here.
Perhaps for completeness’ sake I should have mentioned, too, that VMware Player is completely free of charge and, these days, does let you create virtual machines from scratch. Trouble is, I find VMware Player performs weirdly at times, so it’s not a zero-cost option I’d particularly recommend. Hence the ‘how do I get VirtualBox on SL’ article.
I have been using Virtualbox for a few years because of the cost. The only thing I don’t like about it is that you can’t change the IP address for the guest if you use NAT (or at least that was my experience in earlier versions). So I run VMware Player, whose NAT does allow the guests to create different static IP addresses, and then in Virtualbox, I create a bridged connection to vmnet8. I have used Virtualbox to create a Linux and Solaris 11 RAC environment and it seems to be very stable. On a personal note, I enjoy your writing. I’ve learned a lot about running home environments from your posts. I feel I’ve learned a lot about Australia, as well. Be well!