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 1534490

Summary: [RFE] Add support for all backing file in backing chain are network disk type in libvirt
Product: Red Hat Enterprise Linux 7 Reporter: Meina Li <meili>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Han Han <hhan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: hhan, jiyan, lmen, pkrempa, rbalakri, xuzhang, yisun
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-22 08:46:10 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 Meina Li 2018-01-15 11:11:02 UTC
Description of problem:
Recently libvirt can't introspect the backing chain for certain storage
technologies, thus the <backingStore> elements are missing for them. And we hope it can support all backing file in backing chain are network disk type.

Version-Release number of selected component (if applicable):
libvirt-3.9.0-7.el7.x86_64
qemu-kvm-rhev-2.10.0-15.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Prepare a guest with iscsi network disk.

2. Create backing file.
# qemu-img create -f qcow2 -b iscsi://**IP**:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0 iscsi://**IP**:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0 -o backing_fmt=qcow2

3. Check backing chain info.
# qemu-img info iscsi://**IP*8:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0 --backing-chain
image: json:{"driver": "qcow2", "file": {"lun": "0", "portal": "**IP**:3260", "driver": "iscsi", "transport": "tcp", "target": "iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece"}}
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: unavailable
cluster_size: 65536
backing file: iscsi://**IP**:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

image: json:{"driver": "qcow2", "file": {"lun": "0", "portal": "**IP**:3260", "driver": "iscsi", "transport": "tcp", "target": "iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6"}}
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: unavailable
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

4. Start guest with the last layer and check guest xml.
# virsh dumpxml rhel7 | grep disk -A 9
...
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0'>
        <host name='**IP**' port='3260'/>
      </source>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </disk>
...

Actual results:
As above step4.

Expected results:
# virsh dumpxml rhel7 | grep disk -A 9
...
    <disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0'>
        <host name='**IP**' port='3260'/>
         <backingStore type='network' index='1'>
            <format type='qcow2'/>
             <source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0'>     
               <host name='**IP**' port='3260'/>
             </source>                                                    --
           </backingStore>
      </source>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </disk>
...

Additional info:

Comment 4 Peter Krempa 2018-01-22 08:46:10 UTC
This will be superseded by allowing the full backing chain to be specified in the XML explicitly rather than trying to detect it.

*** This bug has been marked as a duplicate of bug 760547 ***