Virt-install with kvm
If you are using virt-install to create KVM virtual machines on RHEL or CentOS 5, be sure to specify the ‘–accelerate’ option. If you don’t use accelerate, virt-install starts ‘/usr/bin/qemu-system-x86_64’ rather than ‘/usr/libexec/qemu-kvm’. This isn’t what you want, and it will fail with the error message “internal error Domain $YOUR_VM didn’t show up”. What happened in the background is that libvirt set the machine type to rhel5.4.0, which lets qemu-kvm know it can use virtio, but this machine type is not understood by qemu-system-x86_64. If you check ‘/var/log/libvirt/qemu/$YOUR_VM.log’, you’ll see a detailed error like \ \
Getting ip addresses with facter
When configuring services with Puppet, you sometimes need to know the IP address of a server. For example, I export nagios host definitions from many of my servers and use them to configure my nagios service. Facter ships with two sets of network-related facts that can help.
Splitting fasta with biopython
A student in the lab associated with my employer asked me for advice on how to extract records from a FASTA file. The hitch was that he wanted a large number of records, on the order of thousands, and the FASTA file was even larger, containing tens of millions of records. The first approach that came to my mind was splitting the file into chunks that were small enough to fit into memory on the nodes in our cluster. This would allow multiple CPUs to search for the records of interest while eliminating the greatest potential performance killer, lots of disk seeks. I’d never used Biopython before, so this request seemed like a good excuse to try it. It turned out to be remarkably easy to learn enough to accomplish what I wanted; going from idea to tested code took about an hour.