Monday, 19 July 2010

End User Desktop Virtualization on Ubuntu Linux

Yesterday I've encountered a small dilemma. Few days ago I decided to dump Windows 7 because my Huawei E1550 was not working properly with it and to move to Linux. Another thing that tipped me into doing it was the fact that I could use Xen to run both Windows and Linux simultaneously (I am sick of VMWare because of how slow and limited it is and because of it's price). So after a few days of playing with Ubuntu 10.04 (in which my modem just worked out of the box...almost) I was ready to virtualize!

But that's when had faced the dilemma - which virtualization solution to use? There are Xen, KVM, Virtual Box, QEMU to name the more successful ones. I had to do a bit of reading to decide. To be honest, there is not much information on the topic of comparing all the above virtualization platforms. There is a good source, however, which is Virtualization.Info site, possibly too complex to digest for an average end user though. I also found an article by Joe 'Zonker' Brockmeier titled "KVM or Xen? Choosing a Virtualization Platform", which basically just calmed me down a bit as I was kind of frustrated over the complexity of information available on the net in regards to the topic. Then I searched for some guides on installing any of the solutions on Ubuntu and here is my conclusion broken down:

Xen
There is controversial information in regards to Canonical dropping support for Xen in favour of KVM, which was quite upsetting. But as Canonical say - "Intrepid runs a linux kernel version which Xen doesn't explictly support, and so the Ubuntu kernel team would have had to forward-port the Xen patches from 2.6.18"
There are however good guides on setting up Xen on Ubuntu.
I decided Xen was too sophisticated to just run some Windows Apps. Xen is more of a hosting solution successfully employed by AWS for example. So I decided to find out why KVM was so great.

KVM
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux. It's built into the Kernel as a module and makes use of virtualization extensions found in modern processors. So it's quite fast! But again, quite difficult to set up. There is a good guide for Ubuntu - https://help.ubuntu.com/community/KVM.

QEMU
I can't really say anything about QEMU to be honest. I only know that it is the base for both Xen and KVM. WindowsXPUnderQemuHowTo is probably a good HOW-TO for Ubuntu.

VirtualBox
A great product supported by Oracle. From what I've heard it is lighting fast and far better than VMWare for a fraction of the download size. There is a version in Ubuntu repositories, which is Open Source but does not support USB. You can also download a free version for personal use from Oracle, which will support USB. According to this article it is also easier to use for a average end user. And this is the solution I went for using a very good guide for setting up VirtualBox on Ubuntu. Don't forget to install Guest Additions, which is basically kind of the same with VMWare Tools for VMWare.

Conclusion
I barely touched on the surface of choosing the right virtualization platform for your need topic. Yet, I am very happy with how well VirtualBox worked for me and with its performance. So, I suggest you go with it if you intend to run another OS along with your primary one, which should be Linux :-) I am also interested in using any virtualization solution suitable to run OSX, so if you have any information about that - let me know.

3D 
As a bonus here is some information on running 3D applications on your virtual guest -  Full OpenGL 3d Acceleration.