]> git.proxmox.com Git - qemu-server.git/commitdiff
fix removing cpulimit on running vm
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 12 Oct 2021 11:20:52 +0000 (13:20 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 22 Oct 2021 09:55:08 +0000 (11:55 +0200)
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 <d.csapak@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
Reviewed-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 794558bff2471a0e3dabbc4adf49f25618097695..56f442cce55022a64c548ae5f3088bf506994cdf 100644 (file)
@@ -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";
            }