On Tue, Jun 12, 2007 at 04:21:51PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 11, 2007 at 12:06:15PM -0700, David Lutterkort wrote: > > > > And it seems a tad less yucky than having the appliance boot hvm, ask an > > XML-RPC server if pv is ok, and then booting pv. > > I wouldn't suggest that as an approach either. First of all we need to > realize that this whole problem space is basically just caused by the > Xen paravirt boot process - I don't like the idea creating an overly > complex metadata format to deal with the dumbassnmess of a particular > HV, particularly if there is active work to address this weakness of > Xen. > > Two alternatives I can think of. Basically assume a single filesystem > image, which contains /boot as part of the main FS. > > - When building the guest install both kernel & kernel-xen inside > the image. The /etc/grub.conf should contain the entries only > for the baremetal kernel. The paravirt kernel lines should be > in a separate /etc/pygrub.conf. Now adapt pygrub so that it > first looks for an /etc/pyrub.conf in the guest image. That way > if you boot under HVM, it automatically gets a baremetal kernel > and if you boot PV, it automatically gets Xen kernel. No separate > /boot required. > > - When building the guest install only provide a HVM kernel. In the > bundle containing the image & metadata, provide a separate Xen > kernel & initrd outside the context of the main filesystem. Boot > these directly instead of using pygrub. > > My preference would be option 1, using a separate pyrub.conf inside > the guest, so a single image can boot either. I've thought of a 3rd optio. - When building the guest install both kernel & kernel-xen inside the image. Have a regular /etc/grub.conf containing entries for both sets of kernels. Add some extra metadata flag against each entry indicating whether its a baremetal, or a paravirt image. Or perhaps have a 'default-xen=5' line to point to the Xenified kernel, while 'default=3' points to the baremetal kernel. So pygrub would look for the former in paravirt boot case, while regular grub would still look for the latter. Basically we just need some way to locate the paravirt kernel from the single main filesystem image Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|