Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 929084

Summary: Win8.64 guest can not hotplug/hotunplug scsi-hd/scsi-disk/scsi-cd successfully without "Rescan Disks"
Product: Red Hat Enterprise Linux 7 Reporter: lijin <lijin>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ddepaula, hhuang, juzhang, knoel, michen, pbonzini, phou, virt-maint, vrozenfe, yuhuang
Version: 7.0   
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
NO_DOCS
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 16:21:49 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:
Bug Depends On:    
Bug Blocks: 1288337, 1401400    

Description lijin 2013-03-29 08:35:12 UTC
Description of problem:
boot a win8.64 guest,and hotplug a scsi-hd,info block can see the correct information,but guest can not detect it automatically,after I "rescan disks" in Disk Management,the hotpluged scsi-hd can be seen.And after I hotunplug the scsi-hd,guest still can see it(but can not do operation on it),then after "rescan disks" guest can not see it.
scsi-disk,scsi-cd hit the same problem. 

Version-Release number of selected component (if applicable):
host:RHEL-7.0-20130306.0
kernel-3.8.0-0.40.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
virtio-win-1.6.3-3.el6.noarch
guest:win8.64

How reproducible:
always

Steps to Reproduce:
1.start a win8-64 guest with below command line:
/usr/libexec/qemu-kvm  \
-drive file=/home/virtual-blk-test/win8-64-virtio.qcow2,if=none,id=drive-scsi0-0-0,if=none,media=disk,cache=writethrough,format=qcow2 \
-device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 \
-device scsi-disk,drive=drive-scsi0-0-0,bus=scsi0.0,id=scsi1,bootindex=1 
-qmp tcp::12345,server,nowait \
-monitor stdio  -vnc :2  -boot menu=on \
-chardev file,path=/root/console.log,id=serial1 \
-device isa-serial,chardev=serial1,id=s1 \
-usb -device usb-tablet,id=tablet1 \
-M pc-i440fx-1.4 -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 -m 4096 \
-enable-kvm \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-fdb /usr/share/virtio-win/virtio-win-1.6.3_x86.vfd \
-cdrom /usr/share/virtio-win/virtio-win-1.6.3.iso

2.hotplug a scsi-hd/scsi-disk/scsi-cd

3.hotunplug the scsi-hd/scsi-disk/scsi-cd

  
Actual results:
after sep2,info block can see the information of the added device
but guest can not detect the hotpluged device,after I "rescan disks" in Disk Management,the hotpluged device can be seen.

after step4,info block the device not appeared
the device still existed in the guest(but can not do operation on it),after rescan the disks,the device disappear.


Expected results:
after sep2,info block can see the information of the added device
in guest,the OS can detect the added device automatically without rescan disk

after step4,info block the device not appeared
in guest,can not see the previous device

Additional info:

