vi /etc/libvirt/libvirtd.conf Add these lines (or just uncomment):
----------------------------------------
-------
# Logging level: 0 none, 4 errors, 3 warnings, 2 informations, 1 debug
# basically 1 will log everything possible
log_level = 4To show logs through a file (/var/log/libvirt/libvirtd.log)
----------------------------------------
-----------------------
# Logging outputs:
# An output is one of the places to save logging informations
# The format for an output can be:
# x:stderr
# output goes to stderr
# x:syslog:name
# use syslog for the output and use the given name as the ident
# x:file:file_path
# output to a file, with the given filepath
# In all case the x prefix is the minimal level, acting as a filter
# 0: everything
# 1: DEBUG
# 2: INFO
# 3: WARNING
# 4: ERROR
#
# Multiple output can be defined , they just need to be separated by spaces.
# e.g.:
log_outputs="1:file:/var/log/libvirt/libvirtd.log"For filters use:
-----------------------
# Logging filters:
# A filter allows to select a different logging level for a given category
# of logs
# The format for a filter is:
# x:name
# where name is a match string e.g. remote or qemu
# the x prefix is the minimal level where matching messages should be logged
# 1: DEBUG
# 2: INFO
# 3: WARNING
# 4: ERROR
#
# Multiple filter can be defined in a single @filters, they just need to be
# separated by spaces.
#
# e.g:
# log_filters="3:remote 4:event"
# to only get warning or errors from the remote layer and only errors from
# the event layer.
To finish, just restart libvirt:
$
/etc/init.d/libvirtd restartReferences:
http://libvirt.org/logging.html