[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

d-i support for running in a Xen guest domain



Hi,

Firstly apologies for the cross post but I think this genuinely is of
interest to both audiences. I'm subscribed to both lists so no need to
CC me.

I'm interested in getting d-i to work seamlessly inside a Xen guest
domain using the paravirt_ops kernel support for Xen in 2.6.24+
(currently only available in the kernel svn trunk snapshots builds I
think).

At the moment the normal way to deploy a Debian VM seems to be to use
debootstrap. However this has short comings WRT non-Debian domain0, plus
the installer way of doing things is more more familiar to many (well,
IMHO) and d-i sets up a bunch of stuff which otherwise has to be done
manually (packages such as xen-tools help with that bit though). Making
d-i available for PV use also allows the virtual machines to appear more
like native machines to an admin and the installed result is more like a
regular Debian install. FWIW several other distros support using their
installer in a PV context (Fedora, RHEL and SLES that I'm aware of).

I've built myself a Xen-enabled netboot image and didn't come across any
major issues or show-stoppers, just small niggles, such as allowing grub
to run successfully inside a PV domain (patches in: grub #456776,
grub-pc #456777 and grub-installer #456784). 

The only real stumbling block at the moment is the kernel. Most
distributions (including Debian) only support PAE Xen on i386 but the
d-i kernel is non-PAE. I don't imagine there would be much enthusiasm
about enabling PAE in d-i so I think at least one new d-i flavour would
be required here.

It would be reasonably easy to create -xen-686 udebs (in fact I did for
my testing) and tweak d-i to select a -xen kernel package image as
appropriate during install, however I think I have a better idea ;-)...

I'd like to propose enabling Xen guest support in all the native i?86
kernel images (and eventually amd64 too), or at least in the -686-bigmem
kernel. Since paravirt ops is already enabled in all kernels (for KVM
and lguest) there is only minimal additional overhead to enabling Xen.

As a nice bonus this would also allow the separate -xen flavour kernels
to be removed/deprecated which seems like a good thing in the
paravirt_ops based world.

Given a suitable kernel it would then be possible to add a -bigmem
flavour of d-i. That would give us installer images which support
native, Xen, KVM and lguest via paravirt_ops both PAE and non-PAE
allowing Debian to be installed as a guest on a wide variety of domain0
distributions.

So, what do the kernel folks think about enabling Xen guest support in
all kernels where it is available and getting rid of the -xen specific
variants? I've got a massive (mainly due to lots of deletion) patch
against SVN which does just that, if there is interest I'll work out the
kinks and file it as a wishlist bug.

And what do the d-i folks think about an additional d-i flavour for
-686-bigmem? Initially I'd propose just building a netboot type image. I
don't think cdrom or floppy are all that critical in a virtualised
scenario, although CD support would be a nice to have, I suppose. I've
got some hacky patches but they would likely need change depending on
the decision made WRT the kernel.

For those who are interested the only other issues I've come across
while playing with this is the need to run a getty on /dev/hvc0 and
breakage with update-grub with the latest xen enabled kernels due to the
CONFIG_* change since 2.6.18. Seems like both should be easy enough to
fix...

Cheers,
Ian.
-- 
Ian Campbell

There has been a little distress selling on the stock exchange.
		-- Thomas W. Lamont, October 29, 1929 (Black Tuesday)

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: