]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
bootorder: don't print empty 'order=' property
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 21 Oct 2020 09:00:25 +0000 (11:00 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Oct 2020 06:47:45 +0000 (08:47 +0200)
commit4c27b18c083baea20b976422367d0c836542befb
tree0344cdde3c88cdfe9ba04d05d4c6d1f2e9c921ab
parent75127d19962b7bfd9fb32c2729d1ae68fb9bc8d6
bootorder: don't print empty 'order=' property

Specifying 'boot: order=' was intended to be used for an empty bootorder
(i.e. no boot devices), but as it turns out our format parser doesn't
like empty '-list' properties if they are nested in a subformat.

Fixing this in JSONSchema sounds like a risky move, so instead just
write 'boot: ' (without 'order=') to indicate an empty bootorder. The
rest of the code handles it just fine, as this was valid before too.

Incidentally also fixes a bug where you couldn't create a new VM without
any disks if no explicit 'boot' property was specified (i.e. a simple
'qm create 100' without any parameters would fail).

Reported-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer.pm