[RFC] logrotate: add policy for virtqemud.log
# Enable full debug logging for monolithic libvirtd # tail /etc/libvirt/libvirtd.conf log_level = 1 log_filters="1:*" log_outputs="1:file:/var/log/libvirt/libvirtd.log" # Enable full debug logging for modular QEMU daemon # tail /etc/libvirt/virtqemud.conf log_level = 1 log_filters="1:*" log_outputs="1:file:/var/log/libvirt/virtqemud.log" # Restart only the daemon architecture currently in use systemctl restart libvirtd.service # monolithic mode # OR systemctl restart virtqemud.service # modular mode In general, use either: libvirtd.service for monolithic mode, or virtqemud plus the appropriate modular supporting daemons for modular mode. /var/log/libvirt/ ├── libvirtd.log # host-wide monolithic daemon log ├── virtqemud.log # host-wide modular QEMU daemon log └── qemu/ ├── vm1.log # VM-specific QEMU process log ├── vm2.log └── ... /var/log/libvirt stores host-level libvirt daemon logs, such as libvirtd.log for monolithic mode or virtqemud.log for modular QEMU mode. The /var/log/libvirt/qemu directory stores VM-specific QEMU logs. Therefore, placing virtqemud.log under /var/log/libvirt is appropriate. The existing logrotate configuration includes /var/log/libvirt/libvirtd.log through /etc/logrotate.d/libvirtd, and all VM-specific log files matching /var/log/libvirt/qemu/*.log through /etc/logrotate.d/libvirtd.qemu. It does not currently include /var/log/libvirt/virtqemud.log; therefore, a separate logrotate rule must be added for virtqemud.log if that log is enabled. We should either place virtqemud.log under /var/log/libvirt/qemu/, which is not appropriate because that directory is intended for VM-specific logs. The virtqemud.log rotation rule can be added to /etc/logrotate.d/libvirtd.qemu, or or define a dedicated logrotate rule in a separate file such as /etc/logrotate.d/virtqemud. Example rule: /var/log/libvirt/virtqemud.log { weekly missingok rotate 4 compress delaycompress copytruncate minsize 100k } This would provide the same log-management behavior for modular virtqemud file logging, that is already available for monolithic libvirtd logging.
On Thu, Sep 24, 2026 at 04:23:31AM -0000, partha.satapathy--- via Devel wrote:
We should either place virtqemud.log under /var/log/libvirt/qemu/, which is not appropriate because that directory is intended for VM-specific logs. The virtqemud.log rotation rule can be added to /etc/logrotate.d/libvirtd.qemu, or or define a dedicated logrotate rule in a separate file such as /etc/logrotate.d/virtqemud.
This last option is the preferred - we should take the source file in git "src/remote/libvirtd.logrotate.in" and template it more so that we substitute in the daemon name, "libvirtd" or "virtqemud" or "virtnetworkd", or... etc... Then, the meson.build files should rename and copy that to /etc/logrotated/<daemonname>, for each daemon that we build. In terms of the RPM package, the logrotate config file for each daemon should be in the same sub-RPM as the respective daemon. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Thanks Daniel, Please find the patch at : https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/FCMO5...
Hi Daniel, https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/FCMO5... Gentle ping on this patch, great if can review it when they have a chance. Happy to make any changes needed.
participants (2)
-
Daniel P. Berrangé -
partha.satapathy@oracle.com