Virtualization on the Ubuntu Desktop: An Overview

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.

Posted In: WorksWithU
Share:
Subscribe: RSS Feed

9 Comments on “Virtualization on the Ubuntu Desktop: An Overview”

  1. David Says:

    I absolutely needed this article. It became like a reflex movement to read whatever about ‘virtualization’ and go over the next thing … Now I have understood how interesting it is … really interesting !!!

    Thanks.

  2. Pat Says:

    Thanks for the clear, helpful piece on virtualization on Ubuntu.

    I’d also love to hear your thoughts on virtualizing in the opposite direction. I have an Ubuntu desktop, but my laptop is a Mac. I have one device driver that runs on Ubuntu, but not on the Mac.

    I gather that installing and running Linux on a Mac is a pain in the posterior. Would virtualization make it any easier for a non-technical person to run a Ubuntu on a Mac?

    Thanks.

  3. Christopher Tozzi Says:

    David: glad the post was helpful. As I wrote, it’s easy to take virtualization for granted if you’ve already been using it for a while, and forget that it’s not something that everyone knows about!

    Pat: virtualizing Ubuntu on another operating system is definitely also possible, and can be a good way to give Ubuntu a try without having to install it to a hard disk. I’ve never owned a Mac so I’m not too familiar with the virtualization scene there, but I know that VirtualBox is available as a free download for OS X; my advice would be to give that a try. It’s pretty simple to use.

    I’ve also not heard of anyone having too much trouble running Ubuntu on OS X. According to http://rc3.org/2008/02/13/installing-ubuntu-on-os-x/ for example it seems pretty easy. The opposite direction–virtualizing OS X on Ubuntu–can be difficult because OS X is so proprietary, but that’s not what you want to do.

  4. Christopher Tozzi Says:

    Also, Pat, for more step-by-step instructions regarding Ubuntu in VirtualBox on OS X, check out http://moxiefoxtrot.com/2009/01/05/installing-ubuntu-810-in-virtualbox/

    I also reread your post and it seems your ultimate goal is to install Ubuntu directly on OS X to create a dual-boot system. I’ve also seen that done and I don’t think it’s particularly hard (maybe it was in the past, and it might be more difficult if you wanted to run a less-mainstream distribution than Ubuntu). Take a look at https://help.ubuntu.com/community/MacBook

  5. Pat Says:

    Christopher:

    Thanks very much for your helpful, encouraging reply. One of your links contains the GREAT news that 10.04 Lucid Lynx can be installed on my model of MacBook.

    Previously the newest version available for a MacBook 3.1 seemed to be 9.04 Jaunty. (Or to be more specific: the newest for which an Ubuntu Community page was available, and the amount of tinkering in terminal mode made it seem like it would be more trouble than it was worth for a non-technical person.) But having an Ubuntu page that says the 9.04 LTS release can be installed on my MacBook changes everything!

    To clarify whether I want dual boot or virtualization: Whichever would be easiest and cheapest. Virtualization if it saved me technical hassles or hours of tinkering. Dual boot would avoid the cost of a RAM upgrade.

    The ideal solution would be porting the software to the Mac. To that end, I tried the Fink Project, which ports open-source Unix software to the Mac. But the problem is there are far more people wanting things packaged and ported than there are volunteer developers to do the work. Here’s the request I submitted in the spring:

    http://sourceforge.net/tracker/?func=detail&atid=371315&aid=3005826&group_id=17203

  6. Jay Says:

    Christopher, thank you so much for reading my comment in the previous post and for writing this article. As you noted and others have said, the word “virtualization” was one of those key words that whenever I saw I would just skip to the next thing since I felt like it didn’t relate to me and I wouldn’t understand it. Now it seems not as daunting and much more understandable. Much appreciated!

  7. Pat Says:

    Correcting an error in my previous post:

    I wrote that “having an Ubuntu page that says the 9.04 LTS release can be installed on my MacBook changes everything!”

    I meant 10.04 LTS. (Previously the most current instructions for the MacBook 3.1 were for Ubuntu 9.04.)

  8. Paul Says:

    To run Windows in a virtual machine, what license is required ?

    I’ve tried with a valid Windows XP OEM license (on the same machine XP was delivered with) but it didn’t work (could not make the Windows registation or whatever name it was called). Is a full licence required (not OEM) ?

    For Windows 7, does EULA allows to run each Windows 7 version in a virtual machine ? I could not find that information on Microsoft website.

    Thanks.

  9. Christopher Tozzi Says:

    Paul: using an OEM copy of Windows can cause problems because OEM versions are valid only for a certain hardware configuration–the one in the computer that the OEM disk shipped with–and your virtual environment will appear to have totally different hardware from Windows’s perspective. I’ve never dealt with this issue personally but I believe you can get it to work, however, if you call Microsoft and are willing to go through a bit of a hassle. You might want to take a look at http://ubuntuforums.org/showthread.php?t=381315

    I’m not sure what you mean by your second question: are you asking whether it’s legal to run Windows 7 Home in a virtual machine, as opposed to Windows 7 Ultimate?

Leave a Comment

Blog-Powered Site
By ContentRobot