VirtualBox: Bits and Bytes Masquerading as Machines

Using virtualization to turn your ho-hum desktop into a computer cluster.

As our home computers become more robust, we can do more powerful things with them. Virtualization isn't new; it's almost as old as computers themselves, but the ability to run virtualization platforms on a typical home computer is relatively new and becoming more exciting every day.

For the uninitiated, virtualization in the context of this article refers to the ability to run a full-blown operating system within an application running on an existing computer. For example, virtualization allows us to run Windows XP in a window on a Linux desktop, a full-blown LAMP server on a Windows machine, or BSD inside a Mac OS machine. The combinations are endless, and any relatively modern personal computer is likely to be beefy enough to handle it.

So why would you bother? Well, only those who haven't been exposed to virtualization generally ask this question. Once the benefits and neato factors of desktop virtualization become apparent, it's hard to stop the ideas from flowing. In my opinion, the two major benefits of virtualization are ease of backups and host system stability. If I want to figure out how to set up a LAMP server, I have two choices: get my hands on another physical machine or do it in a virtual machine. Either way will leave me with a fully functional LAMP server, but the virtual machine costs me nothing and is set up on my existing computer without making any system changes to it.

Once my LAMP server is happily humming away, it would behoove me to have some off-site backups of it. With a physical server, I would need to have yet another machine of some kind perform off-site backups, and bare-metal restores can be tricky if the entire machine melts down. With a virtualized LAMP server, all I have to do is copy the files that the virtual machine is composed of, burn them to CD/DVD and chuck it in a drawer—cheap and easy.

Virtualizing requires two distinct components: a host machine and a guest. The host machine is your desktop or laptop where the virtualization software is installed. The more common virtualization applications on the market these days are VMware, Win4Lin (Windows virtualization only), VirtualBox and Parallels, with more offerings appearing every day. Although many of these products also provide enterprise-level server virtualization, in this article, I focus on the home enthusiast with a typical Linux computer to get things rolling.

Having Fun with VirtualBox

It makes the most sense to use innotek's VirtualBox, because unlike the other virtualization offerings, VirtualBox has a GPL'd Open Source Edition (OSE). The closed-source edition has dual licensing, in that it is gratis for personal and evaluation use but fee-bearing for enterprise use. The OSE is licensed under the GNU GPLv2 but is missing some well-thought-out functionality that is available in the non-GPL'd editions. The missing functionality from the OSE includes:

  1. No RDP support—you cannot connect to VirtualBox virtual machines from a remote location.

  2. No USB support—USB devices won't work in the virtual machine.

  3. No USB-over-RDP support (I guess that makes sense given the first two limitations).

  4. No shared folders—you will not be able to share data between the host and guest machines.

  5. No iSCSI initiator—SCSI disks cannot be used as virtual disks.

Installation of VirtualBox

VirtualBox downloads are available for Windows, OS X and a wide variety of Linux distributions. I am running Ubuntu Gutsy Gibbon on my Dell Inspiron 9400 (1.83GHz Core Duo with 1GB of RAM), so I installed the 13.6MB virtualbox_1.5.2-25433_Ubuntu_gutsy_i386.deb. Note that the OSE is available only in a tarball, but because I am installing VirtualBox for personal and evaluation use, I am lazily installing the Debian binary (Figure 1).

Figure 1. Installing the VirtualBox Gutsy Gibbon .deb Package

The Gutsy Gibbon VirtualBox has some dependencies, which Synaptic took care of for me. If you run into dependency problems, ensure that you have libxalan110 and libxerces27 installed. Also note that at the end of the VirtualBox install, a dialog box containing instructions on how to set the permissions of the /dev/vboxdrv file is displayed. Pay attention to those instructions as you will need them later.

After installation, I found VirtualBox under my Ubuntu Menu→System Tools slot.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix