Bug 682168 - console ports still in guest after hot unplug virtio-serial-pci or virtconsole
Summary: console ports still in guest after hot unplug virtio-serial-pci or virtconsole
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580954
TreeView+ depends on / blocked
 
Reported: 2011-03-04 10:54 UTC by juzhang
Modified: 2011-03-08 08:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-08 08:16:14 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.