This is currently pretty rough around the edges, so should be considered more a proof-of-concept than a polished implementation.
That said, it does work with only a couple of moments of user intervention required to coax it along.
With d-i/xen you can use debian-installer to install a machine running Xen, then in the domain0 linux instance, you can use debian-installer to install standard recipes. This is useful both as a quick way to get up and running with Xen, and should also prove handy for testing debian installer setups in an environment where you have the chance to analyse what's going on as it happens (that will need some more work on diagnostic tools though, I expect)
The first thing to do is install the Xen machine itself, which is done by following the instructions in the HOWTO for your chosen boot method, and then specifying the following at the boot prompt:
boot: linux26 -/-=xen0This will install a minimal debian, grab the install tarball for xen, install it, apply various tweaks, and then (unless I work out an easy way of doing this for you) be ready for you to reboot into Xen for the first time.
Once you've rebooted, you should find yourself in Domain0, running Linux.
At this point, you can create a new domain and install debian into it. I've arranged that an LVM device /dev/vg/vm1hda has been created for you, so you just need to install debian onto it.
The following commands will be in root's bash_history, so just log in as root, go up 2 lines (Ctrl-P or UpArrow) and then run them in order (Ctrl-O lets you run a command then step on to the next one in the history)
First, boot the xen domain, using a tweaked netboot initrd.gz file, which will cause debian to be installed into the image created above:
xm create -c xm-debinst1-installwhen that finishes (you'll see a couple of message about xen-br0 entering disabled state) you should be able to get back to a command line by hitting return twice.
Then you can boot the newly installed system thus:
xm create -c xm-debinst1This then performs the first boot, and leaves you at the boot prompt of your new domain.
Note: if you were to take a copy of the disk image before doing the "xm-debinst1" boot, you'd have a system that is in the state just before its first boot, so you could use this for quickly generating several domain images, without having to repeat the installation above.
Xen has a virtual console, which is not properly attached to /dev/tty. In order to stop it whining about not being able to find the console, and subsequently deciding that it failed to set the keymap, I've replaced the binaries for kbd-check & kbd-chooser with a script that just does "exit 0"
removed /lib/modules/2.6*, and replaced them with most of the modules from the xenu kernel package that gets installed as part of the xen0 install
I've also done the same tweaks I generally do to initrd images:
add /lib/debian-installer-startup.d/S35preseed add /preseed.cfg
The xen 2.6.11 kernel was produced by downloading the xen source tarball, running enough of it to get a patched 2.6.11 kernel tree, copying the config from a debian package, and then tweaking it till it worked. The package was then generated with kernel-package's make-kpkg.
This should really be re-done, with a useful diff file being generated, and a properly constructed initrd and set of kernel module packages generated. Once done, the module packages should be put somewhere where the install will find them, perhaps on the xen domain0 installed in the first stage of the install, so that there is no need to supress complaints during the install with the anna/no_kernel_modules=true kludge
Philip Hands