Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454616 - libvirt returns wrong console tty with xenner
Summary: libvirt returns wrong console tty with xenner
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
: 459791 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-09 12:29 UTC by Gerd Hoffmann
Modified: 2008-10-17 10:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-10-16 08:57:53 UTC

Attachments (Terms of Use)
complete logfile. (deleted)
2008-07-09 12:29 UTC, Gerd Hoffmann
no flags Details
Fix parsing of stdout to fetch TTYs (deleted)
2008-07-09 15:15 UTC, Daniel Berrange
no flags Details | Diff
Screenshot showing where the rawhide installation stops (deleted)
2008-10-16 21:30 UTC, Julian Sikorski
no flags Details

Description Gerd Hoffmann 2008-07-09 12:29:47 UTC
Description of problem:
see $summary

Version-Release number of selected component (if applicable):

How reproducible:
boot a xen guest with xenner

Actual results:
  zweiblum root ~# virsh ttyconsole testinstall

Expected results:
  zweiblum root ~# virsh ttyconsole testinstall

Additional info:
  zweiblum root ~# grep redir /var/log/libvirt/qemu/testinstall.log 
  char device redirected to /dev/pts/7
  char device redirected to /dev/pts/8

  first is monitor, second is console (aka serial line).

Comment 1 Gerd Hoffmann 2008-07-09 12:29:47 UTC
Created attachment 311366 [details]
complete logfile.

Comment 2 Daniel Berrange 2008-07-09 14:45:31 UTC
Here's the problem in qemu_driver.c:

static int qemudWaitForMonitor(virConnectPtr conn,
                               struct qemud_driver *driver,
                               struct qemud_vm *vm) {
    char buf[1024]; /* Plenty of space to get startup greeting */
    int ret = qemudReadMonitorOutput(conn,
                                     driver, vm, vm->stderr,
                                     buf, sizeof(buf),

1024 bytes is plenty for regular QEMU, but as can be seen from the attachment in
comment #1, it is no where near enough for it to work with xenner.

Comment 3 Daniel Berrange 2008-07-09 15:15:21 UTC
Created attachment 311382 [details]
Fix parsing of  stdout to fetch TTYs

When parsing for multiple TTYs, the code wasn't correctly taking account of
possibility of having leading lines of garbage before the TTY output. So it was
not skipping forward enough after finding the first TTY, and thus getting the
same TTY twice, and/or other serious confusion.

This patch fixes this problem.

So attempting to start xenner now results in

# virsh start xenner
libvir: QEMU error : internal error Out of space while reading console startup
error: Failed to start domain xenner

which is what I would expect since Xenner's output is longer than 1024 bytes.

Comment 4 Gerd Hoffmann 2008-07-17 11:30:27 UTC
Ok, can we also enlarge the buffer please?
Alternatively find another way for xenner's debug logging than writing to stderr.

Comment 5 Daniel Berrange 2008-08-22 13:31:34 UTC
*** Bug 459791 has been marked as a duplicate of this bug. ***

Comment 6 Ahmed Medhat 2008-08-23 01:30:13 UTC
Was there a found solution for this bug ? I applied the patch with no hope.

Any procedures to avoid this occurring will be appreciated.

Comment 7 Ahmed Medhat 2008-08-26 18:54:03 UTC

It turns out that the Xenner services was not running by default in Fedora 9, applying /etc/init.d/xenner to start on booting fixed this issues so far besides applying the patch .

Thanks, /Ahmed Medhat/

Comment 8 Daniel Berrange 2008-09-15 08:39:21 UTC
*** Bug 462120 has been marked as a duplicate of this bug. ***

Comment 9 Gerd Hoffmann 2008-10-16 08:57:53 UTC
Should be fixed with libvirt 0.4.6 and xenner 0.46, which are both in fedora9 updates now.

Comment 10 Julian Sikorski 2008-10-16 21:30:54 UTC
Created attachment 320610 [details]
Screenshot showing where the rawhide installation stops

[root@snowball jsikorski]# rpm -q libvirt
[root@snowball jsikorski]# rpm -q xenner
[root@snowball jsikorski]# 

Not sure if the problem is really fixed. I have attempted to install rawhide today, using the following command:
virt-install --paravirt --os-type=linux --location= --name=pararawhide-i386 --vcpus=1 --file=/var/lib/libvirt/images/pararawhide-i386.img --accelerate --ram=512 --file-size=15
Unfortunately, all I got is this (see attachment). And yes, xenner should be running by default, or at least something should start it up.

Comment 11 Gerd Hoffmann 2008-10-17 10:02:34 UTC
Not related at all, open a new bug please.

Note You need to log in before you can comment on or make changes to this bug.