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 972964 - WWN option for Hot Attaching SCSI Disks
Summary: WWN option for Hot Attaching SCSI Disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-10 23:28 UTC by Jim McEvoy
Modified: 2016-04-26 13:56 UTC (History)
9 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Support was added to only add a WWN (World Wide Name) for a disk to libvirt via XML. Consequence: Cannot use virsh to define a WWN, rather the user must virsh edit the guest XML file and add the XML for the disk. Fix: Add --wwn to virsh attach-disk command Result: The following command would attach the test.img to a virtual machine as a SCSI device via virsh virsh attach-disk rhel7.1 /var/lib/libvirt/images/test.img sdb --driver qemu --subdriver raw --type disk --sourcetype file --wwn 5000c60016ea71ad --cache none
Clone Of:
Environment:
Last Closed: 2015-03-05 07:20:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Jim McEvoy 2013-06-10 23:28:17 UTC
Description of problem:
When bug 831099 was fixed to allow assigning World Wide Names to SCSI disks the virsh command attach-disk was not updated to include a --wwn option.  Currently the only way to assign a wwn is by using an xml snippet.  When I pointed this out to Osier he said that it was an oversight and he has alredy committed a fix to git.  This bug is just to track the fix into the next Errata.

Version-Release number of selected component (if applicable):
RHEL 6.4 

How reproducible:
Every time.

Steps to Reproduce:
1.virsh attach-disk --source /dev/mapper/KVM-vol02 --target sdg --wwn=5000c60016ea71a --type=disk --domain Unity01 --config --cache none
2.
3.

Actual results:
error: command 'attach-disk' doesn't support option --wwn

Expected results:
Disk attached successfully

Additional info:

Comment 2 Jiri Denemark 2013-06-24 09:02:10 UTC
Fixed upstream by v1.0.6-15-g232240d:

commit 232240d0958fa967cee88d688b48e1bc1c0e1008
Author: Osier Yang <jyang>
Date:   Tue Jun 4 11:27:04 2013 +0800

    virsh: Allow attach-disk to specify disk wwn
    
    Commit 6e73850b01ee support to set wwn for disks, but it was not
    exposed to attach-disk.

Comment 6 Jiri Denemark 2014-04-04 21:37:44 UTC
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.

Comment 8 Xuesong Zhang 2014-11-24 12:53:52 UTC
Test with the following packages, this bug is verified.

Package version:
libvirt-1.2.8-8.el7.x86_64
qemu-kvm-rhev-2.1.2-12.el7.x86_64
kernel-3.10.0-208.el7.x86_64

Steps:
1. prepare one running guest.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 23    rhel7.1                        running


2. hot-plug the disk with wwn option via parameter
# virsh attach-disk rhel7.1  /var/lib/libvirt/images/test.img sdb --driver qemu --subdriver raw --type disk --sourcetype file --wwn 5000c60016ea71ad --cache none
Disk attached successfully

3. checking the dumpxml, the disk and wwn is correct.
# virsh dumpxml rhel7.1
......
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <backingStore/>
      <target dev='sdb' bus='scsi'/>
      <wwn>5000c60016ea71ad</wwn>
      <alias name='scsi0-0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
......

4. login the guest, the wwn of disk in guest is correct also.
# sg_inq -p 0x83 /dev/sdb
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 21
    designator_type: vendor specific [0x0],  code_set: ASCII
    associated with the addressed logical unit
      vendor specific: drive-scsi0-0-0-1
  Designation descriptor number 2, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0xc60
      Vendor Specific Identifier: 0x16ea71ad
      [0x5000c60016ea71ad]

Comment 10 errata-xmlrpc 2015-03-05 07:20:46 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://rhn.redhat.com/errata/RHSA-2015-0323.html


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