Xen and LVM Snapshots
I’ve been setting up a meeting at work to try to introduce some of the newer or most helpful technologies present in Linux that other administrators may not know about. Mostly an introduction to RAID, SELinux, LVM, and Xen with a few other goodies for good measure.
A while ago someone (that wasn’t overly cluefull) mentioned that LVM snapshots will work with Xen. Of course, they work just like any other LVM volume would. But the idea was cool. Could you setup a machine, snapshot it, and then create multiple, identical Xen domains? Yeah, not too hard.
Xen did not like the yenta-socket module for driving my pcmcia. I knew that Xen didn’t support pcmcia but on module insert the system locked hard. I added a grep command to filter the output of kmodule -d in rc.sysinit as well as disabled the pcmcia service.
The xm config file for starting a guest domain can not have spaces in the “name” variable. If it does you’ll get a python traceback with the error “No such file or directory.” This is documented on the Fedora wiki as happening if there is not enough physical RAM for your guest. I wonder what else causes this traceback?
Also, there are a few known bugs about udev causing funness. In your snapshots you’ll will need to create /dev/console or the kernel will be unable to open its initial console.