[libvirt] [PATCH 0/9] extend virsh domstate to show additional information

Bjoern Walk bwalk at linux.ibm.com
Wed Jul 11 10:49:13 UTC 2018


This patch series introduces the ability to save additional information
for the domain state and exposes this information in virsh domstate.

For example in the case of QEMU guest panic events, we can provide additional
information like the crash reason or register state of the domain. This
information usually gets logged in the domain log but for debugging it is
useful to have it accessible from the client. Therefore, let's introduce a new
public API function, virDomainGetStateParams, an extensible version of
virDomainGetState, which returns the complete state of the domain, including
newly introduced additional information.

Let's also extend virsh domstate and introduce a new parameter --info to show
the domain state, reason and additional information when available.

    virsh # domstate --info guest-1
    crashed (panicked: disabled-wait core='1' psw-mask='0x000000000010f146' \
         psw-addr='0x0002000180000000')


Bjoern Walk (9):
  conf: add info to virDomainStateReason
  conf: set/retrieve state information
  lib: introduce virDomainGetStateParams function
  remote: implement remoteDomainGetStateParams
  qemu: implement qemuDomainGetStateParams
  qemu: set state information for guest panic event
  virsh: domstate: report detailed state if available
  news: add entry for virDomainGetStateParams
  qemu: fix order of S390 panic event information

 docs/news.xml                       | 11 ++++++
 include/libvirt/libvirt-domain.h    | 24 ++++++++++++
 src/conf/domain_conf.c              | 16 +++++++-
 src/conf/domain_conf.h              |  7 ++++
 src/driver-hypervisor.h             |  7 ++++
 src/libvirt-domain.c                | 56 ++++++++++++++++++++++++++
 src/libvirt_private.syms            |  1 +
 src/libvirt_public.syms             |  5 +++
 src/qemu/qemu_driver.c              | 61 ++++++++++++++++++++++++++++-
 src/qemu/qemu_monitor.c             | 39 ++++++++++++++++--
 src/qemu/qemu_monitor.h             |  1 +
 src/remote/remote_daemon_dispatch.c |  1 -
 src/remote/remote_driver.c          |  1 +
 src/remote/remote_protocol.x        | 20 +++++++++-
 src/remote_protocol-structs         | 11 ++++++
 tools/virsh-domain-monitor.c        | 31 ++++++++++++---
 tools/virsh.pod                     |  5 ++-
 17 files changed, 281 insertions(+), 16 deletions(-)

-- 
2.17.0




More information about the libvir-list mailing list