Bugzilla – Bug 1220011
qemu-8.2.0 does not have kvm support on aarch64
Last modified: 2024-02-29 18:50:28 UTC
The packman obs workers are not happy: [ 12s] /usr/bin/qemu-system-aarch64 -nodefaults -no-reboot -nographic -vga none -cpu host -enable-kvm -M virt,accel=kvm,usb=off,gic-version=host -sandbox on -object rng-random,filename=/dev/hwrng,id=rng0 -device virtio-rng-device,rng=rng0 -object iothread,id=io0 -runas qemu -net none -kernel /var/cache/obs/worker/root_1/.mount/boot/kernel -initrd /var/cache/obs/worker/root_1/.mount/boot/initrd -append root=/dev/disk/by-id/virtio-0 rootfstype=ext3 rootflags=data=writeback,nobarrier,commit=150,noatime kvmclock mitigations=off elevator=noop nmi_watchdog=0 rw rd.driver.pre=binfmt_misc oops=panic panic=1 quiet console=hvc0 init=/.build/build -m 3686 -drive file=/var/cache/obs/worker/root_1/root,format=raw,if=none,id=disk,cache=unsafe -device virtio-blk-device,iothread=io0,drive=disk,serial=0 -drive file=/var/cache/obs/worker/root_1/swap,format=raw,if=none,id=swap,cache=unsafe -device virtio-blk-device,iothread=io0,drive=swap,serial=1 -device virtio-serial,max_ports=2 -device virtconsole,chardev=virtiocon0 -chardev stdio,id=virtiocon0 -chardev socket,id=monitor,server=on,wait=off,path=/var/cache/obs/worker/root_1/root.qemu/monitor -mon chardev=monitor,mode=readline -smp 3 [ 12s] qemu-system-aarch64: invalid accelerator kvm Downgrading to the qemu-7.1.0 from 15.5 gets it running again.
I could also not use KVM, discovered it because strange python script error in virt-manager while tried to do anything wit a VM that worker earlier. This is after a disto upgrade to Tumbleweed snapshot VERSION_ID="20240212". Same VM still worked with RaspberryPiOS Bookworm ('latest updates installed') So for Tumbleweed I went back to an older Btrfs rootfs Tumbleweed snapshot VERSION_ID="20240131". That one has qemu-system-aarch64 version 8.1.3 and that still works.
This seems related to Bug 1219818, except that, there it's said that Tumbleweed was working. Anyway, we'll looking into this...
Can anyone, maybe, do something like: > wget https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-Minimal-VM.aarch64-kvm-and-xen.qcow2 > strace qemu-system-aarch64 -cpu host -enable-kvm -boot c -drive file=./openSUSE-Tumbleweed-Minimal-VM.aarch64-kvm-and-xen.qcow2 -smp 3 -m 1G -nographic 2> /tmp/trace And then upload /tmp/trace ?
I can do this once the packman build queue for ARM has cleared up :-) https://pmbs.links2linux.de/monitor/old
Created attachment 872807 [details] strace log when TW snapshot VERSION_ID="20240212"
openSUSE:Factory qemu standard x86_64 buildlog shows, that configure is called as ./configure ... $MANYOPTIONS --disable-kvm $MOREOPTIONS --enable-kvm $EVENMORE on openSUSE:Factory:ARM qemu standard aarch64, it is called without the --enable-kvm, so no wonder there is no KVM inside :-)
Index: qemu.spec =================================================================== --- qemu.spec (revision 264) +++ qemu.spec (working copy) @@ -653,6 +653,7 @@ --enable-xen \ --enable-xen-pci-passthrough \ %endif +%endif %if 0%{with xdp} --enable-af-xdp \ %endif @@ -679,7 +680,6 @@ %endif %ifnarch %arm s390x --enable-numa \ -%endif %endif %if 0%{?with_rbd} --enable-rbd \ This might fix it. Basically every conditional --enable-* is now %ifarch x86_64. Something definitely went wrong during the update to 8.2.0 :-)
(In reply to Stefan Seyfried from comment #7) > Index: qemu.spec > =================================================================== > --- qemu.spec (revision 264) > +++ qemu.spec (working copy) > @@ -653,6 +653,7 @@ > --enable-xen \ > --enable-xen-pci-passthrough \ > %endif > +%endif > %if 0%{with xdp} > --enable-af-xdp \ > %endif > @@ -679,7 +680,6 @@ > %endif > %ifnarch %arm s390x > --enable-numa \ > -%endif > %endif > %if 0%{?with_rbd} > --enable-rbd \ > > This might fix it. > Ok, this was indeed found (by Fabian) and is already part of https://build.opensuse.org/request/show/1147249 Can you install QEMU from here and see if things work? https://download.opensuse.org/repositories/Virtualization/openSUSE_Tumbleweed/ https://download.opensuse.org/repositories/Virtualization/openSUSE_Tumbleweed/Virtualization.repo
(In reply to Dario Faggioli from comment #8) > Can you install QEMU from here and see if things work? > > https://download.opensuse.org/repositories/Virtualization/ > openSUSE_Tumbleweed/ > https://download.opensuse.org/repositories/Virtualization/ > openSUSE_Tumbleweed/Virtualization.repo I installed "qemu-arm-8.2.0-Virt.1699.963.1.aarch64.rpm" in the TW snapshot VERSION_ID="20240212" and now virt-manager and starting/running the VM works again. So problem solved and I wait a bit for it to appear in the normal TW repo so I can redo the 'zypper dup' update of my VERSION_ID="20240131" TW rootfs snapshot.
(In reply to slager from comment #10) > (In reply to Dario Faggioli from comment #8) > > Can you install QEMU from here and see if things work? > > > > https://download.opensuse.org/repositories/Virtualization/ > > openSUSE_Tumbleweed/ > > https://download.opensuse.org/repositories/Virtualization/ > > openSUSE_Tumbleweed/Virtualization.repo > > I installed "qemu-arm-8.2.0-Virt.1699.963.1.aarch64.rpm" in the TW snapshot > VERSION_ID="20240212" and now virt-manager and starting/running the VM works > again. > Ok, cool to know. And thanks for testing this! > So problem solved and I wait a bit for it to appear in the normal TW repo so > I can redo the 'zypper dup' update of my VERSION_ID="20240131" TW rootfs > snapshot. > Yeah, I did indeed messed up, while moving the %ifdefs... Sorry for the inconvenience! :-/ This also showed that we need to improve our non-x86 testing coverage of updates. I'll work on that.
(one of) the PMBS ARM obsworkers is also happy with the QEMU from Virtualization :-) (I only update them one after another to not lose them all, so the second one is still running an older TW version, and the third is even running 15.5 because of that ;-) I consider the regular updates of these Tumbleweed machines actually a way to contribute to aarch64 testing, because running an OBS worker certainly puts some stress and load on the machine and thus tests various parts of the Linux stack bottom to top.
(In reply to Stefan Seyfried from comment #12) > (one of) the PMBS ARM obsworkers is also happy with the QEMU from > Virtualization :-) > Great. And the change has been accepted, so it should only be a matter of time until it shows up in a TW snapshot. > I consider the regular updates of these Tumbleweed machines actually a way > to contribute to aarch64 testing, because running an OBS worker certainly > puts some stress and load on the machine and thus tests various parts of the > Linux stack bottom to top. > Yep, and I couldn't agree more that, yes, it is a very valuable contribution to testing, and thank you for that!
All back to working now.