Comment 2 Sibiao Luo 2013-03-29 10:22:13 UTC
(In reply to comment #0)
> Description of problem:
> boot a win8.64 guest,and hotplug a scsi-hd,info block can see the correct
> information,but guest can not detect it automatically,after I "rescan disks"
> in Disk Management,the hotpluged scsi-hd can be seen.And after I hotunplug
> the scsi-hd,guest still can see it(but can not do operation on it),then
> after "rescan disks" guest can not see it.
> scsi-disk,scsi-cd hit the same problem. 
> 
Could you help to check whether rhel guest can hit this issue ? Maybe the virtio-win driver issue. Thanks.

Comment 5 Mike Cao 2013-03-31 15:35:31 UTC
jinli ,pls retest this bug on RHEL guest

Comment 6 lijin 2013-04-01 08:13:56 UTC
(In reply to comment #5)
> jinli ,pls retest this bug on RHEL guest

After retest on rhel guest,guest did not hit the issue:
with fdisk -l command,hotpluged device can be seen

Comment 12 Yumei Huang 2016-01-15 07:16:07 UTC
Reproduced on win2012 and win2008 guest when hotplug a scsi disk. 

With option hotplug=on/off, win2012 and win2008 guest always need to rescan disks.

Comment 13 Vadim Rozenfeld 2016-02-02 06:17:09 UTC
(In reply to Yumei Huang from comment #12)
> Reproduced on win2012 and win2008 guest when hotplug a scsi disk. 
> 
> With option hotplug=on/off, win2012 and win2008 guest always need to rescan
> disks.

Could you please give a try to virtio-scsi driver from  build 112 https://brewweb.devel.redhat.com//buildinfo?buildID=470418 ?

Thanks,
Vadim.

Comment 14 lijin 2016-02-02 06:46:31 UTC
(In reply to Vadim Rozenfeld from comment #13)
> (In reply to Yumei Huang from comment #12)
> > Reproduced on win2012 and win2008 guest when hotplug a scsi disk. 
> > 
> > With option hotplug=on/off, win2012 and win2008 guest always need to rescan
> > disks.
> 
> Could you please give a try to virtio-scsi driver from  build 112
> https://brewweb.devel.redhat.com//buildinfo?buildID=470418 ?
> 
build 112 still hit the same issue

Comment 15 Vadim Rozenfeld 2016-02-02 09:30:51 UTC
(In reply to lijin from comment #14)
> (In reply to Vadim Rozenfeld from comment #13)
> > (In reply to Yumei Huang from comment #12)
> > > Reproduced on win2012 and win2008 guest when hotplug a scsi disk. 
> > > 
> > > With option hotplug=on/off, win2012 and win2008 guest always need to rescan
> > > disks.
> > 
> > Could you please give a try to virtio-scsi driver from  build 112
> > https://brewweb.devel.redhat.com//buildinfo?buildID=470418 ?
> > 
> build 112 still hit the same issue

,
Could you please provide the exact steps how to reproduce the problem?

Thanks,
Vadim.

Comment 16 lijin 2016-02-03 02:09:41 UTC
1.boot a win2012 guest:
/usr/libexec/qemu-kvm -M pc -cpu SandyBridge -M pc -enable-kvm -m 2G -smp 2 -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=win2012-pre.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,serial=mike_cao,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -qmp tcp:0:4444,server,nowait -monitor stdio

2.check in disk management there's no extra disk

3.hot-plug scsi controller
(qemu) device_add virtio-scsi-pci,id=scsi0

4.install scsi driver in guest

5.hot-plug a formatted scsi-hd disk:
(qemu) __com.redhat_drive_add file=test.raw,id=drive1
(qemu) device_add scsi-hd,bus=scsi0.0,drive=drive1,id=scsi1

6.check in disk management and "Computer" ---> the hot-plugged disk is NOT displayed,there is no new disk in "Computer"

7.right click disk management,then click "Rescan disks"---> the hot-plugged disk can be displayed,there is a new disk "New Volume(F:)" in "Computer"

8.hot-unplug the disk
(qemu) device_del scsi1

9.check in disk management and and "Computer"  ---> the disk became "unknow" status and the disk "New Volume(F:)" still can be seen in "Computer"

10.right click disk management,then click "Rescan disks"--->the disk disappear in disk management and the "New Volume(F:)" disappear in "Computer"

from step6 and step9,guest can NOT detect the disk add/delete automatically;
from step7 and step10,guest CAN detect the disk add/delete only if we do "Rescan" in disk management.


QE report this bug due to:
1.rhel guest does NOT hit this issue;
2.blk device does NOT hit this issue,disk can be detect automatically after the hotplug/hot-unplug.

Comment 17 Vadim Rozenfeld 2016-02-03 02:54:13 UTC
(In reply to lijin from comment #16)
> 1.boot a win2012 guest:
> /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -M pc -enable-kvm -m 2G -smp 2
> -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot
> order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
> file=win2012-pre.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,
> serial=mike_cao,cache=none -device
> ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev
> pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0
> -device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -qmp
> tcp:0:4444,server,nowait -monitor stdio
> 
> 2.check in disk management there's no extra disk
> 
> 3.hot-plug scsi controller
> (qemu) device_add virtio-scsi-pci,id=scsi0

How does it work if you explicitly specify "hotplugability"? Something like

device_add virtio-scsi-pci,id=scsi0,hotplug=on

I was referencing the following document https://polarion.engineering.redhat.com/polarion/#/project/RHEL6/workitem?id=RHEL6-5687 when tried to reproduce the problem.

Thanks.
Vadim.
 
> 
> 4.install scsi driver in guest
> 
> 5.hot-plug a formatted scsi-hd disk:
> (qemu) __com.redhat_drive_add file=test.raw,id=drive1
> (qemu) device_add scsi-hd,bus=scsi0.0,drive=drive1,id=scsi1
> 
> 6.check in disk management and "Computer" ---> the hot-plugged disk is NOT
> displayed,there is no new disk in "Computer"
> 
> 7.right click disk management,then click "Rescan disks"---> the hot-plugged
> disk can be displayed,there is a new disk "New Volume(F:)" in "Computer"
> 
> 8.hot-unplug the disk
> (qemu) device_del scsi1
> 
> 9.check in disk management and and "Computer"  ---> the disk became "unknow"
> status and the disk "New Volume(F:)" still can be seen in "Computer"
> 
> 10.right click disk management,then click "Rescan disks"--->the disk
> disappear in disk management and the "New Volume(F:)" disappear in "Computer"
> 
> from step6 and step9,guest can NOT detect the disk add/delete automatically;
> from step7 and step10,guest CAN detect the disk add/delete only if we do
> "Rescan" in disk management.
> 
> 
> QE report this bug due to:
> 1.rhel guest does NOT hit this issue;
> 2.blk device does NOT hit this issue,disk can be detect automatically after
> the hotplug/hot-unplug.

Comment 18 lijin 2016-02-03 03:02:18 UTC
(In reply to Vadim Rozenfeld from comment #17)
> (In reply to lijin from comment #16)
> > 1.boot a win2012 guest:
> > /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -M pc -enable-kvm -m 2G -smp 2
> > -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot
> > order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
> > file=win2012-pre.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,
> > serial=mike_cao,cache=none -device
> > ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev
> > pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0
> > -device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -qmp
> > tcp:0:4444,server,nowait -monitor stdio
> > 
> > 2.check in disk management there's no extra disk
> > 
> > 3.hot-plug scsi controller
> > (qemu) device_add virtio-scsi-pci,id=scsi0
> 
> How does it work if you explicitly specify "hotplugability"? Something like
> 
> device_add virtio-scsi-pci,id=scsi0,hotplug=on
> 
> I was referencing the following document
> https://polarion.engineering.redhat.com/polarion/#/project/RHEL6/
> workitem?id=RHEL6-5687 when tried to reproduce the problem.

I also tried add "hotplug=on",the result is same

Comment 21 Peixiu Hou 2018-07-12 02:25:52 UTC
Reproduced this bug on win2016 guest with virtio-win-1.6.3-3.el6.noarch.

Verified this bug on win2016 guest with virtio-win-prewhql-156, no need do "Rescan disk", the new hot-pluged disk can be found automatically, And hot-unpluged disk also disappeared automatically.

Steps as comment#0.

According to upper result, this bug has been fixed.

Comment 22 Danilo de Paula 2018-08-21 14:11:08 UTC
Can we have QA, PM and Release flags for this, please?

Comment 24 errata-xmlrpc 2018-10-30 16:21:49 UTC
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.

https://access.redhat.com/errata/RHBA-2018:3413