From 212220a4fad6d054e741954c51b174e57044e8bd Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Oct 2021 09:41:18 +0200 Subject: [PATCH] vm_start: better name systemd scope property variable `properties` is a bit ambiguous and as we have scope and start runtime properties in the same scope it's good to avoid that ambiguity. Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 55603e0e..324e9a31 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5432,7 +5432,7 @@ sub vm_start_nolock { $run_params{logfunc} = sub { print "QEMU: $_[0]\n" }; } - my %properties = ( + my %systemd_properties = ( Slice => 'qemu.slice', KillMode => 'process', SendSIGKILL => 0, @@ -5441,19 +5441,19 @@ sub vm_start_nolock { if (PVE::CGroup::cgroup_mode() == 2) { $cpuunits = 10000 if $cpuunits >= 10000; # else we get an error - $properties{CPUWeight} = $cpuunits; + $systemd_properties{CPUWeight} = $cpuunits; } else { - $properties{CPUShares} = $cpuunits; + $systemd_properties{CPUShares} = $cpuunits; } if (my $cpulimit = $conf->{cpulimit}) { - $properties{CPUQuota} = int($cpulimit * 100); + $systemd_properties{CPUQuota} = int($cpulimit * 100); } - $properties{timeout} = 10 if $statefile; # setting up the scope shoul be quick + $systemd_properties{timeout} = 10 if $statefile; # setting up the scope shoul be quick my $run_qemu = sub { PVE::Tools::run_fork sub { - PVE::Systemd::enter_systemd_scope($vmid, "Proxmox VE VM $vmid", %properties); + PVE::Systemd::enter_systemd_scope($vmid, "Proxmox VE VM $vmid", %systemd_properties); my $tpmpid; if (my $tpm = $conf->{tpmstate0}) { -- 2.39.5