Bug 1089997

Summary: The port of the virtio console device hotpluged on config level changed after restart domain more than twice
Product: [Community] Virtualization Tools Reporter: Yang Yang <yanyang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dyuan, honzhang, jiahu, jtomko, mzhan, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-07 12:15:27 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:

Description Yang Yang 2014-04-22 10:58:42 UTC
Description:
Hot-plug a virtio console device with specified port on config level, then restart domain twice, finally, the port associated with that console device  changed.

How producible:
Always

Product version:
# rpm -q libvirt
libvirt-1.1.1-29.el7.x86_64

Steps:
1. prepare the following xml.
#cat console.xml
<console type='pty'>
<target type='virtio' port='5'/>
</console>

2. hotplug with option config with the above xml
# virsh attach-device demo console.xml --config
Device attached successfully

3. check the port of the hotpluged device
# virsh dumpxml demo --inactive | grep console -a6
      
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <console type='pty'>
      <target type='virtio' port='5'/>
    </console>

4. Restart domain twice
# virsh destroy demo; virsh start demo
Domain demo destroyed

Domain demo started

# virsh destroy demo; virsh start demo
Domain demo destroyed

Domain demo started

5. check the port of the hotpluged device again
# virsh dumpxml demo | grep console -a6
  
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <console type='pty'>
      <source path='/dev/pts/3'/>
      <target type='virtio' port='1'/>
      <alias name='console1'/>
    </console>

Actual Results:
in step 5: The port of the hotpluged device changed to 1

Expected Results:
in step 5: The port should keep same with the value defined in console.xml and not changed.

Additional Info:
If libvirt support to assign a specified port on virtio console, should fix it,

Comment 3 Ján Tomko 2015-05-07 12:15:27 UTC

*** This bug has been marked as a duplicate of bug 1089991 ***