[pve-devel] [PATCH qemu-server 1/2] fix #3010: add 'bootorder' parameter for better control of boot devices
Stefan Reiter
s.reiter at proxmox.com
Thu Oct 1 14:12:14 CEST 2020
On 9/28/20 2:18 PM, Thomas Lamprecht wrote:
> On 24.09.20 16:11, Stefan Reiter wrote:
>> (also fixes #3011)
>>
>> Deprecates the old 'boot' and 'bootdisk' options (they still work the
>> same, but will get removed if a user sets a 'bootorder' parameter and
>> ignored if both are set).
>
> I'd rather re-use boot instead of adding a new property.
>
> Move the current boot format out into it's own format definition, and
> change it to a formatsting key=value list with the old format as default_key
> for backward compatibillity. The new stuff can be added as new format there,
> e.g., "order=<boot-order-list>".
>
Makes sense, I'll change it.
>>
>> This allows a user to specify more than one disk in the boot order,
>> helping with newer versions of SeaBIOS/OVMF where disks without a
>> bootindex won't be initialized at all (breaks soft-raid and some LVM
>> setups).
>>
>> This also allows specifying a bootindex for USB and hostpci devices,
>> which was not possible before. Floppy boot support is not supported in
>> the new model, but I doubt that will be a problem (AFAICT we can't even
>> attach floppy disks to a VM?).
>>
>> Default behaviour is intended to stay the same, i.e. while new VMs will
>> receive the new 'bootorder' property, it will be set so the VM starts
>> the same as before (see get_default_bootorder).
>
> We probably want to add a boot and/or bootorder config2cmd test before
> this patch, helps to guarantee that.
>
Existing tests already check 'bootdisk' property, but I'll add one for
'boot' too.
>>
>> The API is updated to handle the deprecation correctly, i.e. when
>> updating the 'bootorder' attribute, the old properties are removed
>> (would now be useless). When removing a device that is in the bootorder
>> list, it will be removed from the aforementioned. Note that non-existing
>> devices in the list will not cause an error - they will simply be
>> ignored - but it's still nice to not have them in there.
>
> But you do not always rewrite it to the new format, i.e., if just another,
> unrelated, config property changed, or?
>
No, only when bootorder is added (or order= is modified in new version
then).
I'll also split it into multiple patches.
More information about the pve-devel
mailing list