VirtualBox Virtual Machine Software: A Hands-On Review

Tweet

VirtualBoxVirtual Machines can make life much easier. IT departments can save a fortune on server hardware, desktop developers can test in a clean environment, and web developers can install multiple browsers on different operating systems.

Website testing should be easy, but there is one browser that causes more grief than others. Internet Explorer’s close ties with Windows means that only one version can be installed, so how can conscientious developers test IE8, IE7, IE6 and possibly IE5.0/5.5. There are workarounds, but all have flaws – especially on Vista. The best solution is to run clean copies of Windows with different versions of IE and that is where virtual machine software can help.

The Choices

I have used VMware for many years. It was one of the first and most well-known VM solutions. However, I recently experienced performance issues on Vista and VMware Workstation v6 seemed a little bloated (500Mb download). Another option is Microsoft Virtual PC although it is more basic and has not been updated in several years.

Finally, we have VirtualBox, an open source project run by Sun Microsystems (for the moment, anyway). I tested version 1 a few years ago and, although it was adequate, it was no match for VMware. Now in version 2.2, I thought the product was worth another look.

Download and Installation

The VirtualBox 2.2 62MB download is larger than version 2.1 (36MB) but, unlike VMware, installation is very quick and it does not install quite so many RAM-hogging device drivers and services.

VirtualBox VM Manager

VirtualBox VM Manager

Creating a Virtual Machine

A step-by-step wizard is provided to create your first virtual machine. You enter a name, choose the amount of RAM, and create or select an existing virtual hard disk. The settings can then be tweaked before you boot for the first time, e.g. to choose an OS installation disk image in the virtual CD drive (I recommend using the excellent nLite to prepare a cut-down XP SP3 ISO).

Virtual Machine configuration

Virtual Machine configuration

Operating System installation is identical to installing on real hardware except that each virtual machine opens in its own window. Once complete, you can click the guest OS window and operate it as normal. By default, the right Ctrl key returns control back to the host. Like other solutions, VirtualBox provides guest OS software that installs various device drivers and automatic mouse capture/release (choose Devices > Install Guest Additions).

Virtual disk images are saved as .vdi files. You can either choose a fixed size drive or one that dynamically expands as the guest requires it. Unusually, VirtualBox allows you to run more than one virtual machine from the same disk image. You could therefore experiment with different hardware configurations, but I cannot think of any other practical use. Virtual disks can also be cloned so you can easily create a new guest OS from an existing installation. A command line tool is required for disk cloning but full instructions are provided in the help.

Other Features

Other useful features include:

  • Shared folders: permanently or temporarily connected folders that appear as a network drive in the guest OS.
  • Snapshots: a snapshot of the guest OS can be taken at any point. This allows you to experiment with software installations or trash the whole system and revert back instantly (if only Windows Restore points did that!)
  • State saving: when you close the OS window, you are given the choice to send a shut down signal, power off, or save the current state.
  • Speed: VirtualBox feels much faster and responsive that VMware or Virtual PC.
  • Seamless mode: like Parallels on the Mac, this integrates the guest OS on your standard desktop. It works well, although I could not get it to operate on a second monitor – which would be even more practical.
VirtualBox seamless mode

VirtualBox seamless mode: IE6 running on Vista

As for downsides, some might prefer VMware for:

  • easier virtual machine cloning
  • its tabbed interface (VirtualBox opens each guest OS in a separate window)
  • file drag and drop between desktops (although VirtualBox’s shared folders are quicker in operation)
  • smaller virtual disk images and shrinking options
  • better commercial support options.

Overall, VirtualBox is excellent. It is far superior to VMware Server and matches many of the features found in the commercial Workstation product. It is also stable, works well on Vista, and is considerably faster than the competition. I never thought anything would beat VMware, but I have now switched to VirtualBox full time. At this price, it is highly recommended for all web developers.

See also:

