QEMU with Alpinelinux
#3
(05-05-2023, 04:13 PM)jpalus Wrote:
(05-03-2023, 01:41 PM)Surehand53 Wrote: If you use KVM there appears to be a bug that sometimes creates this error message:

Quote:qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument

Just repeat the start command until it works.

Code:
qemu-system-aarch64 \
-accel kvm -machine virt -cpu host -smp 2 \
-m 1024M -nographic \
-bios QEMU_EFI.fd \
-drive file=alpine.qcow2,media=disk,if=virtio

That's not the best advice. qemu with KVM acceleration needs to be run on the same CPU core type throughout its entire lifecycle. That means in case of multi cluster setups qemu needs to be forced to run within single cluster. In case of Pinebook Pro that means setting CPU affinity to either A53 or A72 cores. While repeating start command may work eventually, the VM won't be stable and will crash/hang the moment it will be rescheduled to different core type.

In order to set CPU affinity you can use taskset but unfortunately it needs additional privileges (root or CAP_SYS_NICE). One way to run qemu on Pinebook Pro restricted to A72 cores with sudo is:
Code:
sudo taskset 30 sudo -u user qemu-system-aarch64 -enable-kvm ...

For more details see manpage for taskset.

So,  just started playing with qemu.  So I ask this out of complete ignorance.  Do you need taskset when using qemu to emulate another arch?  I built qemu from scratch since the manjaro-repos are broken and don't let you install qemu-full or qemu-system-i386.  (Trying to test a Win95 VM for some older win95 games.)
  Reply


Messages In This Thread
QEMU with Alpinelinux - by Surehand53 - 05-03-2023, 01:41 PM
RE: QEMU with Alpinelinux - by jpalus - 05-05-2023, 04:13 PM
RE: QEMU with Alpinelinux - by korreckj328 - 05-06-2023, 04:21 AM
RE: QEMU with Alpinelinux - by jpalus - 05-06-2023, 10:43 AM
RE: QEMU with Alpinelinux - by slyecho - 05-09-2023, 01:23 PM
RE: QEMU with Alpinelinux - by jpalus - 05-09-2023, 02:41 PM
RE: QEMU with Alpinelinux - by slyecho - 05-16-2023, 01:19 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)