[libvirt-users] logging of domains

Michal Privoznik mprivozn at redhat.com
Thu May 30 13:17:16 UTC 2019

On 5/29/19 4:59 PM, Lentes, Bernd wrote:
> Hi,
> recently i had some domains stopped without any obvious reason for me. Unfortunately i didn't find the cause.
> I'd like to log information about the domains that i have more information the next time this will happen.
> In /etc/libvirt/libvirtd.conf i have:
> log_level = 3
> log_outputs="3:file:/var/log/libvirt/libvirtd.log"
> which creates enormous log files, but with logrotate and xz i can manage that. But i think this is just
> related to libvirtd.
> The logs for the domains under /var/log/libvirt/qemu are poor and very small, nearly no information.
> Is there a way to be more verbose with the domains so that i may find helpful information in these logs when the domains stop for the next time ?

Domain logs usually contain only command line and a very few info. It's 
the daemon logs where all the interesting bits are logged. This is 
almost by design because qemu's stdout/stderr is logged in domain log 
file and daemon logs go then into that enormous file.

Anyway, what's the issue you're trying to debug?

If your machine stops for no obvious reason try 'virsh domstate 
--reason'. It might give you an idea.


More information about the libvirt-users mailing list