Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 682168

Summary: console ports still in guest after hot unplug virtio-serial-pci or virtconsole
Product: Red Hat Enterprise Linux 6 Reporter: juzhang <juzhang>
Component: qemu-kvmAssignee: Amit Shah <amit.shah>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: amit.shah, michen, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-08 08:16:14 UTC Type: ---
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: 580954    

Description juzhang 2011-03-04 10:54:58 UTC
Description of problem:
console ports still in guest after  hot unplug  virtio-serial-pci or virtconsole

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

How reproducible:
2/2

Steps to Reproduce:
1.Boot guest with two 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,check console ports number
hvc0  hvc1  hvc2  hvc3  hvc4  hvc5  hvc6  hvc7
3.hot remove virtio-serial-pci
#{"execute":"device_del","arguments":{"id":"ser0"}}
4.I check in qemu,in qemu console,virtio-serial-pci was hot removed.
(qemu)info qtree
5.in guest,console ports still here.
hvc0  hvc1  hvc2  hvc3  hvc4  hvc5  hvc6  hvc7  

Actual results:
in guest,console ports still here.
Expected results:
console should be removed.


Additional info:
After hot remove virtio-serial-pci,if i reboot guest,console ports spawn on this virtio-serial-pci were gone.

Comment 1 juzhang 2011-03-04 11:01:49 UTC
I also tried hot-add console ports,it works after hot add virtio-serial-pci.can find console in guest,do not have to reboot guest.

Comment 3 Amit Shah 2011-03-08 08:09:28 UTC
After hot-unplug, you should notice the relevant entries missing from /dev/vport*.  /dev/hvc entries are from the hvc layer, which is independent from virtio-console.

Comment 4 Amit Shah 2011-03-08 08:16:14 UTC
See comment 3