[Focal] 'virsh domcapabilities' fails unless 'virsh capabilites' is run first

Bug #1867460 reported by Chris Newcomer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Undecided
Christian Ehrhardt 

Bug Description

This is affecting my MAAS installation to be able to create VMs through the pods interface.

cnewcome@neuromancer:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu Focal Fossa (development branch)"

cnewcome@neuromancer:~$ virsh domcapabilities
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'x86_64' architecture

cnewcome@neuromancer:~$ virsh capabilities
<capabilities>

...
</capabilities>

cnewcome@neuromancer:~$ virsh domcapabilities
<domainCapabilities>
...
</domainCapabilities>

cnewcome@neuromancer:~$ dpkg -l | grep libvirt
ii gir1.2-libvirt-glib-1.0:amd64 2.0.0-2 amd64 GObject introspection files for the libvirt-glib library
ii libvirt-clients 6.0.0-0ubuntu5 amd64 Programs for the libvirt library
ii libvirt-daemon 6.0.0-0ubuntu5 amd64 Virtualization daemon
ii libvirt-daemon-driver-qemu 6.0.0-0ubuntu5 amd64 Virtualization daemon QEMU connection driver
ii libvirt-daemon-driver-storage-rbd 6.0.0-0ubuntu5 amd64 Virtualization daemon RBD storage driver
ii libvirt-daemon-system 6.0.0-0ubuntu5 amd64 Libvirt daemon configuration files
ii libvirt-daemon-system-systemd 6.0.0-0ubuntu5 amd64 Libvirt daemon configuration files (systemd)
ii libvirt-glib-1.0-0:amd64 2.0.0-2 amd64 libvirt GLib and GObject mapping library
ii libvirt0:amd64 6.0.0-0ubuntu5 amd64 library for interfacing with different virtualization systems
ii python3-libvirt 6.0.0-0ubuntu3 amd64 libvirt Python 3 bindings
cnewcome@neuromancer:~$

Related branches

Revision history for this message
Bryce Harrington (bryce) wrote :

I was able to reproduce this in lxc:

$ sudo apt-get install libvirt-clients gir1.2-libvirt-glib-1.0 libvirt-daemon-driver-qemu libvirt-daemon-driver-storage-rbd libvirt-daemon-system libvirt-daemon-system-systemd libvirt-glib-1.0-0 libvirt0 python3-libvirt

triage-focal+20.04:~$ virsh domcapabilities
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'x86_64' architecture

And after running `virsh capabilities` and then again `virsh domcapabilities` it shows valid looking output.

Changed in libvirt (Ubuntu):
status: New → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I was seeing that as well, will look at this as soon as some other high prio breakages are resolved.

Changed in libvirt (Ubuntu):
assignee: nobody → Christian Ehrhardt  (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Repro is easy, right after install:

root@f-dcap-after-cap:~# virsh domcapabilities
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'x86_64' architecture

But if you run cap, then dcap works:
$ virsh capabilities
...
$ virsh domcapabilities
... now it works ...

The situation can be re-created on a system later on via:

$ rm /var/cache/libvirt/qemu/capabilities/*.xml
$ systemctl restart libvirtd
$ virsh domcapabilities
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'x86_64' architecture

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

After an upstream discussion (Thanks danpb !) I'll probably need:

$ git tag --contains c76009313f8068c848cad6cb517daf42e6716bb9
v6.1.0
v6.1.0-rc1
v6.1.0-rc2
$ git tag --contains 6d786f95a366600e7bbae68c1b324a8131f5e2c5
v6.1.0
v6.1.0-rc1
v6.1.0-rc2

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: I combined a few other ongoing issues into the same PPA&MP

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The PPA build works, just need to ensure the other changes are fine as well before an upload to 20.04.

Changed in libvirt (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI Regression test is fine on this build

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 6.0.0-0ubuntu6

---------------
libvirt (6.0.0-0ubuntu6) focal; urgency=medium

  * d/p/ubuntu/lp-1867460-*: fix domcapabilities before capabilities
    and binary autodetection in general (LP: #1867460)
  * d/p/stable/lp-1868539-*: stabilize libvirt by backporting upstream
    fixes (LP: #1868539)
  * d/p/ubuntu/lp-1853200*: add cpu models without hle/rtm features to have
    modern types on kernels with recent security fixes (LP: #1853200)
  * d/p/ubuntu/lp-1868528-*: Fail when fetching CPU Status for invalid CPU
    (LP: #1868528)

 -- Christian Ehrhardt <email address hidden> Fri, 20 Mar 2020 10:34:19 +0100

Changed in libvirt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.