Xen: Creating Virtual Computers

by John Miller

John Miller works the Community Software Lab's table at the NTEN ConferenceImagine that you could run Windows XP, Mac OS X, and multiple versions of Linux on the same computer. That's already a reality--you just have to reboot to switch between them. Now imagine that you could run all these operating systems at the same time on the same computer. You could run MS Word 2003 at the same time you're running Safari, all while programming in Eclipse. It's possible. The technology that makes it possible: Xen.

Xen is a virtualization technology that's based on Linux. It lets you run multiple virtual computers ("guest" operating systems) on top of one master operating system (called the "host" OS). In other words, you can run Windows and Linux on the same PC at the same time.

That's the sexy use, anyhow. Xen is already in use by hosting companies to give customers their own computer. Instead of having to give customers a physical PC, Xen allows the hosting companies to fit many virtual computers onto one PC. This is ideal for customers that don't need much computing power.

At the Community Software Lab, we're in the process of putting together a Xen-based server so that we can emulate our current network of servers from within one machine. Instead of having to prepare a new computer to become a server--install hard drives, memory, network cards, cd-rom drives, load the OS via cd-rom--we can type a few commands on the Xen server and have a working virtual computer in about five minutes. What once took a day to do now takes minutes.

The kinks? The Xen server has to share its memory among many virtual computers, and these days an individual’s personal computer can use 256 MiB, 512 MiB, 1 GiB, or more. This puts a limit to the number of virtual computers that can fit onto one host machine.

We're working the kinks out of our test server (now running computation-friendly virtual machines), and as soon as we hear from our server supplier, we'll be putting together the production server.

Computer virtualization is nothing new, however. IBM's been doing it in their mainframes for over 40 years. VMWare is a widely used virtualization product. Various video-game emulators have been around for a while (I beat Rygar using good ol' Nesticle, all while surfing the web). Xen just seems most promising for the moment.

I would be remiss in my duties if I didn't mention KVM (Kernel-based Virtual Machine--not Keyboard, Video, Mouse!). New in the 2.6.20 Linux kernel (the core of the operating system that handles memory management, task switching, networking, etc.), KVM might give Xen a run for its money. I'll try it out, but with time invested in Xen, that's where we're headed for the moment.

John Miller is in his second year of service with the CTC VISTA Project, working at the Community Software Lab in Lowell, MA. John has worked on a variety of projects, including upgrading spam filtering software, implementing a way to process credit card donations, setting up the CSL's first DNS server, and tutoring students in web design.