[PATCH 6/7] qemu: Support add bootindex = 0 to boothash when its bootIndexSpecified is true

Peter Krempa pkrempa at redhat.com
Tue Nov 22 15:52:28 UTC 2022


On Thu, Nov 17, 2022 at 10:05:32 +0800, Jiang Jiacheng wrote:
> Support add bootindex = 0 to boothash and return 0 if duplicated bootindex = 0 is set.
> It is nessary to add bootindex = 0 into boothash, otherwise libvirt will auto set boot dev,
> which will cause bootindex unchangable. Meanwhile, bootindex = 0 means disable bootindex,
> so it should be allowed to set duplicated bootindex = 0.

Libvirt auto-sets boot order when there is none specified. With this
patch you could un-select all bootable devices and end up with an
un-bootable VM. Do you really want to allow that?

Also doing this will require that we hohour the explicit bootindex setting
of 0 in the XML separate from when it's unpopulated. Thus this requires
that the XML indeed records that an explicit value of 0 was provided by
the user.

Thus you must improve patch 2 to carry the appropriate tests and
documentation if you want to go this route.

> Signed-off-by: Jiang Jiacheng <jiangjiacheng at huawei.com>
> ---
>  src/conf/domain_postparse.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)


More information about the libvir-list mailing list