Bug 972964
Summary: | WWN option for Hot Attaching SCSI Disks | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jim McEvoy <jemcevoy> |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | dyuan, honzhang, jdenemar, jmiao, juzhang, rbalakri, sluo, weizhan, xuzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
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
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 07:20:46 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: |
Description
Jim McEvoy
2013-06-10 23:28:17 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. 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. 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] 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 |