I'm attempting to configure serial access from my libvirt host to one of its guests.
I've configured the device on the guest and started it:
jsharpe@sel-app1:~$ cat /etc/init/ttyS0.conf
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -8 9600 ttyS0
jsharpe@sel-app1:~$ sudo restart ttyS0
ttyS0 start/running, process 767
jsharpe@sel-app1:~$ ps aux|grep ttyS0
root 767 0.2 0.0 6080 632 ttyS0 Ss+ 17:20 0:00 /sbin/getty -8 9600 ttyS0
jsharpe 769 0.0 0.0 7624 904 pts/0 S+ 17:20 0:00 grep --color=auto ttyS0
On the Host, I try to connect with virsh:
jsharpe@twoface:~ $ virsh console sel-app1
Connected to domain sel-app1
Escape character is ^]
... at this point, the host just hangs. I can kill it with ^], but other keystrokes don't show up in the terminal.
Now, back over to guest, let's restart ttyS0:
jsharpe@sel-app1:~$ sudo restart ttyS0
ttyS0 start/running, process 772
jsharpe@sel-app1:~$ ps aux|grep ttyS0
root 772 1.0 0.0 6076 560 ttyS0 Ss+ 17:23 0:00 /sbin/getty -8 9600 ttyS0
jsharpe 774 0.0 0.0 7624 904 pts/0 S+ 17:23 0:00 grep --color=auto ttyS0
Great, back to the host:
jsharpe@twoface:~ $ virsh console sel-app1
Connected to domain sel-app1
Escape character is ^]
Ubuntu 10.04.3 LTS sel-app1 ttyS0
sel-app1 login:
A login prompt? So I have to restart ttyS0 after a connection has been attempted? wtf. Note that this isn't a timeout issue. The host/console command will hang indefinitely. It isn't until restarting ttyS0 that the connection happens.