Skip to content
New issue

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

Implement CPU pinning #1

Open
wants to merge 1 commit into
base: pimox
Choose a base branch
from
Open

Conversation

MakiseKurisu
Copy link

While this can be done by 3rd party script, running on non SMP system requires this to be set before KVM was even started, otherwise you get error qemu kvm_arm_vcpu_init failed: Invalid argument". This is a known limitation of QEMU.

As for why this PR is related to pimox, this enables me to run VM on Rock Pi 4B which uses RK3399:
image

However I have not tested the stability on this approach. All I will say is that right now I can click "Start" button from GUI and everything seems to work.

While this can be done by [3rd party script](https://github.com/ayufan/pve-helpers/), running on non SMP system requires this to be set before KVM was even started, otherwise you get error [qemu kvm_arm_vcpu_init failed: Invalid argument"](https://forum.armbian.com/topic/16830-virtualization-support/). This is a [known limitation](https://www.mail-archive.com/[email protected]/msg755010.html) of QEMU.
@jiangcuo
Copy link

老哥你好,我修改了QemuServer.qm。
当我启动VM的时候报错,提示:
kvm: -c: invalid option
当我使用qm showcmd 的时候,
-mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/501.pid \ -daemonize \ taskset -c 5 \ -smbios 'type=1,uuid=aae9b0ba-79f8-4e7e-a598-9a8a911541af' \
我想应该是KVM 不识别-c这个参数。
请问我是否修改错误了。

@jiangcuo
Copy link

我好像明白了。应该是taskset -c 在/usr/bin/kvm之前。

@cphpi
Copy link

cphpi commented Aug 22, 2022

都是不太明白
kvm: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument
怎解決

@gabrielribbae
Copy link

gabrielribbae commented Oct 22, 2022

Hi,

I don't know if solves for you, but at least i was having same issue after applying patch. In my case i needed to reboot once change made

I did this on a orangepi4-lts (rk3399) running armbian:

Linux proxmox 5.15.69-rockchip64 #22.08.2 SMP PREEMPT Wed Sep 21 19:28:26 UTC 2022 aarch64 GNU/Linux

This was the vm conf i tested on. It is based from Pimox HassOS VM image
Screenshot_20221022-155512_Chrome

@cphpi
Copy link

cphpi commented Oct 29, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants