libvirt: virtlogd: qemu 2.6.0 doesn't log boot message

Bug #1597789 reported by Markus Zoeller (markus_z)
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)

Bug Description

With libvirt 1.3.3 and Qemu 2.6.0 char devices are able to log their
stdout/stderr into a log file via a "<log>" XML element in the domain XML.
This feature solves the long standing bug 832507 (which can flood the log)
by a built-in log rotation. It also removes the mutually exclusivity of
"serial console" and "get console output".

Unfortunately, an (assumed) issue in Qemu prevents the logging of the
boot messages of the guest *unless* the connection to the char device is
already established.

Steps to reproduce
A chronological list of steps which will bring off the
issue you noticed:
* Ensure to have the code of applied
* Ensure to have libvirt 1.3.3 and qemu 2.6.0
* Launch an instance
* execute: nova console-log <server>

Expected result
The CLI returns the boot messages.

Actual result
The result is an empty string.

If I connect to the used console (via Horizon for example), execute "echo 'foo'" and things like that, the next call of "nova console-log <server>" *does* return those executed commands (but still not the boot messages). If I reboot withing the console, *then* the boot messages will be logged too.

1. OpenStack version: master (Newton)
   $ git log --oneline -4
   201e231 libvirt: virtlogd: use virtlogd for char devices
   73e931a libvirt: simplify "get_console_output" interface
   ec94d7b libvirt: fix live-migration with serial console check
   fcb3dbf Merge "Fix error message for VirtualInterfaceUnplugException"

2. Which hypervisor did you use?
   libvirt 1.3.3 and kvm-qemu 2.6.0

2. Which storage type did you use?
   (For example: Ceph, LVM, GPFS, ...)
   What's the version of that?

3. Which networking type did you use?
   neutron + ovs

Logs & Configs

Tags: libvirt
tags: added: libvirt
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@Matt, no, I don't think so. After discussing this with danpb we agreed to use a new "workarounds" config option [1]. When this gets fixed fast in Qemu then we can still exploit it in Newton with a small follow up patch which deprecates that config option and activates the feature by default.


Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

The bug report for the Qemu project:

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

Marked as duplicate. The issue was in qemu and got fixed with v2.7.0. Also, Nova doesn't yet have a dependency to virtlogd. This is still under development with

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

FWIW, I tested this successfully with a Devstack setup:

# =================================
# OpenStack version infos
# =================================
[12:18:24 stack@qemu-src ~/devstack ] $ ./tools/

# ====================================
# Hypervisor version infos
# ====================================
[12:19:33 stack@qemu-src ~/devstack ] $ sudo virsh -c qemu:///system version
Compiled against library: libvirt 1.3.3
Using library: libvirt 1.3.3
Using API: QEMU 1.3.3
Running hypervisor: QEMU 2.7.0

# =================================
# Devstack patches
# =================================

# ==================================
# Build environment
# ==================================

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.