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::Tools::validate_ssh_public_keys($ssh_keys);
}
+ $param->{cpuunits} = PVE::GuestHelpers::get_cpuunits($param->{cpuunits})
+ if defined($param->{cpuunits}); # clamp value depending on cgroup version
+
PVE::Cluster::check_cfs_quorum();
my $filename = PVE::QemuConfig->config_file($vmid);
PVE::Tools::validate_ssh_public_keys($ssh_keys);
}
+ $param->{cpuunits} = PVE::GuestHelpers::get_cpuunits($param->{cpuunits})
+ if defined($param->{cpuunits}); # clamp value depending on cgroup version
+
die "no options specified\n" if !$delete_str && !$revert_str && !scalar(keys %$param);
my $storecfg = PVE::Storage::config();