Blogs
KSM - Kernel Samepage Merging and KVM
Here at Bitcube we use KVM as our preferred virtualisation platform. It has the best Linux support and is the standard for all Linux distributions. Whilst it still shows a bit of immaturity at times, there is an upside - rapid development and improvements.
Puppet errors - explained
Wonderful though Puppet is, it can be frustrating when it spits out an error message which makes no sense.
We could keep all this useful information to ourselves, however we are a caring, sharing company and so we've spilled the beans.
Without further ado, please see our guide to Puppet errors.
Puppet dashboard - early days
Reductive Labs, who produce Puppet recently released an early version their dashboard tool. You can have a look at their brief tour as well as the code repository and documentation site which is here.
It's clearly early days both in terms of the dashboard (v0.2.1) and in terms of our experience with it. To be frank in it's current state it's a pretty tool however it lacks a large amount of functionality which would make it actually useful.
Dropbox check for Nagios
For one of our customers, we are using the fabulous Dropbox tool to perform synchronisation (in this case between a website and the client's workstation).
In order to monitor that Dropbox is running correctly we've written this Nagios plugin which we are using together with Opsview which is our preferred Nagios implementation at the moment.
Memtest failures
Background
One of the most common causes of "random crashes" is bad memory. Proper server hardware has ECC memory which can detect and correct most occurrences. For cheap development hardware and most home PCs, ECC memory is sadly not usually an option and very rarely used when it is available.
Syslinux and netbooting refresh
VMWare server and paravirtualisation
Virtualisation has gone through four main phases:
- full software emulation - every instruction is emulated - very, very slow. (Bochs)
- software virtualisation - instructions are checked but most run natively. (VMWare server)
- paravirtualisation - the guest operating systems know they are virtualised and are tweaked appropriately (Xen)
- hardware assisted virtualisation - the CPU provides assistance to the above methods (KVM)
The programs above are only very roughly categorised, for example virtio provides paravirtualisation to KVM.
Another week, some more packages (facter, openssh, sudo), Linux LDAP integration
One of our puppet rules ensures that NTP (which ensures that the server has the correct time) is not installed on any virtualised guest images where the time is supposed to be taken from the host automatically. Unfortunately "facter" which should provide this information still hasn't applied patches submitted over 6 months ago. So we've rolled our own package instead for use on Debian Lenny.
Converting KVM images to logical volumes
When creating virtual disks for KVM you can use several methods. Most people use flat files in one of several formats - raw and qcow2 being the most popular. qcow2 files can compressed and also have "holes" (where unused space doesn't use up real space).
We recently converted some old systems from flat files to using logical volumes as it's the recommended approach these days.
If you are using raw flat files (use "qemu-img info filename.img" to find out) then you can just use "dd if=filename.img of=/dev/rootvg/logicalvolume".
KVM machines not shutting down?
If you use the "libvirt" virtualisation abstraction layer, you can ask it to shutdown machines. As with anything, you need to test this - certainly at some point in the past if could even just remove power from the VM in question.
Two things are important, today we've found a third :-)
Firstly you must tell libvirt to use ACPI - in the XML you need a section like this (the <acpi/> is the important bit!):
<features>
<acpi/>
</features>
