-----Original Message-----
From: Daniel P. Berrangé <berrange(a)redhat.com>
Sent: 01 March 2021 15:39
To: Thanos Makatos <thanos.makatos(a)nutanix.com>
Cc: libvir-list(a)redhat.com
Subject: Re: using libvirt 4.5 with upstream qemu
On Mon, Mar 01, 2021 at 03:30:58PM +0000, Thanos Makatos wrote:
> I'm trying to use QEMU master with libvirt 4.5 and QEMU seems to be
> hanging when I try to start a guest.
>
> My environment is a modified CentOS 7.9 installation using libvirt
> 4.5.0. When I use a modified version of QEMU 2.12 (reasonably close to
> the stock CentOS
> version) everything works fine. When I try to use a fairly recent
> version of QEMU (e.g. v5.2.0-729-g89ff714f4b).
>
> qemu 118657 1.6 0.0 0 0 ? Z 14:50 0:00 [qemu-kvm]
<defunct>
> qemu 118664 0.0 0.0 207340 3560 ? Ssl 14:50 0:00
/usr/libexec/qemu-kvm -S -no-user-config -nodefaults -nographic -machine
none,accel=kvm:tcg -qmp
unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile
/var/lib/libvirt/qemu/capabilities.pidfile -daemonize
> qemu 118666 0.0 0.0 275008 13916 ? Sl 14:50 0:00
/usr/libexec/qemu-kvm -S -no-user-config -nodefaults -nographic -machine
none,accel=kvm:tcg -qmp
unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile
/var/lib/libvirt/qemu/capabilities.pidfile -daemonize
>
> /var/lib/libvirt/qemu/capabilities.pidfile contains the PID of the 2nd
> QEMU process and by experimenting I found that by killing the QEMU
> process NOT in the PID file the same thing happens again (maybe once
> more or twice) and then the guest boots fine.
>
> Does libvirt have some specific QEMU dependency? Is there some
> compatibility matrix I might have missed? I understand this may not be
> a supported configuration given that I'm not using vanilla
> libvirt/QEMU, however I'd appreciate some pointers so I can further
> debug this. I've trying debugging this in case there's some obvious error
but
didn't find anything interesting.
You want libvirt to be the same age as the QEMU you're using, or newer.
Makes sense, thanks.
New libvirt is expected to work with old QEMU.
Old libvirt may not work with new QEMU.
QEMU's deprecation process leads to code/behaviour being
removed/changed over time and this may break old libvirt. I don't know the
cause of the problem in your specific case, but personally i wouldn't spend
time trying to debug it as it isn't a scenario we attempt to support.