Bug 847594

Summary: [virtio-win][scsi]Cannot unplug scsi data disk from QMP on windows 7 32 guest
Product: Red Hat Enterprise Linux 7 Reporter: Min Deng <mdeng>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: areis, bcao, bsarathy, juzhang, lnovich, mdeng, michen, mkenneth, qzhang, rbalakri, rhod, virt-bugs, virt-maint, vrozenfe
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-09 10:44:44 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:
Attachments:
Description Flags
Error message none

Description Min Deng 2012-08-13 05:21:59 UTC
Created attachment 603848 [details]
Error message

Description of problem:
unplug a virtio scsi disk failed as there was an error message.

Version-Release number of selected component (if applicable):
virtio-win-prewhql-0.1-32
How reproducible:
Always,
Steps to Reproduce:
1.boot up guest with the following CLI
  /usr/libexec/qemu-kvm -m 2G -smp 4 -cpu SandyBridge,+x2apic,family=0xf -usb -device usb-tablet -device virtio-scsi-pci,id=scsi0 -drive file=win7-32-scsi.qcow2,format=qcow2,if=none,id=drive-virtio0,cache=writeback,werror=stop,rerror=stop,serial=systemdisk -device scsi-hd,bus=scsi0.0,drive=drive-virtio0,id=virtio-blk-pci0,bootindex=1 -netdev tap,sndbuf=0,id=hostnet0,script=/etc/qemu-ifup,downscript=no -device e1000,netdev=hostnet0,mac=00:12:27:44:27:18 -uuid 57d734cb-bdf2-44d7-b750-9dff30e9d46b -no-kvm-pit-reinjection -chardev socket,id=111a,path=/tmp/monitor-win732-scsi,server,nowait -mon chardev=111a,mode=readline -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=seabios_debug,path=/tmp/monitor-seabios,server,nowait -device isa-debugcon,iobase=0x402,chardev=seabios_debug -device virtio-scsi-pci,id=scsi1 -drive file=disk1.qcow2,if=none,format=qcow2,cache=writeback,id=drive-virtio-data1,werror=stop,rerror=stop,serial=disk1data -device scsi-hd,bus=scsi1.0,id=virtio-data1,drive=drive-virtio-data1 -device virtio-scsi-pci,id=scsi2 -drive file=disk2.qcow2,if=none,cache=writeback,format=qcow2,id=drive-virtio-data2,werror=stop,rerror=stop -device scsi-hd,bus=scsi2.0,id=virtio-data2,drive=drive-virtio-data2 -device virtio-scsi-pci,id=scsi3 -drive file=disk3.qcow2,cache=writethrough,if=none,format=qcow2,id=drive-virtio-data3,werror=stop,rerror=stop -device scsi-hd,bus=scsi3.0,id=virtio-data3,drive=drive-virtio-data3 -device virtio-scsi-pci,id=scsi4 -drive file=disk4.qcow2,if=none,format=qcow2,cache=writeback,id=drive-virtio-data4,werror=stop,rerror=stop,readonly=on -device scsi-hd,bus=scsi4.0,id=virtio-data4,drive=drive-virtio-data4 -bios /usr/share/seabios/bios-pm.bin -spice port=5931,disable-ticketing -vga qxl -monitor stdio -qmp tcp:0:4444,server,nowait -device virtio-scsi-pci,id=scsiadd -drive file='/home/disk.qcow2',if=none,id=drive-scsi0-0-add,if=none,media=disk,cache=none,format=qcow2,werror=stop,aio=native -device scsi-hd,bus=scsiadd.0,drive=drive-scsi0-0-add,id=scsiaddd

2.telnet ip port 
  in QMP
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"device_del","arguments":{"id":"scsiaddd"}}
{"return": {}}
{"execute":"device_del","arguments":{"id":"scsiadd"}}
{"return": {}}

3.Go back to guest and check the disk status,it should be removed successfully.
  
Actual results:
The disk cannot be removed from the guest and please refer to the screenshot for the error

Expected results:
It can be removed successfully without any errors 

Additional info:
Please use such a disk to reproduce the issue,which was ever formatted by the guest. And shutdown -> boot up again ...

Comment 8 Ronen Hod 2013-07-29 09:12:48 UTC
QE,
If it works from QEMU command line, then it is probably a QMP bug.

