Bug 902201

Summary: can not login guest via virtio-console
Product: Red Hat Enterprise Linux 7 Reporter: yunpingzheng <yunzheng>
Component: qemu-kvmAssignee: Amit Shah <amit.shah>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: hhuang, juzhang, knoel, michen, ngu, qzhang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-28 04:39:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1131808    

Description yunpingzheng 2013-01-21 07:15:18 UTC
Description of problem:
can not login guest via virtio-console

Version-Release number of selected component (if applicable):
Host rhel7: 
kernel-3.7.0-0.31.el7.x86_64
qemu-img-1.3.0-3.el7.x86_64
guest:
rhel6.4
kernel:  kernel-2.6.32-355.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with virtio-console
2.In guest
  2.1 setenforce 0
  2.2 shoudown firewall
  2.3 agetty /dev/hvc0 9600 vt100
3.in host
  3.1 setenforce 0
  3.2 shoudown firewall
  3.3 socat /tmp/virtio-console-1 -
  3.4 nc -U /tmp/virtio-console-1
  
Actual results:
can't login via virtio-console

Expected results:
can login via virtio-console

Additional info:

qemu-cmd:
/usr/bin/qemu-kvm \
-name 'vm1' \
-nodefaults \
-m 4096 \
-smp 4,cores=2,threads=1,sockets=2 \
-vnc :22 \
-vga std \
-rtc base=utc,clock=host,driftfix=none \
-drive file=/root/qemu_kvm/RHEL-Server-6.4-64-virtio.qcow2,if=none,cache=none,id=virtio0 \
-device virtio-blk-pci,drive=virtio0 \
-device virtio-net-pci,netdev=id3Ibo2c,mac=9a:5e:5f:60:61:62 \
-netdev tap,id=id3Ibo2c,script=/root/qemu_kvm/qemu-ifup-switch \
-device ich9-usb-uhci1,id=usb1 \
-boot order=cdn,once=c,menu=off \
-enable-kvm \
-monitor stdio \
-chardev socket,id=isa-serial-1,path=/tmp/isa-serial-1,server,nowait \
-device isa-serial,chardev=isa-serial-1 \
-chardev socket,id=isa-serial-2,path=/tmp/isa-serial-2,server,nowait \
-device isa-serial,chardev=isa-serial-2 \
-device virtio-serial,id=virt-serial-1 \
-chardev socket,id=virtio-serial-1,path=/tmp/virtio-serial-1,server,nowait \
-device virtserialport,chardev=virtio-serial-1,name=virtio.serial.1,bus=virt-serial-1.0 \
-chardev socket,id=virtio-serial-2,path=/tmp/virtio-serial-2,server,nowait \
-device virtserialport,chardev=virtio-serial-2,name=virtio.serial.2,bus=virt-serial-1.0 \
-device virtio-serial,id=virt-console-1 \
-chardev socket,id=virtio-console-1,path=/tmp/virtio-console-1,server,nowait \
-device virtconsole,chardev=virtio-console-1,name=virtio.console.1,bus=virt-console-1.0

Host cpu
[root@localhost ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              6784.43
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

Comment 2 Amit Shah 2013-11-14 12:58:12 UTC
Can you try this again?  Please also check how systemd handles consoles.

Comment 3 yunpingzheng 2013-11-21 07:18:15 UTC
Hi Amit:
I have retry it in the newest tree, both host and guest using the newest kernel and qemu(host). this issue still exist.
host:
    kernel: kernel-3.10.0-53.el7.x86_64
    qemu:   qemu-kvm-1.5.3-19.el7.x86_64
guest:
    kernel: kernel-3.10.0-53.el7.x86_64

test step:
1.boot guest with virtio-console
2.In guest
  2.1 setenforce 0
  2.2 shoudown firewall
  2.3 agetty /dev/hvc0 9600 vt100
3.in host
  3.1 setenforce 0
  3.2 shoudown firewall
  3.3 socat /tmp/virtio-console-1 -
  3.4 nc -U /tmp/virtio-console-1

other info:
in guest:

#cat /etc/securetty:
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
hvc0
hvc1
hvsi0
hvsi1
hvsi2
xvc0
ttyS0

#cat /proc/cmdline
[root@dhcp-8-218 ~]# cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-3.10.0-50.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 crashkernel=auto reboot=pci console=ttyS0,115200 vconsole.keymap=us vconsole.font=latarcyrheb-sun16 biosdevname=0 crashkernel=256M rhgb quiet

Comment 7 Gu Nini 2014-11-26 03:09:31 UTC
I also met the bug on ppc system/ppc64 host, the software version is as follows:
qemu-kvm:
qemu-kvm-2.0.0-2.1.pkvm2_1_1.20.38.ppc64
qemu-kvm-tools-2.0.0-2.1.pkvm2_1_1.20.38.ppc64

host kernel:
3.10.42-2018.1.pkvm2_1_1.46.ppc64

guest kernel:
3.10.0-201.ae17a.ppc64le