[libvirt] specifying -serial telnet: in XML
Daniel P. Berrange
berrange at redhat.com
Thu Apr 2 18:51:05 UTC 2009
On Wed, Apr 01, 2009 at 10:13:53PM -0700, Sukadev Bhattiprolu wrote:
> I run qemu (version 0.9.1 kvm-84) with -serial option as follows:
> - serial telnet::2445,server
> so I can telnet to 2445 and have a serial console.
> I tried specifying this to libvirt (version 0.6.0) using the following stanza:
> <serial type='tcp'>
> <source mode="bind" host="127.0.0.1" service="2445"/>
> <protocol type="telnet"/>
> <target port="1"/>
> I checked /var/log/libvirt/qemu/<guest>.log and found that libvirt
> added 'nowait' to the serial option:
> -serial telnet:127.0.0.1:2445,server,nowait
> which is fine (I think).
> But when I start my guest, and "telnet 127.0.0.1 2445" I don't get any
> output even though the guest boots up fine. After the guest boots
> $ echo foo > /dev/ttyS0
> in the guest shows the 'foo' in the telnet window. But I don't get the
> boot/shutdown messages.
> I also have the vnc option in the xml,
> <graphics type='vnc' port='5902' autoport='no' listen='127.0.0.1'/>
> so if I open vncviewer, I can see the boot messages. The problem with this
> though is if the kernel fails to boot for some reason, the vncviewer exits
> and I can't find the reason the boot failed.
> My kernel boot command line has 'console=ttyS0' option. Is there anything
> else I need to ensure 'telnet 127.0.0.1 port' displays the messages ?
That setting should be what's required to make serial console work. Are
you sure you've got it set in the correct place of grub.conf for the
guest OS ? I have my guests configured using:
whch makes messages go to the serial port and graphical console
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list