]> git.proxmox.com Git - qemu-server.git/commitdiff
vm_start: better name systemd scope property variable
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Oct 2021 07:41:18 +0000 (09:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Oct 2021 07:43:45 +0000 (09:43 +0200)
`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 <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 55603e0ed961ab18c29ddfbffe618ea1511f24bc..324e9a31f81e8e86a14a53b9da1e8de4a9a19b9f 100644 (file)
@@ -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}) {