Bug 1002384 - fail to hot-unplug virtio block disk in use inside win8-64 guest
Summary: fail to hot-unplug virtio block disk in use inside win8-64 guest
Keywords:
Status: CLOSED DUPLICATE of bug 1215953
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: aihua liang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-29 05:16 UTC by Jun Li
Modified: 2018-07-18 07:26 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-18 07:26:22 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jun Li 2013-08-29 05:16:31 UTC
Description of problem:
fail to unhotplug virtio block disk while the device is using inside win8-64 guest. Or qemu monitor or QMP give friendly messages while failed(e.g device is busying).

Current, qemu monitor and QMP don't any output message when hot-unplug fail.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.2-4.el7.x86_64
kernel 3.10.0-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot win8-64 guest with a virtio-blk data device.
# /usr/libexec/qemu-kvm  -S -M pc-i440fx-rhel7.0.0 \
-cpu SandyBridge -enable-kvm \
-m 4G -smp 4,sockets=2,cores=2,threads=1 \
-name juli -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 \
-rtc base=localtime,clock=host,driftfix=slew \
-drive file=/mnt/win8-64.raw,if=none,cache=none,aio=native,format=raw,id=drive0  \
-device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive0,scsi=off,config-wce=off,bootindex=0  \
-drive file=/mnt/sdb-1.raw,if=none,id=drive-virtio0-0-1,media=disk,cache=none,format=raw \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio0-0-1,id=test30-d,scsi=off,config-wce=off \
-device virtio-balloon-pci,id=ballooning,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 \
-netdev tap,id=hostnet0,vhost=off,queues=4,script=/etc/qemu-ifup \
-device virtio-net-pci,mq=on,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=24:be:05:14:0d:52,addr=0x7,bootindex=2 \
-k en-us -boot menu=on,reboot-timeout=-1,strict=on \
-qmp tcp:0:4445,server,nowait -serial unix:/tmp/ttyS0,server,nowait \
-vnc :3 -spice port=5932,disable-ticketing \
-vga cirrus -monitor stdio \
-monitor tcp:0:7445,server,nowait \
-drive file=/mnt/virtio-win-prewhql-0.1-68/virtio-win-prewhql-0.1.iso,if=none,media=cdrom,format=raw,aio=native,id=drive-ide1-0-2 \
-device ide-drive,drive=drive-ide1-0-2,id=ide1-0-2,bus=ide.1,unit=1 

2.Do hot-unplug inside monitor and QMP.
(qemu) device_del test30-d
{"execute":"device_del","arguments":{"id":"test30-d"}}

3.Check the result.
(qemu) info qtree

Actual results:
(qemu) device_del test30-d

{"execute":"device_del","arguments":{"id":"test30-d"}}
{"return": {}}

(qemu) info qtree
... ...
 dev: virtio-blk-pci, id "test30-d"
        class = 0x0
        ioeventfd = on
        vectors = 2
        x-data-plane = off
        indirect_desc = on
        event_idx = on
        drive = drive-virtio0-0-1
        logical_block_size = 512
        physical_block_size = 512
        min_io_size = 0
        opt_io_size = 0
        bootindex = -1
... ...


Expected results:
If the device can not hot-unplug successfully, monitor or QMP will give friendly messages.
Hot-unplug can success while the device is using.

Additional info:
Hot-unplug can success while the device is not doing I/O service.

I alse Rhel7.0 guest:
With Rhel7.0 guest hot-unplug can success while the device is using.

Comment 2 Sibiao Luo 2013-08-29 06:04:03 UTC
(In reply to Jun Li from comment #0)
> I alse Rhel7.0 guest:
> With Rhel7.0 guest hot-unplug can success while the device is using.
Maybe the virtio-win issue, please also provide the virtio-win version.

Comment 3 Jun Li 2013-08-29 06:46:59 UTC
(In reply to Sibiao Luo from comment #2)
> (In reply to Jun Li from comment #0)
> > I alse Rhel7.0 guest:
> > With Rhel7.0 guest hot-unplug can success while the device is using.
> Maybe the virtio-win issue, please also provide the virtio-win version.

The version of virtio-win:
virtio-win-prewhql-0.1-68

Comment 5 Paolo Bonzini 2014-08-07 13:49:35 UTC
This is not possible due to the way hot-unplug work.

device_del is an asynchronous command that tells the guest "please eject this device when you're ready".  The guest is free to never eject the device, which is what is happening here.

Comment 6 Mike Cao 2014-08-07 14:46:45 UTC
(In reply to Paolo Bonzini from comment #5)
> This is not possible due to the way hot-unplug work.
> 
> device_del is an asynchronous command that tells the guest "please eject
> this device when you're ready".  The guest is free to never eject the
> device, which is what is happening here.

Can we consider it is a virtio-block windows driver bug ?

Thanks,
Mike

Comment 7 Paolo Bonzini 2014-08-07 15:06:47 UTC
No, the hot-unplug is done at the PCI level and the virtio-win drivers probably never see it.  I guess it's Windows policy to not eject the device if there's something mounted on it.

Comment 14 juzhang 2017-06-08 11:10:31 UTC
Hi Cong,

Free to update the QE contact.

Comment 15 CongLi 2018-07-18 06:52:58 UTC
Hi Peixiu,

Have you met this issue in the recent testing?

Thanks.

Comment 16 Peixiu Hou 2018-07-18 07:02:58 UTC
(In reply to CongLi from comment #15)
> Hi Peixiu,
> 
> Have you met this issue in the recent testing?
> 
Hi coli, we don't start the virtio-win block function test now, If I hit it later, will update on this bug~

Best Regards~
Peixiu

Comment 17 lijin 2018-07-18 07:07:30 UTC
For windows, we should not unplug virtio device during it's in use.

Details please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1215953#c2

Comment 18 CongLi 2018-07-18 07:26:22 UTC
(In reply to lijin from comment #17)
> For windows, we should not unplug virtio device during it's in use.
> 
> Details please refer to
> https://bugzilla.redhat.com/show_bug.cgi?id=1215953#c2

Thanks lijin.

Close this bug.

*** This bug has been marked as a duplicate of bug 1215953 ***


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