December 6, 2010

Enthused About: Virtualization

Here's a shorter blurb than usual about machine virtualization. While the idea has been around for some time (popularized by the VMWare company), I was completely blown away recently at how far virtualization had come. For the slightly less tech-savvy, virtualization is the approach of using software to simulate one "machine" inside of another. This involves simulating the function of all of a machine's hardware so that any operating system can be installed on top.


The last time I looked into using virtual machines, I was an undergrad student in CS/SE at Mississippi State, circa 2005. I had to use Visual Studio and several MS Office programs daily and didn't have a UNIX or Linux machine of my own. I checked out VMWare's "VMWare Player" and went through the motions of installing my own Linux OS (I believe it was Fedora Core at the time). But the thing was so slow it was completely useless. Granted, my Dell Inspiron was on it's 4th year by that point, but I was completely unimpressed.

Nowadays, I have Linux installed on my desktop at the house, so I haven't really had the missing-OS problem. (Now that my latest laptop is unusable, I'm actually without a Windows machine for the first time since ... 6th grade?) But last week, I was preparing an assignment for a course I TA here at the University of Maryland using Hadoop. Hadoop is a pretty specialized but very useful framework for MapReduce calculations, and one such specialization involved an outright dependency on a basic UNIX/Linux command called "chmod." I find it ridiculous that a library written in Java would have such a dependency, but nevertheless, students who ran on Windows needed some way to run Hadoop.

I revisited virtualization, and ran across the free program VirtualBox (http://www.virtualbox.org/). VirtualBox can run on Windows, Mac, or UNIX/Linux machines to install an empty 64-bit machine with essentially "perfectly compatible hardware" for your target operating system. A couple of hours of downloads later, my wife's two-year-old Mac was running 64-bit Ubuntu with an 8 GB virtual hard disk and 512 MB of virtual RAM. Yes, it degrades the performance of the Mac OS, but if you're solely using the virtual machine, the difference is negligible.

So this lets us run Linux programs on a Mac or Windows machine. While that may be cool, does it really mean anything to the researchers out there? In my new realm of software testing, I'd say it absolutely does. We can use virtualization for:
  • Replicate a single experimental setup across a heterogeneous cluster of target machines
  • Distributing a complex machine setup to any interested parties (e.g. for research or testing purposes)
  • Testing Windows and Mac programs on Linux machines, which are far more abundant
I'm sure there are other reasons. I came away so impressed with how well the virtual machines (VMs) were working that I'm pretty sure I won't bother dual-booting a machine again. All it would take is committing to a single host operating system then building VMs for any others. I could easily convince myself that a Mac with a decent amount of RAM and several cores would be a great machine for that kind of setup!

3 comments:

  1. We're now using VMWare to run Fedora on our Windows machines for some of our simulation work. It makes it really easy to deliver to the customer when we just burn the image to DVD and send the whole virtual machine to them.

    ReplyDelete
  2. Pretty smart thoughts! I'll definitely try to apply this to data center migration

    ReplyDelete