Generate libvirt debug logs
To diagnose virtual machine (VM) problems, it is helpful to generate and review libvirt debug logs. Attaching debug logs is also useful when asking for support to resolve VM-related problems.
libvirt debug logs Copy linkLink copied!
Debug logs are text files that contain data about events that occur during virtual machine (VM) runtime. The logs provide information about server-side functionalities, such as host libraries and the libvirt daemon, and contain the standard error output (stderr) of all running VMs.
Debug logging is not enabled by default and has to be enabled when libvirt starts. You can enable libvirt debug logs persistently, or only for the current session.
Afterwards, you can attach the collected logs when requesting support with a VM problem.
Enable libvirt debug logs persistently Copy linkLink copied!
To ensure that your virtualization host automatically logs debug information, configure libvirt debug logging to be automatically enabled whenever libvirt starts.
About this task Copy linkLink copied!
By default, virtqemud is the main libvirt daemon in RHEL 10. To make persistent changes in the libvirt configuration, you must edit the virtqemud.conf file, located in the /etc/libvirt directory.
Procedure Copy linkLink copied!
Enable libvirt debug logs during runtime Copy linkLink copied!
To temporarily gather virtualization debugging information, you can modify the runtime settings of the libvirt daemon to enable debug logs and save them to an output file.
Before you begin Copy linkLink copied!
- Make sure the
libvirt-adminpackage is installed.
About this task Copy linkLink copied!
Modifying libvirt runtime settings is useful in the following scenarios:
- When restarting the
libvirtdaemon is not possible because restarting fixes the problem. - When another process, such as migration or backup, is running at the same time.
- When you want to try a command without editing the configuration files or restarting the daemon.
Procedure Copy linkLink copied!
Attach libvirt debug logs to support requests Copy linkLink copied!
To diagnose and resolve virtual machine (VM) problems, you might have to request additional support. Attaching debug logs to the support request is highly recommended to ensure that the support team has access to all the information they need to provide a resolution for a VM-related problem.