The Virtual Bandwagon
19 December 2006 | 10:50 | Administration, Linux | No Comments
It seems that everyone is jumping on the virtualisation bandwagon. Reasons such as server consolidation and improved management seem to be pretty compelling to system administrators, and features such as live migration could be the icing on the cake. Can virtualisation save me too?
The three biggest headaches I have are resource management (e.g. continuously running out of disk space on /), service immobility, and keeping the system current. Regarding the last point, there’s a primal urge to respond when your system status script notifies you that your tar-1.16.r1 has be superseded with 1.16.r2. Who can resist this call to action? Not I! But every time I update installed components I find myself backing up all the configuration files (despite the fact that they haven’t changed since the last update and are included and backed up in my configuration file subversion repository), silently crossing my fingers, and hoping for the best. In addition, my experience/paranoia with hard disks compel me to run the system in a RAID-1 configuration (backup? bah!) which results in the system incurring a non-trivial overhead - particularly with regard to write performance.
Dynamic disk allocation could be achieved with LVM, or - you guessed it - virtualisation.
System portability is by definition a feature of virtualisation, so service separation into different VMs seems to be a reasonable solution to start uncoupling services from physical machines.
With the ability to checkpoint and clone VMs, virtualisation can be used to perform “test updates” - item 3: check!
Now that my spare room has appeared to morph into a data centre, what virtualisation technology is right for me?
There’s Virtual Machines (VMware, Microsoft Virtual Server, Parallels) which emulate all the hardware. It is the most flexible option as you can “pretend” to be running any hardware as far as the guest VMs are concerned, but it’s also most resource intensive. In addition to being isolated from each other, the VMs are isolated from the host machine.
Then there’s Paravirtualisation (Xen) which uses a hypervisor to manage and isolate the VMs either by hardware (using Intel’s VT-x or AMD’s SVM CPU level virtualisation found in recent chipsets) or by loading customised versions of the host OS which has been modified to be aware and behave for the hypervisor. The guest VMs are executing their code natively (albeit under the control of the hypervisor), which means you can only run software targeted for the hardware you are running it on, and if you don’t have a new whiz bang CPU, this limits your guest OS choices to pretty much Linux only. This performs considerably better than the previous option.
Finally there is OS level virtualisation (Solaris Zones, Linux-VServer, Virtuozzo/OpenVZ) which adds a virtualisation layer to the host OS. This is the most limited option, as all your guest VMs need to be the same as your host (although in the case of Linux, not the same distro), but also has the smallest overhead (only 1-2% of resources are spent on virtualisation). Each VM is essentially a chrooted/jailed full file system that is mounted by the host and share the (patched) host kernel (gross simplification - but it is essentially the how it appears to the administrator). What this gives you is full access to the file system of each VM from the host, regardless if it’s running or not.
So where does this leave me? On account of me only running Linux (on the server at least), OS flexibility (or inflexibility) was not a factor. More important was performance - particularly on older hardware, and price. The choice looked between Xen and OpenVZ. When ever I’m faced with a choice, I invariably choose the simplest option (at least initially) and in this case it clearly seemed to be OpenVZ.
Two weeks on and I’m loving it! I can run a debian-based webserver, MySQL under centos, and all my custom services from a gentoo server. I can bind a mount point to each VM (or VE - Virtual Environment - in OpenVZ-speak) to allow the virtual machines share disk which is great both for general storage and things like a portage tree. From the host (or HN - Hardware Node) I can monitor and tune a multitude of resource allocations for each VE which are reflected immediately.
The only area lacking in this solution would appear to be a good monitoring/management interface - but I’m working on it. Stay tuned for further virtual adventures!
WoW Linux!
5 December 2006 | 12:35 | Entertainment, Linux | No Comments
With the latest beta release (6.0.0 beta 3) of CodeWeaver’s CrossOver Linux (formally CrossOver Office) I am finally able to install and run World of Warcraft flawlessly on Linux. In fact, it seems to run better than under Windows XP on my laptop! I tried Cedega and Wine, but neither was as simple and functional as cxlinux.
Although I haven’t used either in quite a while, I’m still concerned about being able to run Adobe Photoshop and Premier, so this may not be the silver bullet to allow me to fully get rid of Windows - but I am definitely getting close. And one 10GB partition out of 4 PC’s and 1.5 TB of disk is a manageable ratio.
People seem to have positive experiences running Photoshop under cxlinux and I’ll be sure to try it out when the need arises.
It it worth the asking US$39.95? HELL YES! Even though I believe pretty much all the code updates are passed upstream to the Wine group, and generally I’m more a DIY person (computer-wise that is), the simplicity of the pre-configured settings for specific applications can not be undervalued.
I can’t wait for the official release!