According to Wikipedia: “Virtualisation, in computing, is the creation of a virtual (rather than actual) version of something, such as a hardware platform, operating system, a storage device or network resources.” For the purposes of this article, I will deal primarily with operating system virtualisation.
Operating system virtualisation allows one OS (the guest) to be run completely within another OS (the host), like an application. For example, Windows can be run on Linux, or Mac OS X.
Virtualisation is one of the technologies that will shape the way the world computes in the future. It makes it possible to carve up, allocate and manage compute resources in new ways, allowing new degrees of freedom in systems design.
While virtualisation has already found a solid footing in the enterprise market, it is still a relatively new technology in the user space. I will compare three popular virtualisation products, and grade them on ease of use, performance, features, licensing and support. As I go through the comparisons, I will attempt to cover not only the specifics of the products themselves, but also the underlying concepts. Finally, I will analyse the scores of different products from the standpoint of different types of users.
The products I will be comparing are VMWare Player, VirtualBox and KVM. I have chosen these since they are all free of charge for personal use, and have large user communities. I have deliberately excluded VMWare ESX and Xen, since they are both targeted at enterprises. Due to this, despite the fact that they shine on expensive enterprise-grade servers, neither is designed to work with commodity hardware. ESX, for example, refused to install on my test system, altogether.
Virtualisation being a relatively new technology, its language is still evolving. Most terms in the virtualisation space have several meanings, depending on which vendor you speak to. In order to avoid confusion, here are translations into English for some of the jargon that I will use:
- Virtual machine: A VM is a completely isolated instance of an operating system (guest) running inside another operating system (host).
- Hypervisor: A hypervisor, or virtual machine manager, is a software layer that presents the virtualised hardware platform on which the VM instances run. There are two types of hypervisors:
- Type 1 hypervisors run on “bare metal” — that is, they do not require a host OS. In this case, the hypervisor acts almost as the OS itself.
- Type 2 hypervisors require a host OS, and run as an application.
- Full virtualisation: In full virtualisation, every part of the underlying hardware is virtualised and presented to the guest. This means that the guest can be completely unaware that it is running in a VM and not a physical machine.
- Para-virtualisation: In para-virtualisation, the underlying physical hardware performs tasks that function poorly in a virtual environment. This requires the guest OS to be aware that it is running in a virtual instance. Some virtualisation products provide this functionality as a set of drivers to be installed into a guest OS, while others require the OS itself to be modified.
- Snapshots: A snapshot is a point-in-time capture of the VM. Different products classify snapshots differently. However, the most common understanding of the feature is that a snapshot preserves the machine in suspended animation — that is, the contents of memory and state of the CPU are written to disk, as is. When the machine is restored, the operation resumes from where it was left off. This allows point-in-time recovery, and an ability to roll back unwanted changes.
- Live migration: In the context of virtualisation, live migration is the seamless transfer of a running guest from one physical host to another. Live migration is an advanced feature, and many hypervisors impose restrictions on the source and destination system, most commonly that the CPUs of both need to be identical (homogeneous systems). Live migration between non-homogeneous systems is more complex, and consequently supported by fewer hypervisors.
For the purposes of the evaluation, I used an Ubuntu Server (Natty Narwhal) installation on a white-box desktop-class machine, with an AMD Phenom II X6 1090T hexa-core processor, 8 GB of RAM, and a Seagate 7200 RPM, 1 TB SATA hard drive.
Asking the right questions
One route to evaluating anything is to understand the need. The first question on this route is: “Why, if at all, should I use virtualisation?”
This question is important, because unless you understand your need, it is very simple to get stuck with the wrong solution — and nothing is worse than
spending weeks tweaking your VMs to get them configured just enough to work, and then discovering that the feature you need is available out of the box in a different product.
Some reasons to virtualise:
- You need a different OS to run a particular application — for example, games that run only on Windows, code that can only be compiled on a native Linux machine, etc.
- The need to standardise environments across a group, such as a locked-down development environment for a contractor, several developers collaborating on an open source project, etc.
- Centralising, optimising and sharing resources, as in virtual desktops/servers sharing data-centre hardware.
The list goes on and on. Ultimately, there are as many use-cases for virtualisation as there are users. While it is possible to analyse one’s use-case to the last CPU cycle, and choose the right product based on mathematics, it is usually overkill from the standpoint of the average user. It is often simpler to make a choice based on the user’s skill level and patience.
The question then becomes: “How do you classify yourself as a user?” I usually see users in four categories, based on their profile (see the Box). Given that the user’s profile usually correlates to the use-case, at least in a broad sense, it is simpler to choose the product that works best for the user.
Later in this article, I will apply this approach and rate the products, first objectively, and then relative to the user profile.
|How do you classify yourself as a user?|
The enthusiast is usually at the forefront of the technology adoption curve, picking up the hottest new technologies from the bleeding edge. Enthusiasts are usually motivated by the possibility of bragging rights, and so will go to some lengths to learn and use a new piece of technology, even if they don’t necessarily need it for any particular purpose.
The technology is an end in itself. Enthusiasts are typically willing to sit through hours of troubleshooting just to get a cool feature to work. Once they get it working, they like to talk about it and write articles for other users. Enthusiasts are usually motivated by features, performance, and very often, licensing. They will commend ease of use when they see it, but usually won’t stop using a product just because it is tough to use.
Architects are usually visionaries. They look at new technology less emotionally than enthusiasts, and more from a practical standpoint of what it can accomplish for them. Architects are usually motivated by the same things as enthusiasts, with the difference that their priorities on different metrics are based on the job they need to accomplish. For example, an architect might choose a product with a great set of user-level features for a user-oriented project, and reject the same product for a different project where performance is more important.
The executive typically is not a technologist, but uses technology to supplement his primary function. For example, an accountant who owns a Mac may run a Windows VM to run Tally. Executives typically have a fixed set of requirements, and rely on architects and enthusiasts — architects more than enthusiasts — to tell them which product will work for them.
Executives typically look for ease of use first, with features a close second. Performance is “‘nice to have”, and licensing is usually not a concern for executives, unless it requires them to pay.
Followers use technology mostly because everyone else is using it and they are forced to, in order to comply. This bunch is primarily concerned with ease of use and minimal user involvement. On features, they look for things that make their life easier. On performance, they are usually willing to trade better performance for better usability. This group, too, is usually clueless about licensing.
VMWare is one of the oldest players in the virtualisation market. Founded by Diane Greene, Mendel Rosenblum, Scott Devine, Edward Wang and Edouard Bugnion in 1998, VMWare launched its first product, VMWare Workstation, in 1999. VMWare Player is a clipped down version of the paid VMWare Workstation product.
Let’s take a look at its features.
Creating, editing and managing VMs
Initially, VMWare Player did not allow users to create their own VMs. After version 3, this limitation no longer applies, though several features available in VMWare Workstation are missing on VMWare Player. For example, VMWare Player defaults to a SCSI hard disk during VM creation. This cannot be changed, unless the VM is edited in VMWare Workstation. While this does not pose a problem for the average user, power users who like to tweak configurations will find this irritating. The same limitation also applies to the virtual NIC.
One cool feature during VM creation is EasyInstall, which allows you to customise the guest OS with such things as licence keys and user accounts, directly through VMWare Workstation, without interacting with the guest during installation. This means that you can now start that long OS installation in your VM before hitting the sack, and wake up to a fully installed OS.
The network stack on VMWare Player is also noteworthy. VMWare allows three modes of networking for the guest: bridged, NAT and host-only. What I particularly like is that in NAT mode, VMWare creates a virtual network interface and assigns an IP to the host on the same subnet as the guest, allowing network communication between the guest and the host over the NAT interface. VMWare’s approach to virtual networking makes it very easy for the user to switch between networks. It is almost akin to pulling your LAN cable from one switch and plugging it into another.
While VMWare may be finicky about the hardware that it uses for its bare-metal hypervisor, the support for end-user devices that VMWare Player inherits from VMWare Workstation is quite good. VMWare is usually able to recognise the device type (for example, my installation could differentiate a USB webcam from a pen drive) and treat it accordingly.
One of the most beloved features of VMWare Player/Workstation is virtual printing, enabled through VMWare’s partnership with ThinPrint Inc. Essentially, any printer installed on your host can be used by applications running in the VM, without installing additional drivers. This is a super feature when it comes to convenience, since most printer driver installers take forever to download and install, on account of bloat-ware.
VMWare Workstation offers the ability to snapshot incrementally, thereby allowing multiple points of recovery. VMWare Player, however, does not have the snapshot feature at all. If you really wanted to back up your machine, you could copy the VM folder altogether, providing a poor man’s snapshot capability. However, VirtualBox and KVM both come with snapshot support out of the box in the free and open source versions.
The Unity feature allows applications running in the guest to integrate seamlessly with the host. This works particularly well when the only reason to run a guest at all is to use a particular application. With Unity, you can continue to use your own familiar desktop, with the application from the guest fully integrated. The only limitation is that the guest application continues to see the filesystem of the guest. However, with the ability to share folders between guests and hosts, this is easy to work around.
Another much-touted VMWare feature is the ability to drag and drop files between the host and the guest, and between guests. While “drag and drop” works well when both the host and the guest are running Windows, it is somewhat limited for other OSs, such as Linux.
Ease of use
VMWare Player is one of the easiest products to use, because of VMWare’s great packaging and simplified user interface, particularly if it is used for its intended purpose, which is to run pre-built VMs. Several VM appliances, preconfigured for common use-cases (like a LAMP server, Ubuntu Desktop, etc) are available for download, and can be run with little or no configuration changes in VMWare Player.
The VMWare download site was particularly slow on both my broadband connection and high-speed data card. It took about three hours and two attempts to download the 105 MB binary. Also, since VMWare requires you to sign up and accept several pages worth of legal agreements before any download, there is no link that can be used to download directly from the command line. Since I was running a headless system, with no browser, I had to download to my desktop and then copy the file over the network. However, after the download, the installation was fairly simple.
VMWare’s administrative tools are usually rather slick. However, much of the goodness of the VMWare Workstation UI is missing in VMWare Player. The entire experience is of using something that can do more, but has been artificially stripped down. The VM runs in a floating window on your desktop, or in full screen mode, while the VMWare Player inventory stays in the background as a separate window.
There is no ribbon with convenient power buttons as with the paid version. All options are tucked away under menus. The Virtual Machine settings page allows you to change machine settings — except, of course, the hard drive.
Look and feel
Having been in the desktop user-space for a while, VMWare has learnt its UI lessons well. VMWare Player definitely scores high on the look-and-feel aspect. Even over a remote X server connection, the VM display remained smooth and responsive. The mouse-pointer integration works extremely well. Cute features from the paid version, like “quick switch” and “docked view”, would definitely be nice to see in the free version.
VMWare uses a mix of full virtualisation and para-virtualisation. According to VMWare documentation, VMWare combines the best of all worlds, and picks the appropriate virtualisation strategy for each task. On VMWare’s bare-metal hypervisor ESX, the para-virtualisation support allows fairly drastic performance improvements. However, on VMWare Player, I found the performance relatively poor (see Table 1 towards the end of this article for a comparison).
In my experience with VMWare, your mileage will definitely vary on the performance front. As long as you comply with the draconian VMWare Hardware Compatibility List (HCL), you get the benefits of all of VMWare’s proprietary technology. However, any deviation from the HCL and you are on your own.
Licensing and support
VMWare Player is distributed “free, as in beer”, with a closed-source licence for most of its constituent parts. This immediately makes it unattractive from an open source standpoint. Since VMWare’s focus is enterprise, they have several partnerships and collaborative efforts in place with industry biggies like Cisco and Dell. As a result, much of VMWare’s development is directed towards industry-standard operating systems, with support for bleeding-edge releases of Linux OS flavours somewhat lagging.
There is an open source project that stays ahead of the curve on VMWare Tools features (open-vm-tools) but again, as with non HCL-compliant hardware, you’re on your own with it.
Moreover, I have increasingly found that VMWare’s communities are dominated by enterprise users, and finding community support to solve tricky configuration issues at the bleeding edge is difficult. VMWare’s exorbitantly priced support is also unresponsive when it comes to uncommon support issues, particularly with non-compliant or experimentally supported hardware.
On a scale of 5:
- Features: 3
- Ease of use: 4
- Performance: 3
- Licensing and support: 1
Oracle VM VirtualBox, or simply VirtualBox, was originally developed by German software company Innotek, which was acquired by Sun Microsystems in 2008. Sun, in turn, was acquired by Oracle in January 2010. VirtualBox supports most common virtualisation features extremely well, and some uncommon ones as well.
Creating, editing and managing VMs
Creating VMs on VirtualBox is at least as easy as on VMWare Player. The edge that VirtualBox has over VMWare Player in this regard is a wider range of options to choose from, with regard to virtual hardware. For example, you can choose what model of network card should be emulated (PCNet PC II and III, Intel PRO/1000 and virt-io), as well as the disk type (SCSI, SAS or IDE).
VirtualBox allows the addition of virtual hard disks after creation, a feature missing on VMWare Player. VirtualBox also supports several disk formats, including the VMWare VMDK, which makes it easy for users to migrate to it. You could simply boot your VMWare disk on VirtualBox (some limitations on the VMDK type do apply) and test out the functionality for yourself before porting over, if at all required.
VirtualBox provides the same networking modes as VMWare Player (Bridged, NAT and Host Only), but without network connectivity between the guest and the host in NAT mode. To reach the guest from the host, or vice-versa, you need to set up a second interface with host-only or bridged networking.
In this department, VirtualBox lags somewhat behind VMWare Player. USB 2.0 support is only included as a closed source extension. VirtualBox also doesn’t have the same class of printer support as VMWare does, which means you have to install drivers for all your printers in the guest OS.
VirtualBox fully supports snapshots, including multiple snapshots and branching of snapshots. This means you can use VirtualBox to maintain several versions of the same VM. The shared folders work extremely well, as does the clipboard integration, making VirtualBox all the more desirable as a desktop virtualisation solution.
Live migration is supported between non-homogeneous hosts, something that even VMWare and Citrix enterprise hypervisors struggle with. While this may not be something the average home user would use, from a systems design standpoint, this is definitely interesting.
VirtualBox also officially (albeit experimentally) supports Mac OSX guests — and that too, without any hacks on the OSX DVD!
VirtualBox is installable from official software repositories of most common Linux distros, which means that it’s downloaded from the closest mirror, making for a relatively quick download. Once the defauly distro installer is done with the installation (which is usually running a single command), there are no additional steps required to get the software up and running.
VirtualBox comes with a great administration interface that allows users to create, modify and manage VMs. Command-line intervention is usually only required for very advanced experiments. Most operations that an administrator would need are available and easy to access. Some of the settings, like the hard-disk-management page, are somewhat hard to find — but overall, the platform is extremely easy to run and manage.
Look and feel
The look and feel of VirtualBox is comparable to VMWare’s in terms of the smoothness of the experience. Mouse-pointer integration is smooth, and VirtualBox is fairly verbose about what it is going to do with regard to the mouse, even without the guest additions installed in the VM. Things like scaling and resizing of the VM display to fit the application window are adequate, even if not in the same league as VMWare.
One of the major distinguishing features of VirtualBox is its claim that it does no para-virtualisation. In fact, VirtualBox and KVM seem to be at loggerheads over the subject. VirtualBox’ site says: “VirtualBox is [also] different from so-called ‘para-virtualisation’ solutions [such as Xen], which require that the guest operating system be modified.” On the other hand, KVM says: “So-called ‘full virtualisation’ is a nice feature because it allows you to run any operating system virtualised. However, it’s slow because the hypervisor has to emulate actual physical devices such as RTL8139 network cards. This emulation is both complicated and inefficient.”
Religious debates aside, while libvirt (KVM’s almost-but-not-quite para-virtualisation library) provides phenomenal performance (see Table 1 for comparison), VirtualBox is not too far behind. Moreover, despite the comments about para-virtualisation on the site, VirtualBox also supports the KVM virt-io standard for the virtual network adapter, which allows it to provide almost comparable transfer speeds to KVM. However, virt-io requires the guest to be virtualisation-aware. So while this works out-of-the-box for newer Linux distros with libvirt included, Windows systems will require an installation of the virt-io driver.
Licensing and support
VirtualBox comes as an open source core system supplemented by proprietary, pre-compiled extension packs for additional functionality, such as RDP, PXE boot and USB 2.0 support. The extension packs are released under the Oracle PUEL (Personal Use and Evaluation License), while the core is released under GPLv2. All of the components are free of cost, with the proviso that the extension packs will be used under the guidelines of the PUEL. Most of VirtualBox’s features are available in the open source version. The only notable absentee is USB 2.0 support.
The VirtualBox community is extremely vibrant and responsive, and solutions for most user issues are merely a Google search away.
On a scale of 5:
- Features: 4
- Ease of use: 4
- Performance: 4
- Licensing and support: 4
KVM, or Kernel-based Virtual Machine, is a virtual machine implementation that uses the Linux kernel. Invented and maintained by Qumranet, a technology start-up acquired by Red Hat in 2008, KVM is included out-of-the-box with Linux kernel versions 2.6.20 and above.
Creating, editing and managing VMs
Creating VMs is simple enough with the virt-manager tool. However, importing an existing VM (from both VMWare as well as VirtualBox) and converting it to run on KVM was nightmarish. For some reason, when KVM is told to use an existing disk, it silently assumes that the disk it is being pointed at is a raw disk format, even if the disk file has a different extension. In order to get my KVM machine to boot, I had to export the VM definition as an XML file, change the disk type manually, and then reimport it.
KVM offers, by far, the most choice of all the three products reviewed here on virtual hardware selection. Several different types of hardware can be emulated, based on user selection. KVM also allows both NAT and bridged networking. However, the bridged network mode requires setting up a bridge on the host, manually, which can be tedious.
Since KVM is part of the Linux kernel, it supports most devices that Linux does. Moreover, since KVM has a large open source developer community behind it, support for new devices is usually quick to appear. However, KVM’s device support is far more appealing from the perspective of server virtualisation than the desktop, at least for the average user.
KVM’s feature set is mainly systems-oriented, without too many cute user-land baubles. Live snapshots of guest VMs are supported, from the command line. There is no concept of shared folders or clipboard. USB support is included out of the box. KVM also supports live migration of guests between non-homogeneous hosts.
Ease of use
KVM is the least user-friendly of the three products reviewed here. It has all the distinctive signs of a product by, and for, the elite geek or the expert systems architect.
Simply put, none required. KVM comes backed in with the Linux kernel. The only installation I required was that of virt-manager, a graphical tool to manage VMs, which was a simple installation from the distro’s package repository. Unfortunately, I also had to install several X libraries on an otherwise headless system, and then access it through a remote X session. The alternative was to spend several hours mastering the command-line language of KVM and virsh, the command-line tool for managing VMs.
Even with virt-manager, which simplifies things drastically, KVM’s administration requires familiarity with virtualisation. If you know exactly what you are looking to accomplish, KVM will probably have the means to accomplish it. However, if you are unsure of your need, it is very easy to get lost within KVM’s myriad options. Also, the administration console is not very good at giving user feedback.
For example, changes to a VM that require a reboot can still be made while the machine is running, and will be applied the next time the machine reboots. However, after the change is queued up, there is no visible indication that a change is pending, until the reboot happens, and the change takes place. For an inexperienced user, this sort of behaviour can be quite confusing.
Look and feel
KVM is definitely not in the same league as VMWare Player or VirtualBox when it comes to look and feel. The VM display is over VNC, the quality of which is dependent on the network link between the client and the KVM server. On my installation, the VNC display refused to recognise several keys altogether, resulting in my having to use a different VNC client. Mouse-pointer and clipboard integration are also not as good as the other two products.
Performance is where KVM outshines both VMWare Player and VirtualBox (see Table 1 for a comparison). The secret behind KVM’s success is the use of the libvirt libraries and the VirtIO network and hard disk interfaces. VirtIO is very similar to para-virtualisation, the only difference being that while para-virtualisation requires the entire guest OS to be modified (for example, Xen’s requirement that guests run the Xen kernel), VirtIO works by installing components inside the guest. These components are included as the libvirt libraries in most of the new Linux distros. However, for Windows guests, this means that a VirtIO driver needs to be installed.
For disk I/O, KVM allows the virtual hard disk to be mounted in write-back or write-through mode. In write-back mode, the process of writing data to disk receives an acknowledgement of the write having occurred immediately after the I/O subsystem receives it, even if it has not been committed to disk. This means that processes run faster. However, data in transit (written but not committed) is stored in volatile memory, and so a crash or power outage will result in data loss.
For mission-critical systems that require high data integrity, the write-through mode is preferable, since it guarantees a commit to disk. However, the existence of the write-back mode means that KVM machines can be tweaked to perform disk I/O at super-fast speeds.
Licensing and support
KVM’s licensing is hard to beat for attractiveness, since it’s completely open source, with all the components released under the GPL or the LGPL. The KVM user community is somewhat biased towards developers and systems designers rather than end users, so finding solutions to problems requires some background and understanding of the platform. Essentially, you can find help, but you really do have to read the manual.
On a scale of 5:
- Features: 2
- Ease of use: 1
- Performance: 5
- Licensing and support: 4
|Table 1: I/O performance comparison|
|Disk I/O (time to copy a 100 MB file using dd)||0.97 seconds, 105 MBps||0.63 seconds, 161 MBps||0.545 seconds, 188 MBps (write-back mode)|
|Network I/O speed (using iperf)||1.31 GBps||2.01 GBps / 3.3 GBps with virtio||4.61 GBps|
To sum up the comparison, look at Table 2.
|Table 2: Performance summary|
|Features||Ease of Use||Performance||Licensing and support||Total|
From a look at the score board, VirtualBox clearly outshines the other two products by being better than average in all the categories, even if it doesn’t top any of them, with KVM next, and VMWare Player last.
Let us now see what these scores mean, from the viewpoint of different types of users.
From the enthusiast’s standpoint, KVM would seem like the best choice, since it has the most configuration options. Enthusiasts will find plenty of new combinations of settings to experiment with. KVM’s lack of end-user features and complexity of use also give it the flavour of being a tool for the elite, which the enthusiast is likely to find appealing.
Next in line is VirtualBox, which offers fewer options, but still enough to keep a geek interested. Moreover, getting bragging rights on VirtualBox doesn’t require you to have a PhD. Simply reading the manual and following the forums will suffice.
VMWare Player is last in line for this category of users, since it offers very limited customisability.
For architects, the requirement determines the choice of component. For server virtualisation with an emphasis on performance and scale, KVM is the clear choice. For end users, VMWare Player is the best choice, since it can run a VM authored on Workstation in a manner that makes it extremely easy to use, particularly for a user who’s not tech-savvy. However, for prototyping and getting off the ground quickly, VirtualBox’ superior feature set makes it the tool of choice.
From the executive’s standpoint, VirtualBox is the product with the likelihood of meeting the most requirements at the least cost. If budget was not a constraint, VMWare Player’s paid version, VMWare Workstation, could give VirtualBox a run for its money on features. VirtualBox provides many more features in the free version than VMWare. The exception to this is if the VM is being authored elsewhere, and VMWare Player is being used only for access. In that scenario, VMWare Player is much easier to use than either of the other two.
KVM is not really a solution for the executive at all.
From the follower’s viewpoint, the ideal and often only supportable option is to use VMWare Player to run existing VMs (created by Workstation). Next in line is VirtualBox. As with the executive, KVM is not an option for the follower.
The author is an independent solutions architect, with a background in virtualisation sales and support to Wall Street and other Fortune 50 customers. He is also technology adviser to CGNet Swara, a mobile phone based community media platform.