Red Hat Bugzilla – Bug 1110219
Guest can't receive any character transmitted from host after hot unplugging virtserialport then hot plugging again
Last modified: 2015-02-25 06:16:36 EST
This bug has been copied from bug #1038914 and has been proposed to be backported to 7.0 z-stream (EUS).
Fix included in qemu-kvm-1.5.3-60.el7_0.3
Reproduce this bug using the following version: host: kernel-3.10.0-128.el7.x86_64 qemu-kvm-1.5.3-60.el7.x86_64 guest: kernel-3.10.0-123.el7.x86_64 Steps to Reproduce: 1.Boot rhel7 guest with this command line /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm 2.transfer data from host to guest 2. On host: # hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm 3.In guest, receive the data from host by: # cat /dev/vport0p 4.hot unplug the virtserialport: (qemu) device_del channel0 5. hot plug virtserialport: (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm.com 6. cat /dev/vport0p1 in guest Actual results: after step6, guest cann't receive any data from host.
Verify this bug using the following version: host: kernel-3.10.0-128.el7.x86_64 qemu-kvm-1.5.3-64.el7.x86_64 guest: kernel-3.10.0-123.el7.x86_64 Steps to Verify: 1.Boot rhel7 guest with this command line /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm 2.transfer data from host to guest 2. On host: # hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm 3.In guest, receive the data from host by: # cat /dev/vport0p1 4.hot unplug the virtserialport: (qemu) device_del channel0 5. hot plug virtserialport: (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm.com 6. cat /dev/vport0p1 in guest Actual results: guest can receive data after step 6.
(In reply to huiqingding from comment #6) > Verify this bug using the following version: > host: > kernel-3.10.0-128.el7.x86_64 > qemu-kvm-1.5.3-64.el7.x86_64 > guest: > kernel-3.10.0-123.el7.x86_64 > Correction: Verify this bug using the following version: host: kernel-3.10.0-128.el7.x86_64 qemu-kvm-1.5.3-60.el7_0.4.x86_64 guest: kernel-3.10.0-123.el7.x86_64 Use the following steps, RHEL7 guest can receive the character transmitted from host after hot unplugging virtserialport then hot plugging again > Steps to Verify: > 1.Boot rhel7 guest with this command line > /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp > 4,sockets=1,cores=4,threads=1 -name test -rtc > base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice > disable-ticketing,port=5930 -vga qxl -monitor stdio -drive > file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk, > format=qcow2,aio=native,werror=stop,rerror=stop -device > virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev > tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device > virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d, > bus=pci.0,addr=0x9 -device > virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev > socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm, > server,nowait -device > virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0, > name=com.redhat.rhevm.vdsm > > 2.transfer data from host to guest > 2. On host: > # hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm > > 3.In guest, receive the data from host by: > # cat /dev/vport0p1 > > 4.hot unplug the virtserialport: > (qemu) device_del channel0 > > 5. hot plug virtserialport: > (qemu) device_add > virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0, > name=com.redhat.rhevm.vdsm.com > > 6. cat /dev/vport0p1 in guest > > Actual results: > > guest can receive data after step 6.
Use win2012 guest and verify this bug using the following version: host: kernel-3.10.0-128.el7.x86_64 qemu-kvm-1.5.3-60.el7_0.4.x86_64 guest: win2012 guest virtio-win-1.7.1-1.el7.noarch Steps to Verify: 1.Boot rhel7 guest with this command line /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm 2.In guest, receive the data from host by: # python VirtIoChannel_guest_recieve.py com.redhat.rhevm.vdsm 3. On host, transfer data to the guest: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 4.hot unplug the virtserialport: (qemu) device_del channel0 5. hot plug virtserialport: (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm 6. repeat step2 and step3 Actual results: guest can receive data after step 6.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-0927.html