Friday, 4 June 2010

VirtualBox as a Server Virtualization Platform

I'm a faithful VirtualBox user since its first versions for the Solaris platform. Its simplicity and the Solaris support made it a perfect choice for me, casual user of some Windows virtual machine. I could not imagine that VirtualBox would grow so rapidly to be the kind of platform it is today. I'm really glad to VirtualBox community and to Sun for this great piece of software. 

I'm using VirtualBox even on my MacBook: it's especially useful for me to build demos. Few days ago I built a Sun Ray Server demo with a virtualized OpenSolaris (2009.06 upgraded to b134) on my Mac in a question of minutes.


VirtualBox as a Server Virtualization Platform

VirtualBox, as many of you will know, is also used as a server virtualization platform. The very Sun Virtual Desktop Infrastructure can use a VirtualBox behind the scenes. Years ago, the major stopper for such an use, in my opinion, was the lack of a functional virtualized network stack. Since the introduction of Crossbow in Solaris and the Bridged Adapter functionality in VirtualBox, there's no reason I wouldn't run VirtualBox in a server (except resource consumption considerations that are off topic here.)

Having said that, in my office I get an enormous advantage from using VirtualBox on some Sun Fire servers with ZFS. As I told on older posts (see here and here) I take advantage of ZFS snapshots and clone to build a set of preconfigured virtual machines and clone them whenever I register a new instance. Making a ZFS clone and registering a new VirtualBox virtual machine is a no brainer. You can (and should...) even script it using VirtualBox command line interfaces (such as VBoxManage.) Horizontal scalability of such an environment is very good and, moreover, our infrastructure is very cheap. Some Sun Fire X2270 M2 and OpenStorage appliances have lowered the TCO of our desktop and server platforms. Nowadays, we estimate that the typical virtual machine we're running costs us about $60 per month (including server housing fees in a datacenter.) 

If command line interface falls short and you need more advanced administration tools, you should be aware of the VirtualBox Web Console project. Honestly, I don't use it because our environment is relatively small. Surely it does have a place in a large corporate environment.

Remote Virtual Machines and Desktop Virtualization

For the reasons stated above, I no longer execute virtual machine in my own laptop except in the cases when the virtual machine will be used in an external environment (as in the case of demos for our clients.) Whenever I need to use a virtual machine, unless it's already running, I just start it remotely:

$ VBoxManage startvm your-vm-name --type vrdp

The --type vrdp flag is necessary if you want to remotely connect to the virtual machine using the internal VirtualBox RDP implementation. You can even just launch the command using ssh (in my case, certificate authentication is performed so that I can safely script it):

$ ssh your-server VBoxManage [...]

The last thing you need is an RDP client for your client platform. Solaris has got a couple of clients bundled with it. In the case of OS X I just use Microsoft Remote Desktop Connection (yes, I know...)


One virtual machine per user obviously is not the way to go to provide a virtualized desktop experience to your users. If you want to do that, you can make a step forward and use a VirtualBox powered Sun Virtual Desktop Infrastructure and give them access using Sun Ray clients. This way, we reduced TCO of desktop computers for a wide range of user profiles. When feasible, we later moved such users to a Solaris desktop access and spared Windows license fees.

Is It Ready for the Enterprise?

I would say that it depends on your requirements. I consider VirtualBox a mature and very stable product. Together with Solaris, VirtualBox can bring you plenty of advantages:
  • Reduced storage consumption: Solaris has got two (yes, two) built-in technologies that can help you deduplicate your data and spare costly space of your storage infrastructure: ZFS snapshot and clones and ZFS deduplication. ZFS snapshot and clone, alone, has helped us incredibly reduce the footprint of our virtual machine disk images in our storage arrays.
  • Observability: DTrace. Just read the documentation and learn what DTrace can do for you, even on a production system, with no downtime and no performance penalty.
  • Network Virtualization: Project Crossbow has given Solaris a very flexible network virtualization stack. Creating virtual entities such as etherstubs, virtual network adapters and so on, is easy.
  • Predictive Self-Healing: Solaris has got a set of built-in features to improve observability, diagnostics and self-healing.
  • VirtualBox virtual machine can be teleported between a source and a target host while running.
  • Desktop virtualization with Sun Ray appliances.

These a just a few of the reasons why I consider that VirtualBox can be used in an enterprise environment. Undoubtedly, other server virtualization platforms offer characteristics that VirtualBox does not implement and you should review your requirements on a case by case basis. Sometimes tradeoffs are acceptable and more profitable than overkill solutions. Anyway, where VirtualBox isn't sufficient, there aways is an Oracle VM out there.

Conclusions

VirtualBox is a very flexible product and, for the average user, is pretty simpler than full featured server virtualization platforms such as Sun xVM Server (now dead), Oracle VM, other Xen-based platforms or VMWare ESX. If your requirements allow it, VirtualBox is a software to seriously take into account. If you use Solaris, moreover, you will benefit of some of Solaris' great technologies such as DTrace, ZFS snapshot and clones, ZFS deduplication and Solaris virtual network stack (Crossbow.)

On another blog post I will describe how VirtualBox, together with Solaris, can be an easy to manage and powerful solution for small scale deployments of an enterprise virtualization platform. 


No comments:

Post a Comment