Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Installation of Oracle VM VirtualBox on Linux

Save for later
  • 4 min read
  • 09 Dec 2013

article-image

(For more resources related to this topic, see here.)

Basic requirements

The following are the basic requirements for VirtualBox:

  • Processor: Any recent AMD/Intel processor is fine to run VirtualBox.
  • Memory: This is dependent on the size of the RAM that is required for the host OS, plus the amount of RAM needed by the guest OS. In my test environment, I am using 4 GB RAM and going to run Oracle Enterprise Linux 6.2 as the guest OS.
  • Hard disk space: VirtualBox doesn’t need much space, but you need to plan out how much the host OS needs and how much you need for the guest OS.
  • Host OS: You need to make sure that the host OS is certified to run VirtualBox.

Host OS

At the time of writing this article, VirtualBox runs on the following host operating systems:

Windows

The following Microsoft Windows operating systems are compatible to run as host OS for VirtualBox:

  • Windows XP, all service packs (32-bit)
  • Windows Server 2003 (32-bit)
  • Windows Vista (32-bit and 64-bit)
  • Windows Server 2008 (32-bit and 64-bit)
  • Windows 7 (32-bit and 64-bit)
  • Windows 8 (32-bit and 64-bit)
  • Windows Server 2012 (64-bit)

Mac OS X

The following Mac OS X operating systems are compatible to run as host OS for VirtualBox:

  • 10.6 (Snow Leopard, 32-bit and 64-bit)
  • 10.7 (Lion, 32-bit and 64-bit)
  • 10.8 (Mountain Lion, 64-bit)

Linux

The following Linux operating systems are compatible to run as host OS for VirtualBox:

  • Debian GNU/Linux 5.0 (lenny) and 6.0 (squeeze)
  • Oracle Enterprise Linux 4 and 5, Oracle Linux 6
  • Red Hat Enterprise Linux 4, 5, and 6
  • Fedora Core 4 to 17
  • Gentoo Linux
  • openSUSE 11.0, 11.1, 11.2, 11.3, 11.4, 12.1, and 12.2
  • Mandriva 2010 and 2011

Solaris

Both 32-bit and 64-bit versions of Solaris are supported with some limitations. Please refer to www.virtualbox.org for more information. The following host OS are supported:

  • Solaris 11 including Solaris 11 Express
  • Solaris 10 (update 8 and higher)

Guest OS

You need to make sure that the guest OSis certified to run on VirtualBox. VirtualBox supports the following guest operating systems:

  • Windows 3.x
  • Windows NT 4.0
  • Windows 2000
  • Windows XP
  • Windows Server 2003
  • Windows Vista
  • Windows 7
  • DOS
  • Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, and 3.7)
  • Solaris
  • OpenSolaris
  • OpenBSD

Installation

I have downloaded and used the VirtualBox repository to install VirtualBox. Please ensure the desktop or laptop you are installing VirtualBox on is connected to the Internet. However, this is not mandatory. You can install VirtualBox using the RPM command, which generally adds the complexity of finding and installing the dependency packages, or you can have a central yum server where you can add VirtualBox repository.

In my test lab, my laptop is connected to the Internet and I have used the wget command to download and add virtualbox.repository.

installation-oracle-vm-virtualbox-linux-img-0

Installing dependency packages

Please ensure installing the packages seen in the following screenshot to make VirtualBox work:

installation-oracle-vm-virtualbox-linux-img-1

Installing VirtualBox 4.2.16

Once the preceding dependency is installed, we are ready to install VirtualBox 4.2.16. Use the command seen in the following screenshot to install VirtualBox:

installation-oracle-vm-virtualbox-linux-img-2

Rebuilding kernel modules

The vboxdrv module is a special kernel module that helps to allocate the physical memory and to gain control of the processor for the guest system execution. Without this kernel module, you can still use the VirtualBox manager to configure the virtual machines, but they will not start.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime

When you install VirtualBox by default, this module gets installed on the system. But to maintain future kernel updates, I suggest that you install Dynamic Kernel Module Support (DKMS). In most of the cases, this module installation is straightforward. You can use yum, apt-get, and so on depending on the Linux variant you are using, but ensure that the GNU compiler (GCC), GNU make (make), and packages containing header files for your kernel are installed prior to installing DKMS. Also, ensure that all system updates are installed.

Once the kernel of your Linux host is updated and DKMS is not installed, the kernel module needs to be reinstalled by executing the following command as root:

installation-oracle-vm-virtualbox-linux-img-3

The preceding command not only rebuilds the kernel modules but also automatically creates the vboxusers group and the VirtualBox user.

If you use Microsoft Windows on your desktop, then download the .exe file, install it, and start it from the desktop shortcut or from the program.

Start VirtualBox

Use the command seen in the following screenshot in Linux to run VirtualBox:

installation-oracle-vm-virtualbox-linux-img-4

If everything is fine, then the Oracle VM VirtualBox Manager screen appears as seen in the following screenshot:

installation-oracle-vm-virtualbox-linux-img-5

Update VirtualBox

You can update VirtualBox with the help of the command seen in the following screenshot:

installation-oracle-vm-virtualbox-linux-img-6

Remove VirtualBox

To remove VirtualBox, use the command seen in the following screenshot:

installation-oracle-vm-virtualbox-linux-img-7

Summary

In this article we have covered the installation, update, and removal of Oracle VM VirtualBox in the Linux environment.

Resources for Article:


Further resources on this subject: