Bug 1447505

Summary: assign virtio-serial addresses to virtio consoles
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Pei Zhang <pzhang>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DEFERRED QA Contact: jiyan <jiyan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: dyuan, jiyan, jtomko, rbalakri, xuzhang, yalzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-18 13:15:19 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: 1599981    

Description Pei Zhang 2017-05-03 03:13:25 UTC
Description of problem:
Currently virtio console can never generate virtio serial address.

Version-Release number of selected component (if applicable):
libvirt-3.2.0-3.el7.x86_64
qemu-kvm-rhev-2.9.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start a guest with following virtio console 
# virsh dumpxml r74 |grep console -A 5
    <console type='pty'>
      <target type='virtio' port='0'/>
    </console>

# virsh start r74
Domain r74 started

# virsh dumpxml r74 |grep console -A 5
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='virtio' port='0'/>
      <alias name='console0'/>
    </console>

2. Hotplug a virtio console  
# cat console.xml 
  <console type='pty'>
      <target type='virtio' port='0'/>
    </console>

# virsh attach-device r74 console.xml 
Device attached successfully

# virsh dumpxml r74 |grep console -A 5
    <console type='pty' tty='/dev/pts/5'>
      <source path='/dev/pts/5'/>
      <target type='virtio' port='0'/>
      <alias name='console1'/>
    </console>

3. Adding virtio-serial address for virtio console via editing vm xml.
#virsh edit r74
...
  <console type='pty'>
      <target type='virtio' port='0'/>
      <address type='virtio-serial' controller='0' bus='0' port='3'/>
    </console>
...

#virsh start r74
Domain r74 started

# virsh dumpxml r74|grep console -A 3
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target type='virtio' port='0'/>
      <alias name='console0'/>
      <address type='virtio-serial' controller='0' bus='0' port='3'/>
    </console>

Check qemu cmdline :
......
-chardev pty,id=charconsole0 
-device virtconsole,bus=virtio-serial0.0,nr=3,chardev=charconsole0,id=console0 
......

Actual results:
As step 1 and step 2 virtio console cannot generated address.

Expected results:
As step 3, virtio console should have a virtio-serial address.

Additional info:
This is a seperated bug from https://bugzilla.redhat.com/show_bug.cgi?id=1387666#c6

Comment 2 Ján Tomko 2018-06-08 09:03:03 UTC
*** Bug 1531470 has been marked as a duplicate of this bug. ***

Comment 3 Jaroslav Suchanek 2020-02-18 13:15:19 UTC
This bug was closed deferred as a result of bug triage.

Please reopen if you disagree and provide justification why this bug should
get enough priority. Most important would be information about impact on
customer or layered product. Please indicate requested target release.

Comment 4 Jaroslav Suchanek 2020-02-18 14:24:27 UTC
*** Bug 1599981 has been marked as a duplicate of this bug. ***