[libvirt] [PATCH 00/12] qemu: don't lose VMs if emulator is not installed

Peter Krempa pkrempa at redhat.com
Wed Aug 16 14:57:49 UTC 2017

The post-parse callback grew into an abomination which requires qemuCaps to
succeed. That won't work out well if for some reasons qemu is uninstalled.
Restarting of libvirtd would result in all VMs being lost untill qemu is

Fix this by allowing qemuCaps to be missing and re-running the postparse
callbacks when attempting a VM start.

Peter Krempa (12):
  conf: domainlist: Explicitly report failure to load domain config
  conf: Add 'basic' post parse callback
  qemu: Move assignment of default emulator to the basic post parse
  conf: Add callbacks that allocate per-def private data
  qemu: domain: Don't re-allocate qemuCaps in post parse callbacks
  conf: Return any non-zero value from
    virDomainDeviceInfoIterateInternal callback
  conf: add infrastructure for tolerating certain post parse callback
  qemu: capabilities: Tolerate missing @qemuCaps in
  qemu: capabilities: Tolerate missing @qemuCaps in
  qemu: domain: Don't return default NIC model if @qemuCaps are missing
  qemu: domain: Don't set default USB model if qemuCaps is missing
  qemu: Implement postParse callback skipping on config reload

 src/conf/domain_conf.c       | 202 +++++++++++++++++++++++++++++--------------
 src/conf/domain_conf.h       |  35 +++++++-
 src/conf/virdomainobjlist.c  |   8 +-
 src/qemu/qemu_capabilities.c |  20 +++--
 src/qemu/qemu_domain.c       | 111 ++++++++++++++++--------
 src/qemu/qemu_process.c      |   9 ++
 6 files changed, 277 insertions(+), 108 deletions(-)


More information about the libvir-list mailing list