[pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm

Oguz Bektas o.bektas at proxmox.com
Thu Oct 21 11:53:20 CEST 2021


hi,

works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
cmdline it errors:


====
update VM 101: -delete cpulimit
400 Parameter verification failed.
cpulimit: hotplug problem - closing file
'/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
Invalid argument
====


On Tue, Oct 12, 2021 at 01:20:52PM +0200, Dominik Csapak wrote:
> 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/
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index eb29fc2..1d31d02 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -4754,7 +4754,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";
>  	    }
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 





More information about the pve-devel mailing list