We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
因特殊需求,有时候需要创建虚拟机,自定义核数。
比如主机只有 4 个核,但是虚拟机要创建 8 个核,Proxmox 会报:MAX $allowed_vcpus vcpus allowed per VM on this node 错误。但 QEMU 实际上是允许这样操作的。
MAX $allowed_vcpus vcpus allowed per VM on this node
在一些不支持超线程的高频 CPU 上,比如 i5,这样操作可以提升部分虚拟机的性能。同时需要配合 cpulimit 参数。比如给虚拟机分配 8 个 vCPU,但是只占用主机 3 个核心的性能,vCPU 配置为 8,CPU Limit 配置为 3.0。
/usr/share/perl5/PVE/QemuServer.pm
# my $allowed_vcpus = $cpuinfo->{cpus}; # die "MAX $allowed_vcpus vcpus allowed per VM on this node\n" if ($allowed_vcpus < $maxcpus);
The text was updated successfully, but these errors were encountered:
我两行代码都注释掉之后pvedaemon服务无法启动。log报错“# my $allowed_vcpus = $cpuinfo->{cpus}; ”我将这行取消注释之后服务可以正常启动功能限制也可以解除。
Sorry, something went wrong.
No branches or pull requests
应用场景
因特殊需求,有时候需要创建虚拟机,自定义核数。
案例
比如主机只有 4 个核,但是虚拟机要创建 8 个核,Proxmox 会报:
MAX $allowed_vcpus vcpus allowed per VM on this node
错误。但 QEMU 实际上是允许这样操作的。有什么用?
在一些不支持超线程的高频 CPU 上,比如 i5,这样操作可以提升部分虚拟机的性能。同时需要配合 cpulimit 参数。比如给虚拟机分配 8 个 vCPU,但是只占用主机 3 个核心的性能,vCPU 配置为 8,CPU Limit 配置为 3.0。
解决方法
/usr/share/perl5/PVE/QemuServer.pm
The text was updated successfully, but these errors were encountered: