We've written a lot lately about Ubuntu and virtualization in recent weeks, especially on the server.  Lest we leave desktop users out in the cold, I'd like to take a look at the current virtualization scene on the desktop, with comparisons of the major virtualization solutions and where they're headed in the future.

Before getting started, I should thank a commenter on a recent post who suggested that a general overview of virtualization on the desktop might come in handy for Ubuntu desktop users.  Virtualization is something that's easy to take for granted if you're familiar with it, but plenty of non-geeks (and even some geeks) running Ubuntu may remain unfamiliar with the benefits of the technology.

Why Virtualize?

The reasons for using virtualization in the server room are numerous, but we won't go into them here.  Instead, let's consider why you might use virtualization on a workstation or laptop.

First of all, the biggest motivation for virtualization among desktop users has to be to access Windows programs.  Virtualization makes it possible to run Windows applications natively within an Ubuntu desktop, without having to dual boot or take chances using the Wine emulator, which rarely provides perfect performance.

There are caveats, of course.  First, you need a valid Windows license to run Windows applications inside a virtual machine, which is not the case if you use Wine.  More importantly for many users, Windows programs that require 3D video acceleration--meaning most modern games--only "sorta" work in virtual environments.  That's improving, and I had a relatively good experience running Windows games in VirtualBox last winter, but virtualization is still not really a good solution if you need solid 3D performance from Windows applications.

Another popular reason for using virtualization on the desktop is for testing out different versions of Ubuntu or other Linux distributions without having to reboot.  TestDrive, for example, provides a simple means of exploring different builds of Ubuntu using VirtualBox.

Virtualization can also be useful for people worried about security.  Most popular desktop virtualization products provide "snapshot" features that allow users to take an image of a virtual machine and roll back to it later in a few clicks--kind of like System Restore in Windows, except this method always works perfectly.  If you need to do work in an environment that's guaranteed to be malware-free, you can create a virtual machine and quickly restore it to a known clean state whenever you like.

This list certainly isn't comprehensive, but it highlights some of the most popular motivations for deploying virtualization technology on a desktop system.  With those in mind, let's look at the different products that are actually available.

The Cost of Virtualization

Like most things in life, virtualization is not without its drawbacks. Beyond the financial costs of having to purchase an extra license for your guest operating system (if you're virtualizing Windows or another proprietary platform), as well as paying for virtualization software (if you choose a non-free virtualization package), there are fundamental downsides to virtualization that are worth noting.

Above all, the factor that makes virtualization on the desktop unattractive is the relatively high demand it places on system resources.  Virtualization ties up large amounts of RAM in particular, making it difficult to virtualize on older and low-end computers.

That said, computer memory has become cheaper and cheaper in recent years, and most modern machines come with more than enough RAM to run common versions of Linux and Windows in a virtualized environment.

Guest operating systems almost never perform quite as well in a virtualized environment as they would running on actual hardware, which constitutes a second drawback to virtualization.  Beyond the poor support for video acceleration in virtual machines, most normal code won't run quite as fast under a virtualized operating system.

Guest performance, however, is also becoming less and less of an issue these days, as better CPUs and innovations in virtualization software make it increasingly possible for guest machines to perform calculations as if they were running on real hardware.

The bottom line: while there are certainly downsides to virtualization, they are becoming more and more minimal as the market develops.  It will probably never be possible to virtualize desktop operating systems without some performance hit, but on most modern computers, it's an increasingly negligible one.

Virtualization Tools

Now that you know why you might want to deploy virtualization technology on your Ubuntu desktop, you might be wondering how to go about it.  Despair not: stay tuned for a follow-up post comparing some of the leading virtualization tools available for the Linux desktop and how they fit into the larger Ubuntu experience.