[libvirt] Seeking for advice on 'virsh console' problems debugging

Roman Bogorodskiy bogorodskiy at gmail.com
Fri Mar 7 14:15:24 UTC 2014


  Daniel P. Berrange wrote:

> All those mangled messages are being printed out by libvirt client
> code, and it is totally expected that log messages libvirt prints
> are mangled in this way for the console.
> 
> What's more important is what data coming from the guest looks
> like.

All those spaces come from the stream as well. For example, I've added
the following debugging to daemonStreamHandleRead() into
daemon/stream.c:

732     ret = virStreamRecv(stream->st, buffer, bufferLen);
733     VIR_ERROR("buffer = [%s]", buffer);

And it prints stuff like:

2014-03-07 13:29:34.060+0000: 34489787392: error :
daemonStreamHandleRead:733 : buffer = [  File "/usr/bin/cloud    raise
DataSourceNotFoundException(msg)
]
2014-03-07 13:29:34.060+0000: 34489787392: error :
daemonStreamHandleRead:733 : buffer = [
]
2014-03-07 13:29:34.061+0000: 34489787392: error :
daemonStreamHandleRead:733 : buffer = [
]
2014-03-07 13:29:34.061+0000: 34489787392: error :
daemonStreamHandleRead:733 : buffer = [
]

etc

(This /usr/bin/cloud stuff comes from Ubuntu cloud image that probably tries
to find metadata service or something like that).

> > So, e.g. dmesg output for the guest looks almost the same.
> > 
> > Looks like there's something wrong with the terminal settings, but how
> > could that be debugged?
> 
> The virsh console works remotely. So it would be interesting to run
> virsh console on linux, connecting to a FreeBSD hosted guest and see
> if it is still a problem. That would help determine whether virsh
> console is at fault, or the bhyve side is at fault.
> 
> Similarly, try virsh console running on FreeBSD, connecting to a
> guest that is running with KVM on Linux. Again that would help
> narrow down which part is at fault.

Good idea! I'll try to setup such an environment. And, by the way, I've
stopped playing with bhyve console and do debugging with qemu/freebsd
only for now.

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140307/5f3ceddd/attachment-0001.sig>


More information about the libvir-list mailing list