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

Peter Krempa pkrempa at redhat.com
Thu Apr 4 09:48:40 UTC 2019


On Thu, Apr 04, 2019 at 09:49:16 +0100, Daniel Berrange wrote:
> On Thu, Apr 04, 2019 at 10:01:27AM +0200, Bjoern Walk wrote:
> > 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)
> >     s390.core     = 0
> >     s390.psw-mask = 0x0002000180000000
> >     s390.psw-addr = 0x000000000010f146
> >     s390.reason   = disabled-wait
> 
> This info is all just guest panick related data, so I'm not covinced we
> should overload  "domstate" for this random set of low level hardware
> parameters.

I'm not even sure whether it's worth having an API to query it at all.
We don't really have means to store the data reliably across libvirtd
restarts as there is no status XML for inactive VMs. This means that the
data will get lost. It also will become instantly invalidated when
starting the VM.

Currently we log the data into the domain log file which in my opinion
feels good enough for this kind of low level information which is not of
much use for non-devs.

Additionally the advantage of logging is that bug reporting tools
usually capture the VM log files.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190404/f4f37429/attachment-0001.sig>


More information about the libvir-list mailing list