permissions: 0.903 graphic: 0.896 debug: 0.893 semantic: 0.883 vnc: 0.868 performance: 0.859 network: 0.856 boot: 0.854 device: 0.849 socket: 0.846 PID: 0.841 other: 0.841 KVM: 0.811 files: 0.802 virtlogd: qemu 2.6.0 doesn't log boot message This report is related to the OpenStack Nova bug [1]. OpenStack tries to utilize the "virtlogd" feature of qemu [2]. steps to reproduce: 1) launch a quest with qemu 2.6.0 which uses virtlogd for the stdout/stderr of its char device 2) check the contents of the backing file of that char device expected result: The boot messages of the guest are logged in this file actual result: The file is empty notes: When I'm connected to that char device and reboot the guest, I see the boot messages in the terminal and also in the backing log file. References: [1] https://bugs.launchpad.net/nova/+bug/1597789 [2] http://git.qemu.org/?p=qemu.git;a=blobdiff;f=qemu-char.c;h=11caa5648de99c9e0ee158f280fbc02ab05915d3;hp=d7be1851e5e9d268aa924a05958da292b048839c;hb=d0d7708ba29cbcc343364a46bff981e0ff88366f;hpb=f1c17521e79df863a5771d96974fab0d07f02be0 Can you provide the full QEMU command line arguments you're using to reproduce this problem. I tested a guest with the following console config: and confirmed that the log file gets written, even when no client is connected to the UNIX domain socket. qemu log: http://paste.openstack.org/show/542559/ Ok, relevant part of command line is -add-fd set=2,fd=33 -chardev socket,id=charconsole0,host=9.152.151.129,port=10000,server,nowait,logfile=/dev/fdset/2,logappend=on -device virtconsole,chardev=charconsole0,id=console0 -chardev pty,id=charconsole1 -device sclpconsole,chardev=charconsole1,id=console1 Which shows a TCP based serial console with log file > Which shows a TCP based serial console with log file Yes, that's true. It's also on the s390x architecture. The char device in the libvirt domain XML is this: Full domain XML: http://paste.openstack.org/show/542597/ Ok, so the problem is a difference in behaviour for virtio-console vs serial ports. For plain x86 serial ports, if there's no client connected to the backend, any data is just discarded. For virtio-console, if there's no client connected to the backend, it'll refuse to send data, hence we never get to log it either. What i'm not sure on is whether this is supposed to work this way. The virtio-console device actually provides two separate services - a paravirt serial port and a paravirt interactive console. The paravirt serial port mode, certainly requires this behaviour, but I'm not convinced the console mode should do this. Patch at https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg06708.html Fix in 2.7.0 release thanks to commit bce6261eb2d879625126485d4ddd28cacb93152e Author: Daniel P. Berrange