On Mon, Oct 31, 2011 at 13:39:09 +0100, Philipp Hahn wrote: > When PyGrub is used as the bootloader in Xen, it gets passed the first > bootable disk. Xend supports a "bootable"-flag for this, which was > previously unused. > In commit c2969ec7aec5c40519aadf422ab5c47a21938bff the bootable=1 flag > was used to re-order the disks when converting from SEXPR to XML, such > that on re-definition Xend would mark the first disk as bootable. > This got broken with commit c1a98d88255197a8446d08c0b1589861660e9064, > which reorders all disks according to their target-name, making it > impossible to change the boot order without changing the device names. > > When converting from Xen-sexpr to xml, Xens boolean bootable-flag is > converted to libvirts cardinal bootIndex, tracking the order of disks as > returned by Xend. This satisfies the requirement of bootIndex being > unique. > > When converting back to xen-sexpr, disks with an explicit bootIndex are > sorted ascending before all other disks and are marked as bootable. > > Explicitly mark the first disk as bootable for compatibility with Xends > default behaviour. > > Add capability "deviceboot" to Xen-PV-domains. This is not 100% correct, > since for example PyGrub only handles disk devices and not netboot. > > Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx> > --- > v2: explicitly sort disks by bootIndex > v2: Add deviceboot capability. > --- > src/xen/xen_hypervisor.c | 7 +++++++ > src/xenxs/xen_sxpr.c | 39 ++++++++++++++++++++++++++++++--------- > 2 files changed, 37 insertions(+), 9 deletions(-) ACK Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list