X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FQemuServer.pm;h=3cd44751b9f0ca1e3ac4bd7fa4aab73fa9a9716a;hb=f08e17c7be82797699bd8fef5e16621666a41771;hp=22ff875b6322796efa8f72c7b87df24dbb5e8353;hpb=fd1f36ac6f7b92e5d2dc00d14a7b8c86cf91da00;p=qemu-server.git diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 22ff875..3cd4475 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2618,6 +2618,15 @@ sub config_to_command { my $hotplug_features = parse_hotplug_features(defined($conf->{hotplug}) ? $conf->{hotplug} : '1'); my $machine_type = $forcemachine || $conf->{machine}; + my $cpuunits = defined($conf->{cpuunits}) ? + $conf->{cpuunits} : $defaults->{cpuunits}; + + push @$cmd, '/usr/bin/systemd-run'; + push @$cmd, '--scope'; + push @$cmd, '--slice', "qemu"; + push @$cmd, '--unit', $vmid; + push @$cmd, '-p', "CPUShares=$cpuunits"; + push @$cmd, '/usr/bin/kvm'; push @$cmd, '-id', $vmid;