Hide Forgot
Description of problem: console IO doesn't work Version-Release number of selected component (if applicable): Host kernel: #uname -r 2.6.32-118.el6.x86_64 Qemu-kvm version #qemu-kvm-0.12.1.2-2.149.el6.x86_64 Guest kernel: #uname -r 2.6.32-118.el6.x86_64 2/2 How reproducible: Steps to Reproduce: 1.boot guest two configured console ports /usr/libexec/qemu-kvm -m 2G -smp 4 -drive file=/root/zhangjunyi/rhel6.1-ide.qcow2,if=none,id=test,cache=none,format=qcow2,werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -boot c -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:95 -vnc :11 / -device virtio-serial-pci,id=ser0,max_ports=2 -chardev socket,path=/tmp/foo,server,nowait,id=foo -chardev socket,path=/tmp/bar,server,nowait,id=bar -device virtconsole,bus=ser0.0,chardev=foo,name=org.fedoraproject.console.foo,id=zhang1 -device virtconsole,bus=ser0.0,chardev=bar,name=org.fedoraproject.console.bar,id=zhang2 -qmp tcp:0:4444,server,nowait -monitor stdio 2.In guest 2.1 setenforce 0 2.2 shoudown firewall 2.3 agetty /dev/hvc0 9600 vt100 2.4 agetty /dev/hvc1 9600 vt100 3.in host 3.1 setenforce 0 3.2 shoudown firewall 3.3 socat /tmp/foo - 3.4 socat /tmp/bar - Actual results: console IO doesn't work,didn't get the two console terminals. Expected results: should get the two console terminals. Additional info:
A few questions: * Does hitting 'enter' in the host socat programs give some output? * If not, do you have /etc/securetty and /etc/event.d flies configured for hvc IO? * Does IO work in any other case?
(In reply to comment #2) > A few questions: > * If not, do you have /etc/securetty and /etc/event.d flies configured for hvc > IO? No I tried this again after configure hvc0 in /etc/securetty #cat /etc/securetty | grep hvc0 hvc0 In Host #agetty /dev/hvc1 9600 vt100 #/dev/hvc0 9600 vt100 In guest Just can input password,after input password. #socat /tmp/bar - Red Hat Enterprise Linux Server release 6.0 (Santiago) Kernel 2.6.32-118.el6.x86_64 on an x86_64 dhcp-91-86.nay.redhat.com.englab.nay.redhat.com login: root ls #socat /tmp/foo - Red Hat Enterprise Linux Server release 6.0 (Santiago) Kernel 2.6.32-118.el6.x86_64 on an x86_64 dhcp-91-86.nay.redhat.com.englab.nay.redhat.com login: root root ls re-observe in host #agetty /dev/hvc1 9600 vt100 Connection to 10.66.91.86 closed. # agetty /dev/hvc0 9600 vt100 Connection to 10.66.91.86 closed. Didn't find exceptional logs in serial console and /var/log/messages
This bug can be reproduced in: host: qemu-kvm-0.12.1.2-2.169.el6.x86_64 kernel 2.6.32-166.el6.x86_64 guest: kernel 2.6.32-167.el6.x86_64
This might be a bug in the hvc code that is being discussed upstream. Will backport when it is merged upstream. https://lkml.org/lkml/2011/11/8/430
If a single console works then we prefer to close this bug, since two consoles are not really needed.
(In reply to comment #9) > If a single console works then we prefer to close this bug, since two > consoles are not really needed. I tried many times on qemu-kvm-0.12.1.2-2.295.el6.x86_64, 2.6.32-279.el6.x86_64(both host and guest). Failed even with a single console. What interesting is: 1. sometimes, a single console works, sometimes not 2. sometimes, two consoles work, sometimes only one console works, the other one fails either doesn't prompt to input password or complains incorrect login What more interesting is, 1. boot with a single console, open a terminal then run 'agetty /dev/hvc0 9600 vt100', *wait for several minutes*, setup connection on host by nc, always sucessful to login. Is there any possibility that race happens?
(In reply to comment #10) > What more interesting is, > 1. boot with a single console, open a terminal then run 'agetty /dev/hvc0 > 9600 vt100', *wait for several minutes*, setup connection on host by nc, > always sucessful to login. This is very interesting (kudos for finding it!); do both the console always work if you wait several minutes and then connect the host side?
(In reply to Amit Shah from comment #13) > (In reply to comment #10) > > > What more interesting is, > > 1. boot with a single console, open a terminal then run 'agetty /dev/hvc0 > > 9600 vt100', *wait for several minutes*, setup connection on host by nc, > > always sucessful to login. > > This is very interesting (kudos for finding it!); do both the console always > work if you wait several minutes and then connect the host side? No. It always failed if booting with two virtconsole. 1. run below commands in parallel agetty /dev/hvc0 9600 vt100 agetty /dev/hvc1 9600 vt100 2. login guest through 1st socket in host by nc 3. wait for several minutes 4. login guest through 2nd then Sometimes, the 1st login was successful but 2nd login failed. Sometimes, both login failed without Password prompt. version of qemu-kvm: qemu-kvm-0.12.1.2-2.369.el6.x86_64 CLI: /usr/libexec/qemu-kvm -name test -M rhel6.5.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -drive file=/home/rhel6.4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:22:ab,bus=pci.0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0 -chardev socket,id=charchannel0,path=/tmp/socket-1,server,nowait -device virtconsole,bus=virtio-serial0.0,chardev=charchannel0,id=channel0,name=com.redhat.1 -vnc :1 -k en-us -vga cirrus -monitor stdio -serial unix:/tmp/serial,server,nowait