Have you tried VirtualBox or another VM solution?

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • locopat

    Craig, Very good article. It sums up real well things that can be done with Virtual Box. I use it on my Mac Pro to test all things windows. It works like a charm and I have a drive dedicated for my Virtual disks, using the dynamic sizing option. The only thing I found tricky was having the Shared Folders recognized as a Network drive. And where Bootcamp really affected performance, Virtual Box works without seemingly affecting my Mac OS. And, icing on the cake, it’s free.

  • http://nicholasorr.com SoreGums

    I recently switch from VMWare Server to VirtualBox about a month ago. It is far simpler and quicker to run compared to VMWare Server, its browser based interface is clunky. I thought about buying VMWare workstation, then found VirtualBox.

    Running on Vista x64 I use Gentoo(amd64) for running all my code (ruby/merb/sinatra/rails, couchdb, mysql, nginx, git), with samba linking desktop to linux for editing via E text editor. It’s a great combo as I could never leave windows desktop for full linux desktop.

  • bulletproofpoet

    Unusually, VirtualBox allows you to run more than one virtual machine from the same disk image. You could therefore experiment with different hardware configurations, but I cannot think of any other practical use.

    I may be wrong (only started playing with Virtual Box recently myself), but couldn’t you use this to create one baseline Windows disk image, and then set up two Virtual Machines (VMs) to use it? As long as you use snapshots for each VM and don’t roll them back into the baseline disk image, you could install different software into each machine (say leave one with IE6 and install IE7 in the other). I think the snapshots store incremental changes, so this method should use far less disk space than having a complete Windows setup for each VM.

    As I said, I’m new to Virtual Box myself and haven’t tried this yet (so it’s pure speculation), but that would/could be a real benefit to having multiple VMs sharing a single disk image.

  • http://www.optimalworks.net/ Craig Buckler

    @bulletproofpoet
    It’s an interesting thought, but would that work? Has anyone tried it? Cloning is still likely to be the safest and easiest option – after all we’re only talking about a couple of GB per virtual disk for XP.

  • bulletproofpoet

    @Craig Buckler
    True, it could be risky to run multiple VMs from a single base image, and I agree that a complete clone would be the safest option. It was just a thought that occurred to me, and one that I’ll try to test when time permits.

    Good review, by the way.

    Cheers!

  • jphilapy

    I use virtualbox and is nice for testing. Just be careful using the virtualbox addon tools as they can screw with your graphics. I was working on a webpage and I kept seeing an invisble box flickering when I move the mouse around the browser and then it would crash. I resolved the problem by uninstalling the tools.

    I tried to use vmware for awhile but always dredded the startup because it consumes alot of my computer resources. But virtualbox seems very quick, even faster than my web browser and I have no problem letting it hang open for awhile, though I just shut it down.

    Jeff

  • http://www.tyssendesign.com.au Tyssen

    I’ve been using VirtualBox on my Vista machine for running Linux and Windows 7 VMs. I don’t actually dip into them too much so I’m not really that familiar with how good they are (certainly better than VirtualPC though).

    I’ve just bought a MacBook and am using VM Fusion on there though as I like how I can make the guest OS take up the whole screen and using the Unity feature you can have access to apps inside the guest appear as if though they’re apps in OS X.

  • rozner

    I’ve been using VMWare Fusion for a while now on my MacBook Pro and it runs very well. I run WinXP on there and sometimes I forget it’s a VM. With VMWare tools installed I can even watch videos through the VM. I usually don’t as it’s not necessary but I was impressed with how well it works.

    It also has a quick install option for XP where you just give the product key and it takes care of the rest, so none of the dialogue screens and multiple reboots. You can just leave it be for ~30 minutes and then it’s ready to go.

    I have yet to try VirtualBox but I can’t imagine it being any better than Fusion, except for the price.

  • http://www.sitepoint.com/ mmj

    VirtualBox is awesome. I used it to test the Windows 7 Beta, as well as to test several Linux distributions and setups.

    Getting USB to work within the guest can be tricky. And forget about 3D graphics (but isn’t that the case with all VM software to date?). But otherwise it is great. SATA, ACPI, even hardware virtualization support.

  • Moggen

    I run Virtual Box 2.1.4 on my 32 bit Vista Pro laptop. Performance is excellent, and it is really easy to work with. There is a few things I have noted:
    Hibernating the laptop and powering it up again sometimes makes Virtual Box hang and use 100% of one CPU. I’m shuttning down my machines and exit Virtual Box before I do this just to be on the safe side.
    I have read in forums and blogs that version 2.2.0 sometimes refuses to uninstall properly, possibly leaving windows corrupted. Thats why I run 2.1.4. I hope the next release addresses this.
    Don’t even try to run Virtual PC at the same time… Instant blue screen on my system.

    But overall I really like it and recommend it. And it is free!

  • http://www.perhosgrafiikka.fi rdnk

    I’m also testing Virtualbox for my virtualization needs after I found VMWare a bit resource hog. Virtualbox is a lot quicker in my Ubuntu host running Windows XP guest, and what I especially appreciate is that sound works flawlessly. I was not able to get glitch-free audio from WMWare.

    Then again VMWare never crashed like Virtualbox does, sometimes even taking the whole host down. Also Virtualbox is using a lot of CPU time. Sometimes processor usage is 100% on the host for the core in which Virtualbox process is running, even though inside guest it’s not nowhere near maxed.