Bug 1722710 - Hits BSOD in windows guest after unplug/hotplug a disk
Summary: Hits BSOD in windows guest after unplug/hotplug a disk
Keywords:
Status: CLOSED DUPLICATE of bug 1708490
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.1
Assignee: Vadim Rozenfeld
QA Contact: qing.wang
URL:
Whiteboard:
Depends On: 1656276 1673396 1673397
Blocks: 1718992 1744438 1758964
TreeView+ depends on / blocked
 
Reported: 2019-06-21 05:19 UTC by Xueqiang Wei
Modified: 2020-05-21 08:31 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1673396
Environment:
Last Closed: 2020-05-21 08:31:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Xueqiang Wei 2019-06-21 05:25:41 UTC
It has been fixed on qemu-kvm-2.12.0-76.module+el8.1.0+3351+d11c20fa and qemu-kvm-3.1.0-13.module+el8+2783+15cec5ae, but hit it on qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee.



Tested with qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee, hit this issue.

Versions:
kernel-4.18.0-85.el8.x86_64
qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee


1. boot guest with two disks.

   /usr/libexec/qemu-kvm \
        -S \
        -M q35 \
        -smp 12,maxcpus=12,cores=6,threads=1,sockets=2  \
        -cpu 'Opteron_G5',+kvm_pv_unhalt \
        -enable-kvm \
        -m 4G \
        -smp 4 \
        -rtc base=utc,clock=host,driftfix=slew \
        -object iothread,id=iothread0 \
        -device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
        -device virtio-scsi-pci,id=scsi0,iothread=iothread0,bus=pcie.0-root-port-2,addr=0x0 \
        -blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,node-name=win_disk \
        -blockdev driver=qcow2,node-name=drive_win,file=win_disk \
        -device scsi-hd,drive=drive_win,id=win1,write-cache=on \
        -blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/data.qcow2,node-name=data_disk1 \
        -blockdev driver=qcow2,node-name=drive_stg1,file=data_disk1 \
        -device scsi-hd,drive=drive_stg1,id=data1,write-cache=on \
        -device pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 \
        -device virtio-net-pci,mac=6c:ae:8b:20:80:59,id=netdev1,vectors=4,netdev=net1,bus=pcie.0-root-port-3,addr=0x0 \
        -netdev tap,id=net1,vhost=on \
        -qmp tcp:0:4446,server,nowait \
        -vga qxl \
        -vnc :0 \
        -monitor stdio \
        -boot menu=on \

2. Unplug the data disk:

# telnet localhost 4446
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 12, "major": 2}, "package": "qemu-kvm-2.12.0-76.module+el8.1.0+3351+d11c20fa"}, "capabilities": []}}


{"execute":"qmp_capabilities"}
{"return": {}}


{"execute":"device_del","arguments":{"id":"data1"}}

{"timestamp": {"seconds": 1560411316, "microseconds": 320066}, "event": "DEVICE_DELETED", "data": {"device": "data1", "path": "/machine/peripheral/data1"}}
{"return": {}}


3. Hotplug the deleted disk:

{ 'execute':'device_add','arguments':{'driver':'scsi-hd','drive':'drive_stg1','id':'data1'}}
{"return": {}}


4.  I/O test on data disk.



5. reboot and shutdown guest.


after step 3, qemu core dumped.

