Saturday, May 19, 2012

HowTo: Install VirtualBox on CentOS 6.2 / SL 6.2

Oracle VM VirtualBox is an popular software package that once installed on an existing host operating system allowing for additional guest operating systems to be loaded and run, each with its own virtual environment.

In this post I'll go over the steps needed to install it on RHEL clones such as CentOS and Scientific Linux.

In summary, we start by downloading VirtualBox's YUM repository file and placing it in the appropriate directory, afterwards we install the dkms and VirtualBox-4.1 packages and conclude by adding your user to be vboxusers group.

Let's begin by fetching the repo file and placing it under /etc/yum.repos.d/:
  1. $ wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
  2. $ su
  3. # mv virtualbox.repo /etc/yum.repos.d/

Afterwards, installing dkms will bring in cloog-ppl, cpp, gcc, glibc-devel, glibc-headers, kernel-devel, kernel-headers, libgomp, make, mpfr and ppl. These are needed to have VirtualBox match the kernel.
  1. # yum install dkms

Then we move to installing VirtualBox itself.

For 32 bits systems use:
  1. # yum install VirtualBox-4.1.i686

In the case of 64 bits systems:
  1. # yum install VirtualBox-4.1.x86_64

Wrap up by adding your user to the vboxusers and rebooting the computer:
  1. # usermod -a -G vboxusers ricardo
  2. # reboot

Just in case, make sure to check and see if your computer BIOS has virtualization support disabled. More often that not, motherboard have it disabled.

No comments: