Saturday, November 15, 2008

xen on fc8 lessons learned

So, one of the things we had to do recently was to move off of amazon ec2 and appnexus, onto our own environment in the datacenter. Our datacenter environment runs fedora (fc8), and we don't have bandwidth at the moment to upgrade to fc9 or centos. You'd think that installing xen would be straightforward, but there were a lot of quirks that I ran across.

1) The machine I had to repurpose was a fc8 machine running on lvm volumes. However, the volumes were set up as a small swap volume, and a single volume mounted as root that contained all available storage. Thankfully, the directions found here were a lifesaver in resizing the root partition without a drive down to the datacenter. http://blog.emmesdee.com/2008/10/remote-resizing-root-lvm-partiion.html
2) I never did manage to create instances successfully from a config file. I did have success using the virt-install tool. I created a 5 GB file-based instance using the following for my install location: http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/x86_64/os/
3) I used the virt-clone tool to copy my first working instance to other instances, copying my 5 GB instance to 30GB and 100GB lvm volume-based instances. However, copying from one lvm instance to another did not produce working instances. In addition, it is probably faster to copy a 5 GB instance into a 100GB volume, and then resize it, than to copy 100GB instances, as they don't appear to be sparse.
4) Allocating memory to an instance removes it from domain-0. If you take away enough memory from domain-0 that it does not have enough memory, it generates a fatal error, grinding the entire system to a halt. It would sometimes reboot successfully, but generally would reproduce the fatal error shortly aftewards, and sometime would not reboot successfully. An unsuccessful reboot for me means a trip to our datacenter. I did not have time to do conclusive testing, but it seemed that dropping below allocated memory would immediately produce the fatal error, and it seemed that buffers counted.

No comments: