]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: add support for sending QEMU stdout/stderr to virtlogd
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Nov 2015 11:13:25 +0000 (11:13 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 26 Nov 2015 14:30:16 +0000 (14:30 +0000)
commit0d968ad715475a1660779bcdd2c5b38ad63db4cf
treec294730f74b5b2189f6e39d7c76853f9361d93cf
parenta48539c0139747c07ddb31600d0a3a803f2278be
qemu: add support for sending QEMU stdout/stderr to virtlogd

Currently the QEMU stdout/stderr streams are written directly to
a regular file (eg /var/log/libvirt/qemu/$GUEST.log). While those
can be rotated by logrotate (using copytruncate option) this is
not very efficient. It also leaves open a window of opportunity
for a compromised/broken QEMU to DOS the host filesystem by
writing lots of text to stdout/stderr.

This makes it possible to connect the stdout/stderr file handles
to a pipe that is provided by virtlogd. The virtlogd daemon will
read from this pipe and write data to the log file, performing
file rotation whenever a pre-determined size limit is reached.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
cfg.mk
src/qemu/libvirtd_qemu.aug
src/qemu/qemu.conf
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_domain.c
src/qemu/test_libvirtd_qemu.aug.in