Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
Eric Blake writes: > On 01/22/2013 08:52 AM, Amos Kong wrote: > Libvirt will need to expose an attribute that lets the user control whether to use this new option; how do we probe via QMP whether the new -boot strict=on command-line option is available? >>> >>> Hi all, >>> >>> How about add new info/query command? >>> >>> (hmp) info strict-boot >>> on >>> >>> (qmp) {"execute": "query-strict-boot"} >>> {"return": {"state": true}} >> >> It might be not a good solution, I already updated qemu-options.hx, >> we can check help message to know if this new option is added or not. > > Having libvirt probe the -help output is out of the question. We > already declared that for qemu 1.3 and beyond, ALL command line behavior > must ALSO be probe-able via QMP. I think Anthony had a trick for > testing for existence of various command line options without needing to > add a new query-strict-boot command, but I don't remember what that > trick was. We need a generic query-config-schema command. Regards, Anthony Liguori > > -- > Eric Blake eblake redhat com+1-919-301-3266 > Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On 01/22/2013 08:52 AM, Amos Kong wrote: >>> >>> Libvirt will need to expose an attribute that lets the user control >>> whether to use this new option; how do we probe via QMP whether the >>> new >>> -boot strict=on command-line option is available? >> >> Hi all, >> >> How about add new info/query command? >> >> (hmp) info strict-boot >> on >> >> (qmp) {"execute": "query-strict-boot"} >> {"return": {"state": true}} > > It might be not a good solution, I already updated qemu-options.hx, > we can check help message to know if this new option is added or not. Having libvirt probe the -help output is out of the question. We already declared that for qemu 1.3 and beyond, ALL command line behavior must ALSO be probe-able via QMP. I think Anthony had a trick for testing for existence of various command line options without needing to add a new query-strict-boot command, but I don't remember what that trick was. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Tue, Jan 22, 2013 at 10:23:32AM -0500, Amos Kong wrote: > - Original Message - > > On 01/09/2013 01:39 AM, Amos Kong wrote: > > > Current seabios will try to boot from selected devices first, > > > if they are all failed, seabios will also try to boot from > > > un-selected devices. > > > > > > We need to make it configurable. I already posted a seabios > > > patch to add a new device type to halt booting. Qemu can add > > > "HALT" at the end of bootindex string, then seabios will halt > > > booting after trying to boot from selected devices. > > > > > > This option only effects when boot priority is changed by > > > bootindex options, the old style(-boot order=..) will still > > > try to boot from un-selected devices. > > > > > > v2: add HALT entry in get_boot_devices_list() > > > define boot_strict to bool > > > > > > Signed-off-by: Amos Kong > > > --- > > > > Libvirt will need to expose an attribute that lets the user control > > whether to use this new option; how do we probe via QMP whether the > > new > > -boot strict=on command-line option is available? > > Hi all, > > How about add new info/query command? > > (hmp) info strict-boot > on > > (qmp) {"execute": "query-strict-boot"} > {"return": {"state": true}} It might be not a good solution, I already updated qemu-options.hx, we can check help message to know if this new option is added or not. Daniel, Laine, do you have some suggestion? > > > +++ b/qemu-options.hx > > > @@ -376,14 +376,14 @@ ETEXI > > > > > > DEF("boot", HAS_ARG, QEMU_OPTION_boot, > > > "-boot [order=drives][,once=drives][,menu=on|off]\n" > > > -" > > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time]\n" > > > +" > > > > > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n" > > > "'drives': floppy (a), hard disk (c), CD-ROM > > > (d), network (n)\n" > > > "'sp_name': the file's name that would be > > > passed to bios as logo picture, if menu=on\n" > > > "'sp_time': the period that splash picture > > > last if menu=on, unit is ms\n" > > > "'rb_timeout': the timeout before guest reboot > > > when boot failed, unit is ms\n", > > > > So if I understand correctly, -boot order=... is incompatible with > > -boot > > strict=on; > > They are not incompatible, order will effect the priority, > strict decides if boot from un-selected device. > > > even though you have listed both options under a single > > -boot > > entry in the -help. We've already declared that -help output is no > > longer guaranteed stable, so this doesn't really impact libvirt, but > > would it make any more sense to list this as two orthogonal entries, > > to > > make it clear that they don't mix? > > > > -boot order=drivers[,once=drives]... > > -boot strict=on|off[,menu=on|off]... > > > > But this is all bikeshedding, so it's not worth a v3 if you disagree. > > > > -- > > Eric Blake eblake redhat com+1-919-301-3266 > > Libvirt virtualization library http://libvirt.org > > > > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
- Original Message - > On 01/09/2013 01:39 AM, Amos Kong wrote: > > Current seabios will try to boot from selected devices first, > > if they are all failed, seabios will also try to boot from > > un-selected devices. > > > > We need to make it configurable. I already posted a seabios > > patch to add a new device type to halt booting. Qemu can add > > "HALT" at the end of bootindex string, then seabios will halt > > booting after trying to boot from selected devices. > > > > This option only effects when boot priority is changed by > > bootindex options, the old style(-boot order=..) will still > > try to boot from un-selected devices. > > > > v2: add HALT entry in get_boot_devices_list() > > define boot_strict to bool > > > > Signed-off-by: Amos Kong > > --- > > Libvirt will need to expose an attribute that lets the user control > whether to use this new option; how do we probe via QMP whether the > new > -boot strict=on command-line option is available? Hi all, How about add new info/query command? (hmp) info strict-boot on (qmp) {"execute": "query-strict-boot"} {"return": {"state": true}} > > +++ b/qemu-options.hx > > @@ -376,14 +376,14 @@ ETEXI > > > > DEF("boot", HAS_ARG, QEMU_OPTION_boot, > > "-boot [order=drives][,once=drives][,menu=on|off]\n" > > -" > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time]\n" > > +" > > > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n" > > "'drives': floppy (a), hard disk (c), CD-ROM > > (d), network (n)\n" > > "'sp_name': the file's name that would be > > passed to bios as logo picture, if menu=on\n" > > "'sp_time': the period that splash picture > > last if menu=on, unit is ms\n" > > "'rb_timeout': the timeout before guest reboot > > when boot failed, unit is ms\n", > > So if I understand correctly, -boot order=... is incompatible with > -boot > strict=on; They are not incompatible, order will effect the priority, strict decides if boot from un-selected device. > even though you have listed both options under a single > -boot > entry in the -help. We've already declared that -help output is no > longer guaranteed stable, so this doesn't really impact libvirt, but > would it make any more sense to list this as two orthogonal entries, > to > make it clear that they don't mix? > > -boot order=drivers[,once=drives]... > -boot strict=on|off[,menu=on|off]... > > But this is all bikeshedding, so it's not worth a v3 if you disagree. > > -- > Eric Blake eblake redhat com+1-919-301-3266 > Libvirt virtualization library http://libvirt.org > > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Wed, Jan 09, 2013 at 18:02:22 +, Daniel P. Berrange wrote: > On Wed, Jan 09, 2013 at 12:36:52PM -0500, Laine Stump wrote: > > > > Just a note about this: as far as I can tell virt-manager currently only > > uses the "old style" of specifying boot order; it needs to be enhanced > > to recognize the presence of bootindex=n ordering, and behave > > accordingly. Looking from the outside, that looks to be not completely > > trivial, as the old style of ordering only allows specifying "hard disk" > > as a single line in the priority order, but the new style has each disk > > specified separately. Not only that, but *which* of the disks is tried > > first under the old order may change depending on whether or not a > > bootmenu is requested (in one case it picks unit=0 on the controller, in > > the other case, it orders the disks alphabetically by target dev name) > > Hmm, well libvirt should be using bootindex=n on the QEMU command line > regardless of what applications put in the XML. ie if the application > uses the old style XML, libvirt should translate that into bootindex=n > for them. It should already be doing that. However, when I was implementing this, I was told bootmenu is incomatible with bootindex and thus, if you turn on bootmenu, libvirt will not translate the old-style boot order into bootindex. Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On 01/09/2013 01:02 PM, Daniel P. Berrange wrote: > On Wed, Jan 09, 2013 at 12:36:52PM -0500, Laine Stump wrote: >> On 01/09/2013 10:52 AM, Amos Kong wrote: >>> On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: On 01/09/2013 01:39 AM, Amos Kong wrote: > Current seabios will try to boot from selected devices first, > if they are all failed, seabios will also try to boot from > un-selected devices. > > We need to make it configurable. I already posted a seabios > patch to add a new device type to halt booting. Qemu can add > "HALT" at the end of bootindex string, then seabios will halt > booting after trying to boot from selected devices. > > This option only effects when boot priority is changed by > bootindex options, the old style(-boot order=..) will still > try to boot from un-selected devices. > > v2: add HALT entry in get_boot_devices_list() > define boot_strict to bool > > Signed-off-by: Amos Kong > --- Libvirt will need to expose an attribute that lets the user control whether to use this new option; how do we probe via QMP whether the new -boot strict=on command-line option is available? >>> Old style to adjust boot priority by order parameter: >>> -boot order=n,strict=on (BAD, unselected devices will be tried) >>> >>> New style to adjust boot priority by bootindex: >>> -device virtio-net-pci,...,bootindex=1 -boot strict=on (OK) >>> >>> We only want strict option to support new style. >>> >>> (those two styles are implemented in two different way insider >>> seabios, the latest simple patch only changed the bootindex way) >> Just a note about this: as far as I can tell virt-manager currently only >> uses the "old style" of specifying boot order; it needs to be enhanced >> to recognize the presence of bootindex=n ordering, and behave >> accordingly. Looking from the outside, that looks to be not completely >> trivial, as the old style of ordering only allows specifying "hard disk" >> as a single line in the priority order, but the new style has each disk >> specified separately. Not only that, but *which* of the disks is tried >> first under the old order may change depending on whether or not a >> bootmenu is requested (in one case it picks unit=0 on the controller, in >> the other case, it orders the disks alphabetically by target dev name) > Hmm, well libvirt should be using bootindex=n on the QEMU command line > regardless of what applications put in the XML. ie if the application > uses the old style XML, libvirt should translate that into bootindex=n > for them. Good point. WHerever it's changed though, it will be a bit tricky to preserve current behavior, due to the idiosyncrasies I noted above. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Wed, Jan 09, 2013 at 12:36:52PM -0500, Laine Stump wrote: > On 01/09/2013 10:52 AM, Amos Kong wrote: > > On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: > >> On 01/09/2013 01:39 AM, Amos Kong wrote: > >>> Current seabios will try to boot from selected devices first, > >>> if they are all failed, seabios will also try to boot from > >>> un-selected devices. > >>> > >>> We need to make it configurable. I already posted a seabios > >>> patch to add a new device type to halt booting. Qemu can add > >>> "HALT" at the end of bootindex string, then seabios will halt > >>> booting after trying to boot from selected devices. > >>> > >>> This option only effects when boot priority is changed by > >>> bootindex options, the old style(-boot order=..) will still > >>> try to boot from un-selected devices. > >>> > >>> v2: add HALT entry in get_boot_devices_list() > >>> define boot_strict to bool > >>> > >>> Signed-off-by: Amos Kong > >>> --- > >> Libvirt will need to expose an attribute that lets the user control > >> whether to use this new option; how do we probe via QMP whether the new > >> -boot strict=on command-line option is available? > > > > Old style to adjust boot priority by order parameter: > > -boot order=n,strict=on (BAD, unselected devices will be tried) > > > > New style to adjust boot priority by bootindex: > > -device virtio-net-pci,...,bootindex=1 -boot strict=on (OK) > > > > We only want strict option to support new style. > > > > (those two styles are implemented in two different way insider > > seabios, the latest simple patch only changed the bootindex way) > > Just a note about this: as far as I can tell virt-manager currently only > uses the "old style" of specifying boot order; it needs to be enhanced > to recognize the presence of bootindex=n ordering, and behave > accordingly. Looking from the outside, that looks to be not completely > trivial, as the old style of ordering only allows specifying "hard disk" > as a single line in the priority order, but the new style has each disk > specified separately. Not only that, but *which* of the disks is tried > first under the old order may change depending on whether or not a > bootmenu is requested (in one case it picks unit=0 on the controller, in > the other case, it orders the disks alphabetically by target dev name) Hmm, well libvirt should be using bootindex=n on the QEMU command line regardless of what applications put in the XML. ie if the application uses the old style XML, libvirt should translate that into bootindex=n for them. Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Wed, Jan 09, 2013 at 12:28:57PM -0500, Laine Stump wrote: > On 01/09/2013 10:22 AM, Daniel P. Berrange wrote: > > On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: > >> On 01/09/2013 01:39 AM, Amos Kong wrote: > >>> Current seabios will try to boot from selected devices first, > >>> if they are all failed, seabios will also try to boot from > >>> un-selected devices. > >>> > >>> We need to make it configurable. I already posted a seabios > >>> patch to add a new device type to halt booting. Qemu can add > >>> "HALT" at the end of bootindex string, then seabios will halt > >>> booting after trying to boot from selected devices. > >>> > >>> This option only effects when boot priority is changed by > >>> bootindex options, the old style(-boot order=..) will still > >>> try to boot from un-selected devices. > >>> > >>> v2: add HALT entry in get_boot_devices_list() > >>> define boot_strict to bool > >>> > >>> Signed-off-by: Amos Kong > >>> --- > >> Libvirt will need to expose an attribute that lets the user control > >> whether to use this new option; how do we probe via QMP whether the new > >> -boot strict=on command-line option is available? > > While libvirt should make use of this, we don't need to > > expose it in the XML. This new behaviour is what we wanted > > to have all along, so we should just enable it. > > I agree that this is the way it *should* always work, but apparently > there are people who depend on the old behavior, so just doing a blanket > switch to the new behavior could lead to setups that no longer work > "properly" after an upgrade, which unfortunately means that existing > functionality needs to be maintained, and "correct" functionality must > be triggered by a config switch (maybe Gleb can expand on the use cases > that require this if more details are needed, as it's him I heard this from) It is common to configure PXE boot as highest prio for easy re-imaging, Usually boot from PXE fails and other bootable device is used instead, but if re-installation is needed it is as easy as configuring PXE server and rebooting the machine. With current behaviour it is enough to boost PXE priority, if we will change it setups that didn't explicitly specify all devices' priorities will stop working. The rule is easy: if exist command line that will work differently before and after the change you probably break someones setup with your patch. -- Gleb. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On 01/09/2013 10:52 AM, Amos Kong wrote: > On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: >> On 01/09/2013 01:39 AM, Amos Kong wrote: >>> Current seabios will try to boot from selected devices first, >>> if they are all failed, seabios will also try to boot from >>> un-selected devices. >>> >>> We need to make it configurable. I already posted a seabios >>> patch to add a new device type to halt booting. Qemu can add >>> "HALT" at the end of bootindex string, then seabios will halt >>> booting after trying to boot from selected devices. >>> >>> This option only effects when boot priority is changed by >>> bootindex options, the old style(-boot order=..) will still >>> try to boot from un-selected devices. >>> >>> v2: add HALT entry in get_boot_devices_list() >>> define boot_strict to bool >>> >>> Signed-off-by: Amos Kong >>> --- >> Libvirt will need to expose an attribute that lets the user control >> whether to use this new option; how do we probe via QMP whether the new >> -boot strict=on command-line option is available? > > Old style to adjust boot priority by order parameter: > -boot order=n,strict=on (BAD, unselected devices will be tried) > > New style to adjust boot priority by bootindex: > -device virtio-net-pci,...,bootindex=1 -boot strict=on (OK) > > We only want strict option to support new style. > > (those two styles are implemented in two different way insider > seabios, the latest simple patch only changed the bootindex way) Just a note about this: as far as I can tell virt-manager currently only uses the "old style" of specifying boot order; it needs to be enhanced to recognize the presence of bootindex=n ordering, and behave accordingly. Looking from the outside, that looks to be not completely trivial, as the old style of ordering only allows specifying "hard disk" as a single line in the priority order, but the new style has each disk specified separately. Not only that, but *which* of the disks is tried first under the old order may change depending on whether or not a bootmenu is requested (in one case it picks unit=0 on the controller, in the other case, it orders the disks alphabetically by target dev name) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On 01/09/2013 10:22 AM, Daniel P. Berrange wrote: > On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: >> On 01/09/2013 01:39 AM, Amos Kong wrote: >>> Current seabios will try to boot from selected devices first, >>> if they are all failed, seabios will also try to boot from >>> un-selected devices. >>> >>> We need to make it configurable. I already posted a seabios >>> patch to add a new device type to halt booting. Qemu can add >>> "HALT" at the end of bootindex string, then seabios will halt >>> booting after trying to boot from selected devices. >>> >>> This option only effects when boot priority is changed by >>> bootindex options, the old style(-boot order=..) will still >>> try to boot from un-selected devices. >>> >>> v2: add HALT entry in get_boot_devices_list() >>> define boot_strict to bool >>> >>> Signed-off-by: Amos Kong >>> --- >> Libvirt will need to expose an attribute that lets the user control >> whether to use this new option; how do we probe via QMP whether the new >> -boot strict=on command-line option is available? > While libvirt should make use of this, we don't need to > expose it in the XML. This new behaviour is what we wanted > to have all along, so we should just enable it. I agree that this is the way it *should* always work, but apparently there are people who depend on the old behavior, so just doing a blanket switch to the new behavior could lead to setups that no longer work "properly" after an upgrade, which unfortunately means that existing functionality needs to be maintained, and "correct" functionality must be triggered by a config switch (maybe Gleb can expand on the use cases that require this if more details are needed, as it's him I heard this from) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: > On 01/09/2013 01:39 AM, Amos Kong wrote: > > Current seabios will try to boot from selected devices first, > > if they are all failed, seabios will also try to boot from > > un-selected devices. > > > > We need to make it configurable. I already posted a seabios > > patch to add a new device type to halt booting. Qemu can add > > "HALT" at the end of bootindex string, then seabios will halt > > booting after trying to boot from selected devices. > > > > This option only effects when boot priority is changed by > > bootindex options, the old style(-boot order=..) will still > > try to boot from un-selected devices. > > > > v2: add HALT entry in get_boot_devices_list() > > define boot_strict to bool > > > > Signed-off-by: Amos Kong > > --- > > Libvirt will need to expose an attribute that lets the user control > whether to use this new option; how do we probe via QMP whether the new > -boot strict=on command-line option is available? Old style to adjust boot priority by order parameter: -boot order=n,strict=on (BAD, unselected devices will be tried) New style to adjust boot priority by bootindex: -device virtio-net-pci,...,bootindex=1 -boot strict=on (OK) We only want strict option to support new style. (those two styles are implemented in two different way insider seabios, the latest simple patch only changed the bootindex way) > > +++ b/qemu-options.hx > > @@ -376,14 +376,14 @@ ETEXI > > > > DEF("boot", HAS_ARG, QEMU_OPTION_boot, > > "-boot [order=drives][,once=drives][,menu=on|off]\n" > > -" > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time]\n" > > +" > > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n" > > "'drives': floppy (a), hard disk (c), CD-ROM (d), > > network (n)\n" > > "'sp_name': the file's name that would be passed to > > bios as logo picture, if menu=on\n" > > "'sp_time': the period that splash picture last if > > menu=on, unit is ms\n" > > "'rb_timeout': the timeout before guest reboot when > > boot failed, unit is ms\n", > > So if I understand correctly, -boot order=... is incompatible with -boot > strict=on; even though you have listed both options under a single -boot > entry in the -help. We've already declared that -help output is no > longer guaranteed stable, so this doesn't really impact libvirt, but > would it make any more sense to list this as two orthogonal entries, to > make it clear that they don't mix? > > -boot order=drivers[,once=drives]... > -boot strict=on|off[,menu=on|off]... > > But this is all bikeshedding, so it's not worth a v3 if you disagree. > > -- > Eric Blake eblake redhat com+1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: > On 01/09/2013 01:39 AM, Amos Kong wrote: > > Current seabios will try to boot from selected devices first, > > if they are all failed, seabios will also try to boot from > > un-selected devices. > > > > We need to make it configurable. I already posted a seabios > > patch to add a new device type to halt booting. Qemu can add > > "HALT" at the end of bootindex string, then seabios will halt > > booting after trying to boot from selected devices. > > > > This option only effects when boot priority is changed by > > bootindex options, the old style(-boot order=..) will still > > try to boot from un-selected devices. > > > > v2: add HALT entry in get_boot_devices_list() > > define boot_strict to bool > > > > Signed-off-by: Amos Kong > > --- > > Libvirt will need to expose an attribute that lets the user control > whether to use this new option; how do we probe via QMP whether the new > -boot strict=on command-line option is available? While libvirt should make use of this, we don't need to expose it in the XML. This new behaviour is what we wanted to have all along, so we should just enable it. Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot
On 01/09/2013 01:39 AM, Amos Kong wrote: > Current seabios will try to boot from selected devices first, > if they are all failed, seabios will also try to boot from > un-selected devices. > > We need to make it configurable. I already posted a seabios > patch to add a new device type to halt booting. Qemu can add > "HALT" at the end of bootindex string, then seabios will halt > booting after trying to boot from selected devices. > > This option only effects when boot priority is changed by > bootindex options, the old style(-boot order=..) will still > try to boot from un-selected devices. > > v2: add HALT entry in get_boot_devices_list() > define boot_strict to bool > > Signed-off-by: Amos Kong > --- Libvirt will need to expose an attribute that lets the user control whether to use this new option; how do we probe via QMP whether the new -boot strict=on command-line option is available? > +++ b/qemu-options.hx > @@ -376,14 +376,14 @@ ETEXI > > DEF("boot", HAS_ARG, QEMU_OPTION_boot, > "-boot [order=drives][,once=drives][,menu=on|off]\n" > -" > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time]\n" > +" > [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n" > "'drives': floppy (a), hard disk (c), CD-ROM (d), > network (n)\n" > "'sp_name': the file's name that would be passed to bios > as logo picture, if menu=on\n" > "'sp_time': the period that splash picture last if > menu=on, unit is ms\n" > "'rb_timeout': the timeout before guest reboot when boot > failed, unit is ms\n", So if I understand correctly, -boot order=... is incompatible with -boot strict=on; even though you have listed both options under a single -boot entry in the -help. We've already declared that -help output is no longer guaranteed stable, so this doesn't really impact libvirt, but would it make any more sense to list this as two orthogonal entries, to make it clear that they don't mix? -boot order=drivers[,once=drives]... -boot strict=on|off[,menu=on|off]... But this is all bikeshedding, so it's not worth a v3 if you disagree. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list