Comment 9 Vadim Rozenfeld 2014-01-03 21:51:56 UTC
(In reply to Ronen Hod from comment #8)
> QE,
> If it works from QEMU command line, then it is probably a QMP bug.

I didn't have any problem deleting virtio-scsi device from the QEMU command line.

Comment 10 juzhang 2014-01-06 02:19:07 UTC
Hi Mdeng,

Could you have a look comment9 and comment8 and add comment?

Best Regards,
Junyi

Comment 11 Mike Cao 2014-01-06 03:27:58 UTC
(In reply to Vadim Rozenfeld from comment #9)
> (In reply to Ronen Hod from comment #8)
> > QE,
> > If it works from QEMU command line, then it is probably a QMP bug.
> 
> I didn't have any problem deleting virtio-scsi device from the QEMU command
> line.

Did you try to unplug it when the disk is in use ?

Comment 12 Min Deng 2014-01-06 05:49:09 UTC
   QE tested the bug with the following CLI and build 74,still hit similar issue (both from qemu monitor and QMP).make sure the disk wasn't used while removing.
 /usr/libexec/qemu-kvm -m 2G -smp 4 -cpu SandyBridge,+x2apic,family=0xf -usb -device usb-tablet -device virtio-scsi-pci,id=scsi0 -drive file=win7-32.raw,format=raw,if=none,id=drive-virtio0,cache=writeback,werror=stop,rerror=stop,serial=systemdisk -device scsi-hd,bus=scsi0.0,drive=drive-virtio0,id=virtio-blk-pci0,bootindex=1 -netdev tap,sndbuf=0,id=hostnet0,script=/etc/qemu-ifup,downscript=no -device e1000,netdev=hostnet0,mac=00:12:27:44:27:18 -uuid 57d734cb-bdf2-44d7-b750-9dff30e9d46b -no-kvm-pit-reinjection -chardev socket,id=111a,path=/tmp/monitor-win732-scsi,server,nowait -mon chardev=111a,mode=readline -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=seabios_debug,path=/tmp/monitor-seabios,server,nowait -device isa-debugcon,iobase=0x402,chardev=seabios_debug -device virtio-scsi-pci,id=scsi1 -drive file=disk1.raw,if=none,format=raw,cache=writeback,id=drive-virtio-data1,werror=stop,rerror=stop,serial=disk1data -device scsi-hd,bus=scsi1.0,id=virtio-data1,drive=drive-virtio-data1 -device virtio-scsi-pci,id=scsi2 -drive file=disk2.raw,if=none,cache=writeback,format=raw,id=drive-virtio-data2,werror=stop,rerror=stop -device scsi-hd,bus=scsi2.0,id=virtio-data2,drive=drive-virtio-data2 -device virtio-scsi-pci,id=scsi3 -drive file=disk3.raw,cache=writethrough,if=none,format=raw,id=drive-virtio-data3,werror=stop,rerror=stop -device scsi-hd,bus=scsi3.0,id=virtio-data3,drive=drive-virtio-data3 -device virtio-scsi-pci,id=scsi4 -drive file=disk4.raw,if=none,format=raw,cache=writeback,id=drive-virtio-data4,werror=stop,rerror=stop,readonly=on -device scsi-hd,bus=scsi4.0,id=virtio-data4,drive=drive-virtio-data4 -vnc :1 -vga cirrus -monitor stdio -qmp tcp:0:4444,server,nowait -device virtio-scsi-pci,id=scsiadd -drive file=/home/disk.raw,if=none,id=drive-scsi0-0-add,if=none,media=disk,cache=none,format=raw,werror=stop,aio=native -device scsi-hd,bus=scsiadd.0,drive=drive-scsi0-0-add,id=scsiaddd

Comment 14 Vadim Rozenfeld 2014-11-03 09:31:43 UTC
Can we update drivers to build 88 and switch the relevant disk off-line before
trying to unplug virtio-scsi-pci controller?

Thanks,
Vadim,

Comment 15 Min Deng 2014-11-07 09:01:14 UTC
(In reply to Vadim Rozenfeld from comment #14)
> Can we update drivers to build 88 and switch the relevant disk off-line
> before
> trying to unplug virtio-scsi-pci controller?
> 
> Thanks,
> Vadim,

   Re-tested the bug with build 93,for detail steps please refer to original steps.
   Actual results,
   There was a message that told "Safe to remove device" no any other improper message while doing unplugging and disk could be removed successfully.
   Expected results,
   The disk could be removed successfully.

   Actions were successfully via QMP and HMP,it should be fixed in build 93(the latest build).

Comment 16 Mike Cao 2014-11-07 09:07:15 UTC
(In reply to dengmin from comment #15)
> (In reply to Vadim Rozenfeld from comment #14)
> > Can we update drivers to build 88 and switch the relevant disk off-line
> > before
> > trying to unplug virtio-scsi-pci controller?
> > 
> > Thanks,
> > Vadim,
> 
>    Re-tested the bug with build 93,for detail steps please refer to original
> steps.
>    Actual results,
>    There was a message that told "Safe to remove device" no any other
> improper message while doing unplugging and disk could be removed
> successfully.
>    Expected results,
>    The disk could be removed successfully.
> 
>    Actions were successfully via QMP and HMP,it should be fixed in build
> 93(the latest build).

Since lijin find a regression bug on build 93 ,can you retest w/ virito-win-prewhql-88 ?

Comment 17 Vadim Rozenfeld 2014-11-07 10:23:47 UTC
Yes, it will be helpful to know how it works in build 88

Best regards,
Vadim.

Comment 18 Min Deng 2014-11-07 12:11:25 UTC
Wit(In reply to Vadim Rozenfeld from comment #17)
> Yes, it will be helpful to know how it works in build 88
> 
> Best regards,
> Vadim.

 Re-tested build 88 still get same results to comments 15,any concerns let me know.

Thanks
Min

Comment 19 Vadim Rozenfeld 2014-11-07 12:51:32 UTC
Hi Min,
Thank you for your quick response.
Vadim.