[Unit]
Description=Virtual machine log manager
Requires=virtlogd.socket
Requires=virtlogd-admin.socket
Before=libvirtd.service
Documentation=man:virtlogd(8)
Documentation=https://libvirt.org

[Service]
EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd
ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the logs is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
# sure we discourage OOM killer
OOMScoreAdjust=-900
# Need to have at least one file open per guest (eg QEMU
# stdio log), but might be more (eg serial console logs)
# A common case is OpenStack which often has up to 4 file
# handles per guest.
# libvirtd.service written to expect 4096 guests, so if we
# guess at 4 files per guest here that is 16k:
LimitNOFILE=16384

[Install]
Also=virtlogd.socket
