Understanding xVM: Foundations
Posted on September 27, 2009
As of Solaris Nevada Build 121 the virtualization technologies within Solaris have hit a very important milestone. Solaris Containers (Zones) are exceptional and well proven as a powerful solution. xVM (Xen) has been rev’ed up to Xen 3.3.1 and is both mature and capable. VirtualBox continues to provide a solution that competes strongly against VMWare solutions, especially given that its got better cross-platform support, runs as fast as VMware Workstation or Fusion and lets not forget is free! And the powerhouse duo of ZFS and Project Crossbow’s VNIC capability seal the deal creating a virtualization platform unlike any other. The great cherry on the virtual pie comes with xVM’s vdiskadm for managing virtual disks, including the ability to convert between all the major disk formats including VMDK, VDI, VHD, and raw. Virtualized disk, virtualized network, exceptional resource controls within the OS, coupled with best in class solutions for heavy, light, and desktop virtualization! Power house!
Lets dig into our foundations of virtualization on Solaris, namely ZFS and Crossbow.
ZFS is that all seeing, all knowing, all powerful storage solution (“file system” is too small a label). Nowhere is ZFS more useful than in the arena of virtualization, particularly when we consider “raw” (or block) virtual disks. When working with Zones you need a filesystem on which to store the virtual disk image, which is really just a root filesystem on a normal filesystem. However when working with xVM (Xen) or VirtualBox we can swing either way, using big files (such as VMWare’s VMDK) or a volume (“raw”, /dev/dsk/something). This is where ZFS shines, it can provide both within a single coherent namespace. Furthermore, each virtual environment, whether filesystem or volume, is managed the same, has the same capabilities, and uses a single storage solution. Whether your using a 20GB volume or a 20GB filesystem they are both just datasets which can be snapshoted, replicated, and tuned the same way. This is a huge win. We could even use it to create NFS, CIFS, or iSCSI volumes for the purpose if we like.
Crossbow’s Virtual NIC’s (VNICs) virtualize the network in a uniform and manageable way. Network virtualization is a key requirement for any virtualization technology, but most do it very poorly and each uses its own method with its own ins and outs. Generally the best method is just to “bridge” an instance to a real device. With VNICs we can create all the network devices we need and bridge them into our environment, regardless of what it is. Because they are managed by the OS we get a lot of optimization, stability and observability to boot. Crossbow includes resource management, we can watch network flows and limit bandwith or change traffic priorities, we can manage MAC’s and get per-link statistics. Thanks to VNICs I can monitor the network usage of any of my virtualized environments without the slightest concern as to what it is… Zones, VirtualBox, Xen? All the same to me.
Solaris provides much more, but these two are the most essential and with Build 121 they are very stable and robust technologies ready to take a beating.
Now, to get started with xVM I recommend a solid understanding of these two technologies first and foremost. Get a system running snv_121 or newer and make sure you install all the goodies. For simplicity sake I strongly recommend using a full install of SX:CE for the simple reason that everything you need is already installed whether you think you need it or not; this makes learning must easier.
Also I do recommend UFS root if you can, it makes ZFS observability much easier when you aren’t seeing standard OS activity to and from the zpool, at least initially.
In the next couple blog posts I’ll introduce xVM features and explore some of the unique things Solaris offers. For the impatient there are lots of good resources on opensolaris.org, in the Solaris 10 Doc Set, or in books like The OpenSolaris Bible (highly recommended, have it on your desk!).
Everything I’ll be discussing here will assume snv_121 or newer, prior to this build I had a great many reservations but now she’s primed for action. I initially supported Solaris inclusion of Xen and then quickly became a critic when it stole mind share away from Containers… but alas, customers acceptance of Containers has shown that it is definitely the preferred virtualization technology within Solaris and I no longer feel there is a war for survival between the two.