[libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot

Amos Kong akong at redhat.com
Tue Jan 22 15:52:29 UTC 2013


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 <akong at redhat.com>
> > > ---
> > 
> > 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
> > 
> > 




More information about the libvir-list mailing list