[libvirt] specifying -serial telnet: in XML

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Thu Apr 2 19:22:12 UTC 2009

| > My kernel boot command line has 'console=ttyS0' option.  Is there anything
| > else I need to ensure 'telnet 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:
|    "console=ttyS0 console=tty"
| whch makes messages go to the serial port and graphical console

I am not using the grub.conf file in the guest. Instead, I am specifying
the "console=ttyS0" with the <cmdline> tag 

    <cmdline>"ro debug root=/dev/sda1 console=ttyS0"</cmdline>
    <boot dev='hd'/>

I have the <console> stanza as:

    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target port='0'/>

With this,if I add "console=tty" to the <cmdline> line,

    <cmdline>"ro debug root=/dev/sda1 console=ttyS0 console=tty"</cmdline>

or "console=tty0"

    <cmdline>"ro debug root=/dev/sda1 console=ttyS0 console=tty0"</cmdline>

the guest exits a few seconds after "virsh start". I don't see any useful
messages in /var/log/libvirt/qemu/guest.log of /var/log/messages.

If I remove the "console=tty" i.e go back to <os> stanza above, the guest
boots fine and I can use the vnc (graphic console) but I don't see any
messages on serial console.



More information about the libvir-list mailing list