mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 18:45:29 +00:00
implement cgroups through systemd-run
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
fd1f36ac6f
commit
f08e17c7be
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user