Comment 2 Xueqiang Wei 2019-06-21 06:33:47 UTC
(In reply to Xueqiang Wei from comment #1)
> It has been fixed on qemu-kvm-2.12.0-76.module+el8.1.0+3351+d11c20fa and
> qemu-kvm-3.1.0-13.module+el8+2783+15cec5ae, but hit it on
> qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee.
> 
> 
> 
> Tested with qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee, hit this issue.
> 
> Versions:
> kernel-4.18.0-85.el8.x86_64
> qemu-kvm-4.0.0-4.module+el8.1.0+3356+cda7f1ee
> 
> 
> 1. boot guest with two disks.
> 
>    /usr/libexec/qemu-kvm \
>         -S \
>         -M q35 \
>         -smp 12,maxcpus=12,cores=6,threads=1,sockets=2  \
>         -cpu 'Opteron_G5',+kvm_pv_unhalt \
>         -enable-kvm \
>         -m 4G \
>         -smp 4 \
>         -rtc base=utc,clock=host,driftfix=slew \
>         -object iothread,id=iothread0 \
>         -device
> pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
>         -device
> virtio-scsi-pci,id=scsi0,iothread=iothread0,bus=pcie.0-root-port-2,addr=0x0 \
>         -blockdev
> driver=file,cache.direct=on,cache.no-flush=off,filename=/home/
> kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,node-name=win_disk \
>         -blockdev driver=qcow2,node-name=drive_win,file=win_disk \
>         -device scsi-hd,drive=drive_win,id=win1,write-cache=on \
>         -blockdev
> driver=file,cache.direct=on,cache.no-flush=off,filename=/home/
> kvm_autotest_root/images/data.qcow2,node-name=data_disk1 \
>         -blockdev driver=qcow2,node-name=drive_stg1,file=data_disk1 \
>         -device scsi-hd,drive=drive_stg1,id=data1,write-cache=on \
>         -device
> pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 \
>         -device
> virtio-net-pci,mac=6c:ae:8b:20:80:59,id=netdev1,vectors=4,netdev=net1,
> bus=pcie.0-root-port-3,addr=0x0 \
>         -netdev tap,id=net1,vhost=on \
>         -qmp tcp:0:4446,server,nowait \
>         -vga qxl \
>         -vnc :0 \
>         -monitor stdio \
>         -boot menu=on \
> 
> 2. Unplug the data disk:
> 
> # telnet localhost 4446
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> {"QMP": {"version": {"qemu": {"micro": 0, "minor": 12, "major": 2},
> "package": "qemu-kvm-2.12.0-76.module+el8.1.0+3351+d11c20fa"},
> "capabilities": []}}
> 
> 
> {"execute":"qmp_capabilities"}
> {"return": {}}
> 
> 
> {"execute":"device_del","arguments":{"id":"data1"}}
> 
> {"timestamp": {"seconds": 1560411316, "microseconds": 320066}, "event":
> "DEVICE_DELETED", "data": {"device": "data1", "path":
> "/machine/peripheral/data1"}}
> {"return": {}}
> 
> 
> 3. Hotplug the deleted disk:
> 
> {
> 'execute':'device_add','arguments':{'driver':'scsi-hd','drive':'drive_stg1',
> 'id':'data1'}}
> {"return": {}}
> 
> 
> 4.  I/O test on data disk.
> 
> 
> 
> 5. reboot and shutdown guest.
> 
> 
> after step 3, qemu core dumped.


Sorry, my mistake.  I retested with above steps,

for linux guest: not hit this issue.
for windows guest: not core dumped, hit BSOD.

if the data disk is not initialized and not created new volume, hit BSOD after step 2.

if the data disk is initialized and created new volume, hit BSOD after step 3. (similar with Bug 1708490 - Hotplug a SCSI disk via blockdev hits bsod in windows guest)

So I modify the Summary to "Hits BSOD in windows guest after unplug/hotplug a disk"

Comment 3 Xueqiang Wei 2019-06-21 06:52:54 UTC
Memory dump file:

http://fileshare.englab.nay.redhat.com/pub/section2/images_backup/bug1722710/

Comment 4 Xueqiang Wei 2019-06-21 08:04:17 UTC
Hi Vadim,


Please help check Comment 2 and Comment 3, if they are some issue for Bug 1722710 and Bug 1708490.  Many thanks.

Comment 5 Vadim Rozenfeld 2019-06-24 02:58:47 UTC
(In reply to Xueqiang Wei from comment #4)
> Hi Vadim,
> 
> 
> Please help check Comment 2 and Comment 3, if they are some issue for Bug
> 1722710 and Bug 1708490.  Many thanks.

Those two crash dumps in comments 2 and 3 are not exactly the same but extremely close, 
So I would treat them as the problem. And they are almost the same as 1708490.

Thanks,
Vadim.

Comment 10 qing.wang 2019-12-17 09:59:23 UTC
hit same issue on guest win2019 qemu-kvm-core-4.2.0-4.module+el8.2.0+5220+e82621dc.x86_64

Test step:
1. qemu-img create -f qcow2 /home/kvm_autotest_root/images/storage0.qcow2 2G
2. boot vm

/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -machine pc  \
    -nodefaults \
    -device VGA,bus=pci.0,addr=0x2 \
    -m 16000  \
    -smp 12,maxcpus=12,cores=6,threads=1,dies=1,sockets=2  \
    -device pvpanic,ioport=0x505,id=idWW4fRE \
    -device qemu-xhci,id=usb1,bus=pci.0,addr=0x3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 \
    -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/kvm_autotest_root/images/win2019-3-64-virtio-scsi.raw,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=raw,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on \
    -device virtio-net-pci,mac=9a:7f:65:c9:ec:b8,id=idCBhCiy,netdev=id1uqNcV,bus=pci.0,addr=0x5  \
    -netdev tap,id=id1uqNcV,vhost=on \
    -device virtio-scsi-pci,id=virtio_scsi_pci1,bus=pci.0,addr=0x6 \
    -blockdev node-name=file_cd1,driver=file,read-only=on,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
    -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :10  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm -monitor stdio \
-qmp tcp:0:5956,server,nowait \

3 {'execute': 'qmp_capabilities'}

{"execute": "blockdev-add", "arguments": {"node-name": "file_stg0", "driver": "file", "aio": "threads", "filename": "/home/kvm_autotest_root/images/storage0.qcow2", "cache": {"direct": true, "no-flush": false}}}

{"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "qcow2", "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}}

{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg0", "drive": "drive_stg0", "write-cache": "on",  "bus": "pci.0", "addr": "0x8"}}

4 after step 4 ,guest hit BSOD


not found issue under drive+scsi-hd ,blockdev +virtio-blk-pci

-drive id=drive_image1,if=none,format=raw,file=/home/kvm_autotest_root/images/win2019-3-64-virtio-scsi.raw \
    -device scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on \



-device pcie-root-port,id=pcie.0-root-port-7,slot=7,addr=0x7,bus=pci.0 \
    -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/kvm_autotest_root/images/win2019-3-64-virtio-scsi.raw,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=raw,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,write-cache=on,bus=pcie.0-root-port-7 \

Comment 11 Vadim Rozenfeld 2019-12-17 10:29:42 UTC
(In reply to qing.wang from comment #10)
> hit same issue on guest win2019
> qemu-kvm-core-4.2.0-4.module+el8.2.0+5220+e82621dc.x86_64
> 
> 
> 4 after step 4 ,guest hit BSOD

Can you please upload the crash dump file?

Thanks,
Vadim.

Comment 14 Ademar Reis 2020-02-05 22:59:26 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 15 John Ferlan 2020-02-06 20:51:38 UTC
NB: Setting back to vrozenfe as it looks like Amnon only meant to change the subcomponent, but didn't notice that doing that causes defaults to reset.

Comment 26 qing.wang 2020-05-12 08:10:12 UTC
Test on
qemu-kvm-core-4.2.0-20.module+el8.2.1+6467+49dc3278.x86_64
Guest:win2019

Test steps:
1.create images
qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg1.qcow2 1G
  qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg2.qcow2 2G
  qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg3.qcow2 3G
  qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg4.qcow2 4G


2.boot vm
/usr/libexec/qemu-kvm \
  -name 'avocado-vt-vm1' \
  -sandbox on \
  -machine q35 \
  -nodefaults \
  -device VGA,bus=pcie.0,addr=0x2 \
  -m 8096 \
  -smp 12,maxcpus=12,cores=6,threads=1,dies=1,sockets=2 \
  -device pvpanic,ioport=0x505,id=idWW4fRE \
  -device qemu-xhci,id=usb1,bus=pcie.0,addr=0x3 \
  \
  -device pcie-root-port,id=pcie_port_7,slot=7,chassis=7,addr=0x7,bus=pcie.0 \
  -device pcie-root-port,id=pcie_port_8,slot=8,chassis=8,addr=0x8,bus=pcie.0 \
  -object iothread,id=iothread0 \
  -device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x4,iothread=iothread0 \
  -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
  -blockdev node-name=drive_image1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=file_image1 \
  -device scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on,serial=osdisk0 \
  \
  -blockdev node-name=data_image1,driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/stg1.qcow2,aio=threads \
  -blockdev node-name=data1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=data_image1 \
  -device scsi-hd,id=disk1,drive=data1,write-cache=on,bus=scsi0.0  \
  \
  -blockdev node-name=data_image2,driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/stg2.qcow2,aio=threads \
  -blockdev node-name=data2,driver=qcow2,cache.direct=on,cache.no-flush=off,file=data_image2 \
  -device virtio-blk-pci,id=disk2,drive=data2,write-cache=on,bus=pcie_port_7  \
  \
  -device virtio-net-pci,mac=9a:7f:65:c9:ec:b8,id=idCBhCiy,netdev=id1uqNcV,bus=pcie.0,addr=0x5 \
  -netdev tap,id=id1uqNcV,vhost=on \
  -device virtio-scsi-pci,id=scsi1,bus=pcie.0,addr=0x6 \
  -blockdev node-name=file_cd1,driver=file,read-only=on,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
  -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
  -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on,bus=scsi1.0 \
  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
  -vnc :6 \
  -rtc base=localtime,clock=host,driftfix=slew \
  -boot menu=off,order=cdn,once=c,strict=off \
  -enable-kvm -monitor stdio \
  -qmp tcp:0:5956,server,nowait \



3.hotplug disks with serial
{'execute':'qmp_capabilities'}

{"execute":"blockdev-add","arguments":{"node-name":"data3","driver":"qcow2","file":{"driver":"file","filename":"/home/kvm_autotest_root/images/stg3.qcow2"}}}
{"execute":"blockdev-add","arguments":{"node-name":"data4","driver":"qcow2","file":{"driver":"file","filename":"/home/kvm_autotest_root/images/stg4.qcow2"}}}

{'execute':'device_add','arguments':{'driver':'scsi-hd','id':'disk3','drive':'data3','bus':'scsi0.0',"serial":"data3"}}
{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "disk4", "drive": "data4", "bus": "pcie_port_8","serial":"data4"}}

wmic diskdrive get index it liss 5 disks


5.hotunplug disks

{"execute":"device_del","arguments":{"id":"disk3"}}
{"execute":"device_del","arguments":{"id":"disk4"}}

wmic diskdrive get index it liss 3 disks

6.hotplug without serial

{'execute':'device_add','arguments':{'driver':'scsi-hd','id':'disk3','drive':'data3','bus':'scsi0.0'}}
{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "disk4", "drive": "data4", "bus": "pcie_port_8"}}

wmic diskdrive get index it liss 4 disks, 
It looks like the disk without serial can not be added. (disk1 already exist.)
and the diskmanager windows can not list disks steadily. 
But i did not hit BSOD issue.


So the question is it must specify the serias for the scsi disk? 
If it is not specified . it can be fixed using id as serail patentially. or it need to document it?

Comment 27 Vadim Rozenfeld 2020-05-12 08:46:23 UTC
(In reply to qing.wang from comment #26)
> Test on
> qemu-kvm-core-4.2.0-20.module+el8.2.1+6467+49dc3278.x86_64
> Guest:win2019
> 
> Test steps:
> 1.create images
> qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg1.qcow2 1G
>   qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg2.qcow2 2G
>   qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg3.qcow2 3G
>   qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg4.qcow2 4G
> 
> 
> 2.boot vm
> /usr/libexec/qemu-kvm \
>   -name 'avocado-vt-vm1' \
>   -sandbox on \
>   -machine q35 \
>   -nodefaults \
>   -device VGA,bus=pcie.0,addr=0x2 \
>   -m 8096 \
>   -smp 12,maxcpus=12,cores=6,threads=1,dies=1,sockets=2 \
>   -device pvpanic,ioport=0x505,id=idWW4fRE \
>   -device qemu-xhci,id=usb1,bus=pcie.0,addr=0x3 \
>   \
>   -device pcie-root-port,id=pcie_port_7,slot=7,chassis=7,addr=0x7,bus=pcie.0
> \
>   -device pcie-root-port,id=pcie_port_8,slot=8,chassis=8,addr=0x8,bus=pcie.0
> \
>   -object iothread,id=iothread0 \
>   -device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x4,iothread=iothread0 \
>   -blockdev
> node-name=file_image1,driver=file,aio=threads,filename=/home/
> kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,cache.direct=on,cache.
> no-flush=off \
>   -blockdev
> node-name=drive_image1,driver=qcow2,cache.direct=on,cache.no-flush=off,
> file=file_image1 \
>   -device
> scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on,
> serial=osdisk0 \
>   \
>   -blockdev
> node-name=data_image1,driver=file,cache.direct=on,cache.no-flush=off,
> filename=/home/kvm_autotest_root/images/stg1.qcow2,aio=threads \
>   -blockdev
> node-name=data1,driver=qcow2,cache.direct=on,cache.no-flush=off,
> file=data_image1 \
>   -device scsi-hd,id=disk1,drive=data1,write-cache=on,bus=scsi0.0  \
>   \
>   -blockdev
> node-name=data_image2,driver=file,cache.direct=on,cache.no-flush=off,
> filename=/home/kvm_autotest_root/images/stg2.qcow2,aio=threads \
>   -blockdev
> node-name=data2,driver=qcow2,cache.direct=on,cache.no-flush=off,
> file=data_image2 \
>   -device virtio-blk-pci,id=disk2,drive=data2,write-cache=on,bus=pcie_port_7
> \
>   \
>   -device
> virtio-net-pci,mac=9a:7f:65:c9:ec:b8,id=idCBhCiy,netdev=id1uqNcV,bus=pcie.0,
> addr=0x5 \
>   -netdev tap,id=id1uqNcV,vhost=on \
>   -device virtio-scsi-pci,id=scsi1,bus=pcie.0,addr=0x6 \
>   -blockdev
> node-name=file_cd1,driver=file,read-only=on,aio=threads,filename=/home/
> kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-
> flush=off \
>   -blockdev
> node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-
> flush=off,file=file_cd1 \
>   -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on,bus=scsi1.0 \
>   -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
>   -vnc :6 \
>   -rtc base=localtime,clock=host,driftfix=slew \
>   -boot menu=off,order=cdn,once=c,strict=off \
>   -enable-kvm -monitor stdio \
>   -qmp tcp:0:5956,server,nowait \
> 
> 
> 
> 3.hotplug disks with serial
> {'execute':'qmp_capabilities'}
> 
> {"execute":"blockdev-add","arguments":{"node-name":"data3","driver":"qcow2",
> "file":{"driver":"file","filename":"/home/kvm_autotest_root/images/stg3.
> qcow2"}}}
> {"execute":"blockdev-add","arguments":{"node-name":"data4","driver":"qcow2",
> "file":{"driver":"file","filename":"/home/kvm_autotest_root/images/stg4.
> qcow2"}}}
> 
> {'execute':'device_add','arguments':{'driver':'scsi-hd','id':'disk3','drive':
> 'data3','bus':'scsi0.0',"serial":"data3"}}
> {"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id":
> "disk4", "drive": "data4", "bus": "pcie_port_8","serial":"data4"}}
> 
> wmic diskdrive get index it liss 5 disks
> 
> 
> 5.hotunplug disks
> 
> {"execute":"device_del","arguments":{"id":"disk3"}}
> {"execute":"device_del","arguments":{"id":"disk4"}}
> 
> wmic diskdrive get index it liss 3 disks
> 
> 6.hotplug without serial
> 
> {'execute':'device_add','arguments':{'driver':'scsi-hd','id':'disk3','drive':
> 'data3','bus':'scsi0.0'}}
> {"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id":
> "disk4", "drive": "data4", "bus": "pcie_port_8"}}
> 
> wmic diskdrive get index it liss 4 disks, 
> It looks like the disk without serial can not be added. (disk1 already
> exist.)
> and the diskmanager windows can not list disks steadily. 
> But i did not hit BSOD issue.
> 
> 
> So the question is it must specify the serias for the scsi disk? 

The problem is that Windows 10 rely on information revealed by reporting
VPD 0x83 proper information. serial helps to solve this problem. From the
other side I tried to create some sort of workaround when even without 
serial we still will be reporting a valid unique identification.  

https://github.com/virtio-win/kvm-guest-drivers-windows/commit/b57548c769ed9f431c34f6449ce432dd077cb02e

> If it is not specified . it can be fixed using id as serail patentially. or
> it need to document it?

Comment 28 Vadim Rozenfeld 2020-05-14 10:18:47 UTC
There are two different issues mixed in one bug.
The initial description and up to comment#9 describe a qemu related q35
PCIe PnP problem. This issue is still under investigation/development
and postponed to 8.3
From #10 and down is another problem, related to feature/bug in vioscsi
driver, when device fails to report x83 VPD page is seral number was not
explicitly specified. That problem was resolved in 8.2.1 (build 184)

Can QE try to split the current bug into two different issue and move the
first part (qemu) to 8.3 while verifying and closing the second part 
(virtio-win) in 8.2.1

Best,
Vadim.

Comment 29 qing.wang 2020-05-15 10:40:15 UTC
In my understanding, they are same issue with https://bugzilla.redhat.com/show_bug.cgi?id=1708490.
And this issue fixed by virtio-win-prewhql-0.1-184. I do not know what is your mentioned part 1.

What is the special on test steps?

Do you mean 8.3 will not use virtio-win-prewhql-0.1-184, if using it ,you mentioned part 1  issue should not exist in 8.3. right?

My test steps:

4.18.0-193.2.1.el8_2.x86_64
qemu-kvm-core-4.2.0-21.module+el8.2.1+6586+8b7713b9.x86_64
virtio-win-prewhql-0.1-184

1.boot vm
/usr/libexec/qemu-kvm \
  -name 'avocado-vt-vm1' \
  -sandbox on \
  -machine q35 \
  -nodefaults \
  -device VGA,bus=pcie.0,addr=0x2 \
  -m 8096 \
  -smp 12,maxcpus=12,cores=6,threads=1,dies=1,sockets=2 \
  -device pvpanic,ioport=0x505,id=idWW4fRE \
  -device qemu-xhci,id=usb1,bus=pcie.0,addr=0x3 \
  \
  -device pcie-root-port,id=pcie_port_7,slot=7,chassis=7,addr=0x7,bus=pcie.0 \
  -device pcie-root-port,id=pcie_port_8,slot=8,chassis=8,addr=0x8,bus=pcie.0 \
  -object iothread,id=iothread0 \
  -device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x4,iothread=iothread0 \
  -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
  -blockdev node-name=drive_image1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=file_image1 \
  -device scsi-hd,id=image1,drive=drive_image1,bootindex=0,write-cache=on \
  \
  -blockdev node-name=data_image1,driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/stg1.qcow2,aio=threads \
  -blockdev node-name=data1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=data_image1 \
  -device scsi-hd,id=disk1,drive=data1,write-cache=on,bus=scsi0.0  \
  \
  -blockdev node-name=data_image2,driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/stg2.qcow2,aio=threads \
  -blockdev node-name=data2,driver=qcow2,cache.direct=on,cache.no-flush=off,file=data_image2 \
  -device virtio-blk-pci,id=disk2,drive=data2,write-cache=on,bus=pcie_port_7  \
  \
  -device virtio-net-pci,mac=9a:7f:65:c9:ec:b8,id=idCBhCiy,netdev=id1uqNcV,bus=pcie.0,addr=0x5 \
  -netdev tap,id=id1uqNcV,vhost=on \
  -device virtio-scsi-pci,id=scsi1,bus=pcie.0,addr=0x6 \
  -blockdev node-name=file_cd1,driver=file,read-only=on,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
  -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
  -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on,bus=scsi1.0 \
  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
  -vnc :6 \
  -rtc base=localtime,clock=host,driftfix=slew \
  -boot menu=off,order=cdn,once=c,strict=off \
  -enable-kvm -monitor stdio \
  -qmp tcp:0:5956,server,nowait \

2 hotunplug disk1
{'execute':'qmp_capabilities'}

{"execute":"device_del","arguments":{"id":"disk1"}}

3 hotplug disk again

{'execute':'device_add','arguments':{'driver':'scsi-hd','id':'disk1','drive':'data1','bus':'scsi0.0'}}

Comment 30 Vadim Rozenfeld 2020-05-15 11:32:00 UTC
(In reply to qing.wang from comment #29)
> In my understanding, they are same issue with


Well, yes nd no.

Originally this bug was cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1673396
Please take a look at the bug description.

But starting from comment#10 this bug was misused for reporting a different problem
( the same as https://bugzilla.redhat.com/show_bug.cgi?id=1708490 as you mentioned above)

Those two problems are not the same and coused by two different root cases. 
I would prefer to keep this bug for tracing qemu related issue, as it was created initially, 
rather that a clone of https://bugzilla.redhat.com/show_bug.cgi?id=1708490.. But honestly ,
have no idea how to remove all irrelevant information/comments from here.

Vadim.  


> https://bugzilla.redhat.com/show_bug.cgi?id=1708490.
> And this issue fixed by virtio-win-prewhql-0.1-184. I do not know what is
> your mentioned part 1.
>


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