From 25de70ae5977cec338490b2c42cd5517ff093a97 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 12 Oct 2021 13:20:52 +0200 Subject: [PATCH] fix removing cpulimit on running vm like in pve-container: 04a62bd ("fix #3506: config: fix removing the cpulimit of a running CT") reported in the forums (no bug# yet): https://forum.proxmox.com/threads/issue-with-removing-cpu-limit-from-running-vm.97799/ note that this will break CGv1 without the following fix installed: https://git.proxmox.com/?p=pve-common.git;a=commitdiff;h=d37a71867 Signed-off-by: Dominik Csapak Tested-by: Oguz Bektas Reviewed-by: Oguz Bektas Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 794558bf..56f442cc 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4745,7 +4745,7 @@ sub vmconfig_hotplug_pending { } elsif ($opt eq 'cpuunits') { $cgroup->change_cpu_shares(undef, 1024); } elsif ($opt eq 'cpulimit') { - $cgroup->change_cpu_quota(-1, 100000); + $cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values } else { die "skip\n"; }