On 2022/11/22 23:52, Peter Krempa wrote:
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.
Yeah, this what I mean in patch2. Qemu will boot in an default sequence
'disk->cdrom->net' in those devices whose bootindex is set to explicit
0. I will improve all those patches in next version.
> Signed-off-by: Jiang Jiacheng <jiangjiacheng(a)huawei.com>
> ---
> src/conf/domain_postparse.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)