#
✕ nick:rycloud
#asahi · 2023-07-24 13:22
rycloudThis would most likely affect any libvirtd dependent such as cloudstack, cockpit-machines, virt-manager
#asahi · 2023-07-24 13:22
rycloudHi community - came here to share, the kvm issue was due to libvirtd and findings all co-relate with the issue logged at https://gitlab.com/libvirt/libvirt/-/issues/365
#asahi · 2023-07-24 11:21
rycloudThanks mps, maz, waldi and all - I did several permutations, while I got it to sort of work directly using qemu but not via libvirtd yet. I'll explore further if upgrading libvirtd helps.
#asahi · 2023-07-24 09:35
rycloud /usr/bin/qemu-system-aarch64 -accel kvm -M virt -cpu host -m 2G -smp 2 -bios /usr/share/AAVMF/AAVMF_CODE.fd -drive if=none,file=/export/primary/disk,id=hd0 -vnc :1 -monitor stdio QEMU 7.2.0 monitor - type 'help' for more information (qemu) info kvm kvm support: enabled
#asahi · 2023-07-24 09:35
rycloudSo it seems instead of a host-passthrough or cpu model, if I use host it works on cmd line;
#asahi · 2023-07-24 09:02
rycloud(taking a break)
#asahi · 2023-07-24 08:59
rycloudwaldi maz this domain/xml works but with qemu - https://pastebin.pl/view/9387ac0a but if I change the top xml <domain type='qemu'> to <domain type='kvm'> I get the error
#asahi · 2023-07-24 08:58
rycloudI got a test VM xml that works on this machine with emulator qemu but when I change the domain type to 'kvm' it fails
#asahi · 2023-07-24 08:57
rycloudI got a test VM xml that works on this machine with emulator qemu but when I change the domain type to 'kvm' it fails
#asahi · 2023-07-24 08:55
rycloudI got this in the xml though - <cpu mode='custom' match='exact' check='none'> <model fallback='forbid'>cortex-a57</model> </cpu>
#asahi · 2023-07-24 08:54
rycloudyup indeed
#asahi · 2023-07-24 08:54
rycloud2023-07-24 08:43:49.131+0000: 7124: debug : virCommandRunAsync:2607 : About to run LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /usr/bin/qemu-system-aarch64 -S -no-user-config -nodefaults -nographic -machine none,accel=kvm:tcg -qmp unix:/var/lib/libvirt/qemu/qmp-281M81/qmp.monitor,server=on,wait=off -pidfile /var/lib/libvirt/qemu/qmp-281M81/qmp.pid -daemonize 2023-07-24 08:43:49.132+0000: 7124: debug : virCommandRunAsync:2609
#asahi · 2023-07-24 08:54
rycloudhere's what I see from libvirtd logs:
#asahi · 2023-07-24 08:53
rycloudwaldi: here. https://pastebin.pl/view/312d90eb
#asahi · 2023-07-24 08:52
rycloudhttps://pastebin.pl/view/74f63c26
#asahi · 2023-07-24 08:51
rycloudjust repeats these
#asahi · 2023-07-24 08:50
rycloud[pid 18807] execve("/usr/bin/qemu-system-aarch64", ["/usr/bin/qemu-system-aarch64", "-S", "-no-user-config", "-nodefaults", "-nographic", "-machine", "none,accel=kvm:tcg", "-qmp", "unix:/var/lib/libvirt/qemu/qmp-8"..., "-pidfile", "/var/lib/libvirt/qemu/qmp-8VQ371"..., "-daemonize"], 0xffff48061fd0 /* 2 vars */) = 0
#asahi · 2023-07-24 08:50
rycloud[pid 18797] execve("/usr/bin/qemu-system-aarch64", ["/usr/bin/qemu-system-aarch64", "-S", "-no-user-config", "-nodefaults", "-nographic", "-machine", "none,accel=kvm:tcg", "-qmp", "unix:/var/lib/libvirt/qemu/qmp-4"..., "-pidfile", "/var/lib/libvirt/qemu/qmp-486771"..., "-daemonize"], 0xffff48011050 /* 2 vars */) = 0
#asahi · 2023-07-24 08:50
rycloudah okay here we go:
#asahi · 2023-07-24 08:50
rycloudah okay :) I can also try to get the libvirtd logs if they help
#asahi · 2023-07-24 08:49
rycloudwaldi: sorry the process exits very quickly how do I run the strace command?
#asahi · 2023-07-24 08:48
rycloud(I was running everything as root btw)
#asahi · 2023-07-24 08:47
rycloudyes it's available maz root@macmini:~# kvm-ok INFO: /dev/kvm exists KVM acceleration can be used root@macmini:~# ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 Jul 24 08:46 /dev/kvm root@macmini:~# lsmod | grep kvm root@macmini:~# modprobe kvm
#asahi · 2023-07-24 08:35
rycloudI suppose I can try Debian and see it works, thanks maz
#asahi · 2023-07-24 08:33
rycloudah :) let me share the qemu commands it's running. It's possible a libvirt issue.
#asahi · 2023-07-24 08:30
rycloudroot@macmini:~# virsh define s.xml error: Failed to define domain from s.xml error: unsupported configuration: Emulator '/usr/bin/qemu-system-aarch64' does not support virt type 'kvm'
#asahi · 2023-07-24 08:30
rycloudgtk initialization failed
#asahi · 2023-07-24 08:30
rycloudI got: root@macmini:~# taskset -c 0-3 qemu-system-aarch64 -machine virt,accel=kvm -cpu host
#asahi · 2023-07-24 08:27
ryclouderror: unsupported configuration: Emulator '/usr/bin/qemu-system-aarch64' does not support virt type 'kvm'
#asahi · 2023-07-24 08:27
rycloudroot@macmini:~# kvm-ok INFO: /dev/kvm exists KVM acceleration can be used root@macmini:~# virsh version Compiled against library: libvirt 9.0.0 Using library: libvirt 9.0.0 Using API: QEMU 9.0.0 Running hypervisor: QEMU 7.2.0 root@macmini:~# uname -a Linux macmini 6.3.0-13-asahi #1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 14 19:48:48 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux root@macmini:~# qemu-system-aarch64 --version QEMU emulator version 7.2.0 (Debian 1:7
#asahi · 2023-07-24 08:27
rycloudHi again maz waldi all I upgraded my mac mini to Ubuntu server 23.04 which has qemu 7.2, still same issue.
#asahi · 2023-07-24 08:06
rycloudI'll try this out, thanks all - really nice community
#asahi · 2023-07-24 08:05
rycloudAh great!
#asahi · 2023-07-24 08:04
rycloudah okay
#asahi · 2023-07-24 08:03
rycloudI installed qemu-kvm waldi and I see this is available still https://packages.ubuntu.com/jammy-updates/qemu-system-arm
#asahi · 2023-07-24 08:03
rycloudah okay maz - is there a specific version I should try and try - copy
#asahi · 2023-07-24 08:02
rycloudIs there a known version/build of qemu working?
#asahi · 2023-07-24 08:02
rycloudroot@macmini:~# virsh version Compiled against library: libvirt 8.0.0 Using library: libvirt 8.0.0 Using API: QEMU 8.0.0 Running hypervisor: QEMU 6.2.0
#asahi · 2023-07-24 08:02
rycloudThanks maz dottedmag
#asahi · 2023-07-24 08:01
rycloudI got this - root@macmini:~# qemu-system-arm --version QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.12) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers root@macmini:~# qemu-system-aarch64 --version QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.12) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
#asahi · 2023-07-24 07:51
rycloudFor my purpose, I'm trying to get Apache CloudStack to support Asahi Linux kernel with M1 Mac mini; so I need to use libvirtd and can't use qemu directly
#asahi · 2023-07-24 07:51
rycloudThe same actually works fine on Ubuntu 22.04 arm64 on a Raspberry Pi4 - so I'm not sure if it's an issue with qemu or with the kernel
#asahi · 2023-07-24 07:50
rycloudThanks j`ey _jannau__ - I'm using Ubuntu Asahi from here, logged an issue with more details - https://github.com/UbuntuAsahi/ubuntu-asahi/issues/51
#asahi · 2023-07-24 07:00
rycloudany hints on how can I debug this further? Anybody played with kvm on asahi linux on M1 mac (mini)?
#asahi · 2023-07-24 06:59
ryclouderror: unsupported configuration: Emulator '/usr/bin/qemu-system-aarch64' does not support virt type 'kvm'
#asahi · 2023-07-24 06:59
rycloudTrying to define a VM (domain xml) is throwing this:
#asahi · 2023-07-24 06:59
rycloudHi all, I'm trying to see if my M1 Mac Mini can be used as a virtualisation host.