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 1095609 - qemu-kvm should give some hint when hot-plug a devices with the same existing "scsi-id and lun"
Summary: qemu-kvm should give some hint when hot-plug a devices with the same existing...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: x86_64
OS: Windows
medium
medium
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1096590 (view as bug list)
Depends On: 1095606 1096576
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-08 07:25 UTC by Jun Li
Modified: 2014-10-14 06:58 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.432.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1095606
Environment:
Last Closed: 2014-10-14 06:58:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description Jun Li 2014-05-08 07:25:42 UTC
+++ This bug was initially created as a clone of Bug #1095606 +++

Description of problem:
when hot-plug a devices with the same existing "scsi-id  and lun", qemu-kvm can not give any error message or qemu-kvm should forbid this operation.

Version-Release number of selected component (if applicable):
3.10.0-123.el7.x86_64
qemu-kvm-1.5.3-60.el7_0.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a virtio-scsi device(specified scsi-id and lun), such as:
/usr/libexec/qemu-kvm -S -m 2G -smp 2 -monitor stdio -boot menu=on -vnc :1 -netdev tap,id=tap0,vhost=on,queues=4,script=/etc/qemu-ifup -device virtio-net-pci,mq=on,netdev=tap0,id=net0,vectors=10 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -drive file=/dev/disk/by-path/ip-10.66.9.10:3260-iscsi-iqn.2013-11.com.example:storage.disk1.juli.xyz-lun-2,format=qcow2,if=none,id=img,media=disk -device scsi-hd,drive=img,id=sys-img,bus=scsi0.0,scsi-id=0,lun=0 -drive file=/home/juli/virtio-win-prewhql-80.iso,if=none,media=cdrom,id=cdrom0 -device scsi-cd,drive=cdrom0,id=sys-cdrom0,bus=scsi0.0,scsi-id=0,lun=1
2.hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".
(qemu) drive_add auto file=/home/juli/sn1.qcow2,if=none,id=test1
(qemu) device_add scsi-cd,drive=test1,id=sys-test1,bus=scsi0.0,scsi-id=0,lun=1
3.

Actual results:
after step 2, this operation will success. And this operation will overlap the existing device(sys-cdrom0).

Expected results:
can not hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".

Additional info:

Comment 1 Jun Li 2014-05-08 07:28:41 UTC
Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.415.el6.x86_64
2.6.32-459.el6.x86_64

Steps to Reproduce:
1.boot guest with a virtio-scsi device(specified scsi-id and lun), such as:
/usr/libexec/qemu-kvm -m 2G -smp 2 -monitor stdio -boot menu=on -vnc :11 -drive file=/home/RHEL-Server-6.5-64-virtio.qcow2,if=none,id=img,media=disk -device virtio-scsi-pci,id=scsi0 -device virtio-blk-pci,drive=img,id=sys-img -drive file=/home/juli/test1,if=none,media=cdrom,id=cdrom0 -device scsi-cd,drive=cdrom0,id=sys-cdrom0,bus=scsi0.0,scsi-id=0,lun=1 -S
2.hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".
(qemu) __com.redhat_drive_add   file=/home/juli/test2,id=test1
(qemu) device_add scsi-disk,drive=test1,id=sys-test1,bus=scsi0.0,scsi-id=0,lun=1

Comment 4 Jeff Nelson 2014-07-29 15:57:02 UTC
Fix included in qemu-kvm-0.12.1.2-2.432.el6

Comment 6 langfang 2014-08-01 03:17:17 UTC
Reproduce this bug as follow version:
# uname -r 
2.6.32-452.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.431.el6.x86_64

Steps:
1.Boot guest with 
 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -drive file=/usr/share/virtio-win/virtio-win.iso,if=none,media=cdrom,id=cdrom0 -device scsi-cd,drive=cdrom0,id=sys-cdrom0,bus=scsi0.0,scsi-id=0,lun=1

2.hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".
(qemu)__com.redhat_drive_add file=en_windows_xp_professional_x64.iso,id=test1
(qemu)device_add scsi-cd,drive=test1,id=sys-test1,bus=scsi0.0,scsi-id=0,lun=1

Results:
hot-plug successfully. And this operation will overlap the existing device.


Verify this bug as follow version:

# uname -r 
2.6.32-452.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.434.el6.x86_64

Steps as same as reproduce

Results:
(qemu) device_add scsi-cd,drive=test1,id=sys-test1,bus=scsi0.0,scsi-id=0,lun=1
lun already used by 'sys-cdrom0'
Device 'scsi-cd' could not be initialized


according to above test ,this bug fixed.

Comment 7 Fam Zheng 2014-08-07 00:32:26 UTC
*** Bug 1096590 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2014-10-14 06:58:36 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.

http://rhn.redhat.com/errata/RHBA-2014-1490.html


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