Tuesday, May 12, 2009

creating a Debian Lenny VM in XenCenter 5.5

I recently had a fair amount of trouble trying get lenny installed (from template, not CD) on the 5.5 beta release of Xen. Attempted to use the user interface for this (XenCenter 5.1). Misguided and/or whimsical google searches included the following:


installing lenny image xencenter 5.5.0
lenny xencenter 5.5.0
lenny xencenter
install lenny VM xencenter
xencenter install a Linux guest operating system from a network installation server
lenny mirror xen install
"location of the guest operating system"
xen install URL
xen "install location" expected value
xen "install url" debian expected value
xen "install url" expected value
xen "install url"
lenny iso
xen xe set other config value
xen xe vm-install set other config value
other-config:install-repository was not set to an appropriate value
xen lenny image
dists/lenny/main/installer-i386/current/images/netboot/xen/vmlinuz


Of which only the last really helped. The long and short of it appears to be that you cannot set up the values properly from the UI, and you must do it via command line. Below is a small script to accomplish this. I tried pointing the install repository to a variety of other places, but debian.org was the only one I found which has the desired /netboot/xen/vmlinuz path.


#!/bin/sh
# NOTE: This script does not add any frills, including network capability
# Run this from dom0
#

template="Debian Lenny 5.0"
name="Lenny VM"
repo="ftp://ftp.debian.org/debian"

vm_uuid=`xe vm-install template="$template" new-name-label="$name"`
xe vm-param-set uuid=$vm_uuid other-config:install-repository="$repo"
xe vm-start uuid=$vm_uuid


There were some additional suggested commands from the CD-rom instructions. which I did not run. They would go before vm-start

# root_uuid=`xe vbd-list vm-uuid= params=uuid --minimal`
# xe vbd-param-set uuid=$root_uuid bootable=true


Notes:

While it seems to want debian-500-i386-DVD-1.iso, the install goes too quickly (from ftp.debian.org) to actually be using the whole mound of GBs there.

From a Citrix representative positing:
http://forums.citrix.com/thread.jspa?messageID=1379090

From the above repro (sic) after a default install you'll have a .6.26-2-686-bigmem kernel. Install the Linux guest utilities from xs-tools.iso and you'll get the 2.6.29-xs5.5.0.13 kernel that we test with and have verified to address several issues with the standard kernel. In 5.5 the Lenny support is 32 bit only.


I also found this useful (indirect thanks, Trip):
http://www.scribd.com/doc/4084854/XenServer-410-Guest-Installation-Manual