Hide Forgot
Description of problem: Boot a win2k8-64 guest, hot plug the second data disk and then hot unplug it, got I/O error and the guest is stopped Version-Release number of selected component (if applicable): kernel-2.6.32-215.el6.x86_64 qemu-kvm-0.12.1.2-2.209.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Boot a win2k8-64 guest /usr/libexec/qemu-kvm -m 2G -smp 2 -cpu cpu64-rhel6,+x2apic -drive file=/home/win2k8-64-virtio.qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none,format=qcow2 -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2b:20:1a,bus=pci.0,addr=0x4 -boot dc -uuid 7dde6941-2bf6-40d6-9a14-27ab2d5252da -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -name win2k8-64 -spice port=5930,disable-ticketing -vga qxl -usb -device usb-tablet -k en-us -global qxl-vga.vram_size=33554432 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x7 -chardev socket,id=channel0,host=127.0.0.1,port=12345,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=channel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 2.Hot plug a virtio data disk. (qemu) __com.redhat_drive_add file=/home/disk.qcow2,id=virtio-2,format=qcow2,cache=none,werror=stop,rerror=stop (qemu) device_add virtio-blk-pci,id=virtio-2-2,bus=pci.0,drive=virtio-2 3.Hot unplug the data disk. (qemu) __com.redhat_drive_del virtio-2 (qemu) block I/O error in device '': Input/output error (5) handle_dev_input: stop Actual results: Got the block I/O error as in step 3. Expected results: Should no error and disk is removed safely. Additional info: If using "device_del virtio-2-2" to remove the data disk, no error happens.
Change this issue to virtio-win conponent since I can *not* reproduce this issue on RHEL5u7 guest. Additional info 1.in the windows guest ,click "safely remove disk XXX" will not hit this issue. 2.virtio-win driver :virtio-win-1.4.0-1.el6
tried with win2k3_32 bit guest ,also hit this issue .
Hi Mike, Could you please check if it works on Linux? Best, Vadim.
(In reply to comment #3) > Hi Mike, > Could you please check if it works on Linux? > > Best, > Vadim. According to comment #1 , Could not reprodcuce it with RHEL5u7 guest Best Regards, Mike
(In reply to comment #4) > (In reply to comment #3) > > Hi Mike, > > Could you please check if it works on Linux? > > > > Best, > > Vadim. > > According to comment #1 , > Could not reprodcuce it with RHEL5u7 guest > Hi Mike, Can you check the following scenario on Linux: - step 1; - step 2 (Hot plug a virtio data disk); - please mount the new volume; - step 3 (Hot unplug the data disk); - try read/write the new volume created after step 2. Thank you, Vadim. > Best Regards, > Mike
Moving it to RHEL-6.4.0 There is no easy way to monitor disk add/removal events.
(In reply to comment #5) > > > Hi Mike, > Can you check the following scenario on Linux: > - step 1; > - step 2 (Hot plug a virtio data disk); > - please mount the new volume; > - step 3 (Hot unplug the data disk); > - try read/write the new volume created after step 2. > Hi, Vadim I reproduce the issue with Linux guest after mount the new volume . Sorry for my mistake ,move this issue to qemu-kvm ? Best Regards, Mike
(In reply to comment #7) > (In reply to comment #5) > > > > > > Hi Mike, > > Can you check the following scenario on Linux: > > - step 1; > > - step 2 (Hot plug a virtio data disk); > > - please mount the new volume; > > - step 3 (Hot unplug the data disk); > > - try read/write the new volume created after step 2. > > > > Hi, Vadim > > I reproduce the issue with Linux guest after mount the new volume . > Sorry for my mistake ,move this issue to qemu-kvm ? Yes, please. Kind regards, Vadim. > > Best Regards, > Mike
according to comment #8 and comment #7 ,move component to qemu-kvm.
(In reply to comment #7) > (In reply to comment #5) > > > > > > Hi Mike, > > Can you check the following scenario on Linux: > > - step 1; > > - step 2 (Hot plug a virtio data disk); > > - please mount the new volume; > > - step 3 (Hot unplug the data disk); > > - try read/write the new volume created after step 2. > > > > Hi, Vadim > > I reproduce the issue with Linux guest after mount the new volume . > Sorry for my mistake ,move this issue to qemu-kvm ? > > Best Regards, > Mike Hi, Mike Could you show me steps to reproduce this problem in linux guest?
(In reply to comment #10) > (In reply to comment #7) > > (In reply to comment #5) > > > > > > > > > Hi Mike, > > > Can you check the following scenario on Linux: > > > - step 1; > > > - step 2 (Hot plug a virtio data disk); > > > - please mount the new volume; > > > - step 3 (Hot unplug the data disk); > > > - try read/write the new volume created after step 2. > > > > > > > Hi, Vadim > > > > I reproduce the issue with Linux guest after mount the new volume . > > Sorry for my mistake ,move this issue to qemu-kvm ? > > > > Best Regards, > > Mike > > > Hi, Mike > > Could you show me steps to reproduce this problem in linux guest? 1. Boot a Linux guest 2.Hot plug a virtio data disk. (qemu) __com.redhat_drive_add file=/home/disk.qcow2,id=virtio-2,format=qcow2,cache=none,werror=stop,rerror=stop (qemu) device_add virtio-blk-pci,id=virtio-2-2,bus=pci.0,drive=virtio-2 3.format this disk as a partition and mount it in /mnt #fidsk /dev/vdb #mkfs.ext3 /dev/vdb1 #mount /dev/vdb1 /mnt 3.Hot unplug the data disk driver. (qemu) __com.redhat_drive_del virtio-2 4.do io operation on /mnt #mkdir /mnt/tt Actual results: (qemu) block I/O error in device '': Input/output error (5) handle_dev_input: stop then type (qemu)cont ,guest still stopped and can not be continued any more Expected results: Should no error and disk is removed safely. Additional info: If using "device_del virtio-2-2" to remove the data disk, no error happens.
I have fixed the hot un-plug problem in upstream kernel and will backport to RHEL when it hit linus's tree without any changes to qemu-kvm. http://lists.linuxfoundation.org/pipermail/virtualization/2012-June/020173.html I thinks we need some change in windows driver as well. So, reassign this bug to Vadim Rozenfeld.
*** Bug 805461 has been marked as a duplicate of this bug. ***
>Asias He 2012-07-16 04:20:15 EDT >I have fixed the hot un-plug problem in upstream kernel and will backport to >RHEL when it hit linus's tree without any changes to qemu-kvm. >http://lists.linuxfoundation.org/pipermail/virtualization/2012-June/020173.html I thinks we need some change in windows driver as well. So, reassign this bug to Vadim Rozenfeld. Hi Vadim Is it fixed in windows virtio driver?
(In reply to danielgao from comment #18) > >Asias He 2012-07-16 04:20:15 EDT > >I have fixed the hot un-plug problem in upstream kernel and will backport to >RHEL when it hit linus's tree without any changes to qemu-kvm. > > >http://lists.linuxfoundation.org/pipermail/virtualization/2012-June/020173.html > > I thinks we need some change in windows driver as well. So, reassign this > bug to Vadim Rozenfeld. > > Hi Vadim > Is it fixed in windows virtio driver? Was it an NTFS formatted volume? If yes, can we check how it works with FAT? Thank you, Vadim.
NTFS and FAT were both tested and failed. Steps are shown below: 1.start a vm(win2k3 or win2k8) 2.(qemu)drive_add dummy file=/home/newvirtio.img,if=none,id=drive_virtio_disk0,format=raw,cache=none,io=native 3.(qemu)device_add virtio-blk-pci,id=virtio_disk0,bus=pci.0,drive=drive_virtio_disk0 4.format the disk with NTFS or FAT file system 5.do io operation on new disk. #copying large files to new disk 6.before finishing the copying (qemu) device_del virtio_disk0 (qemu) drive_del drive_virtio_disk0 7.in guest,we still can see the volume,but cannot do any operation.Also,failed to shutdown the vm gracefully. Version-Release number of selected component (if applicable): rhel6.4 kernel-2.6.32-358.el6.x86_64 win-virtio:win-virtio-0.1.65 Guest OS:win2k3 or win2k8
Deferring once again to 7.1. Not a mainstream scenario (unplug the media, not the device, although it is a non-removable media).
No good solution yet. Deferring again to 7.2.
NTFS and FAT were both tested and failed. Steps: 1.start a vm( win2k8-32) 2.(qemu)__com.redhat_drive_add file=test.raw,id=drive-virtio-disk0,format=raw,cache=none 3.(qemu) device_add virtio-blk-pci,id=virtio-disk0,drive=drive-virtio-disk0 4.format the disk with NTFS or FAT file system 5. del drive and device (qemu) drive_del drive_virtio_disk0 (qemu) device_del virtio_disk0 6.1) qemu didn't report any error. 2)The hotunplug blk device is still in device manager 3)in guest,we still can see the volume in "my computer",but cannot do any operation , if do some operatio, it shows"The reqquest could not be performed because of an I/O device error" 4) in Disk manager, the hotunplug disk is still exit, if rescan the disk, the hotunpluged disk change to Unknown disk and not Initialized(shows black) 7 Additional info if not use drive_del command,only "(qemu) device_del virtio_disk0", the system shows normally, the device and disk can not be found successfully. Version-Release number of selected component (if applicable): kernel-2.6.32-573.8.1.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.479.el6_7.2.x86_64 win-virtio:virtio-win-prewhql-111/virtio-win-1.4.0-1.el6/virtio-win-prewhql-65 Guest OS: win2k8
On rhel7.6 host, also can reproduced this issue on win2008-r2. Used version: kernel-3.10.0-916.el7.x86_64 qemu-img-rhev-2.12.0-5.el7.x86_64 seabios-1.10.2-3.el7_4.1.x86_64 virtio-win-prewhql-156 Best Regards~ peixiu