]> git.proxmox.com Git - qemu-server.git/commit
api: create/update vm: clamp cpuunit value
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 7 Oct 2022 12:41:50 +0000 (14:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 8 Nov 2022 15:21:27 +0000 (16:21 +0100)
commitdbc45fdf9f001701d59f6d2343cafb2888f23171
tree7ae638eea22c2165cc1922f55a2303f4038e186d
parent0d318453645db4ff9dfa021642cee37c2046224a
api: create/update vm: clamp cpuunit value

While the clamping already happens before setting the actual systemd
CPU{Shares, Weight}, it can be done here too, to avoid writing new
out-of-range values into the config.

Can't use a validator enforcing this because existing out-of-range
values should not become errors upon parsing the config.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/API2/Qemu.pm