Description of problem: Creating qcow2: external data file images over libiscsi fails. Version-Release number of selected component (if applicable): Qemu: # qemu-img --version qemu-img version 4.0.50 (v4.0.0-89-gdb7f1c3faf) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers Kernel: # uname -r 4.18.0-80.16.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. Check the existing images over libiscsi # qemu-img info iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/4 image: json:{"driver": "raw", "file": {"lun": "4", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-04.com.ecample:t1"}} file format: raw virtual size: 1.0G (1073741824 bytes) disk size: unavailable # qemu-img info iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/0 image: json:{"driver": "raw", "file": {"lun": "0", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-04.com.ecample:t1"}} file format: raw virtual size: 1.0G (1073741824 bytes) disk size: unavailable 2. Create qcow2: external data file images over them # qemu-img create -f qcow2 -o data_file=iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/0,data_file_raw=off iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/4 1G Formatting 'iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/4', fmt=qcow2 size=1073741824 data_file=iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/0 data_file_raw=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 # echo $? 0 3. Check image info # qemu-img info iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/4 qemu-img: Could not open 'iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/4': The 'file' block driver requires a file name Actual results: Accessing to new created image failed. As above. Expected results: Got the image info. Additional info: The data_file image still works. # qemu-img info iscsi://10.66.10.26/iqn.2019-04.com.ecample:t1/0 image: json:{"driver": "raw", "file": {"lun": "0", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-04.com.ecample:t1"}} file format: raw virtual size: 1.0G (1073741824 bytes) disk size: unavailable
Accessing to the created image by complete Json format successfully as below. But convert to qcow2: external data file over libiscsi will fail. Scenario 1(Create and access the image) # qemu-img create -f qcow2 -o data_file=iscsi://10.66.10.26/iqn.2019-02.com.example:t1/1,data_file_raw=off iscsi://10.66.10.26/iqn.2019-02.com.example:t1/2 1G # qemu-img info 'json:{ "driver": "qcow2", "file": { "lun": "2", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-02.com.example:t1" }, "data-file": { "driver": "iscsi", "lun": "1", "portal": "10.66.10.26", "transport": "tcp", "target": "iqn.2019-02.com.example:t1"}}' image: json:{"data-file": {"lun": "1", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-02.com.example:t1"}, "driver": "qcow2", "file": {"lun": "2", "portal": "10.66.10.26", "driver": "iscsi", "transport": "tcp", "target": "iqn.2019-02.com.example:t1"}} file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: unavailable cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 data file: --------------------------------- There is no data file info!!! data file raw: false corrupt: false Scenario 2 (Convert) 1. Create a image in local # qemu-img create -f raw test.img 1G 2. Convert to qcow2: external data file over libiscsi # qemu-img convert -f raw test.img -O qcow2 -o data_file=iscsi://10.66.10.26/iqn.2019-02.com.example:t1/1,data_file_raw=off iscsi://10.66.10.26/iqn.2019-02.com.example:t1/3 -p qemu-img: Could not open 'iscsi://10.66.10.26/iqn.2019-02.com.example:t1/3': The 'file' block driver requires a file name
For rbd backend, still hit this issue. Tested with: qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93 kernel-4.18.0-135.el8 Steps: Scenario 1(Check info) # qemu-img create -f qcow2 -o data_file=rbd:kvmtest-pool/xx.img,data_file_raw=off rbd:kvmtest-pool/xx.qcow2 2G # qemu-img info rbd:kvmtest-pool/xx.qcow2 qemu-img: Could not open 'rbd:kvmtest-pool/xx.qcow2': The 'file' block driver requires a file name Scenario 2(Convert) # qemu-img convert -f qcow2 -O qcow2 -o data_file=rbd:kvmtest-pool/ttgttt.img,data_file_raw=off rbd:kvmtest-pool/tt.qcow2 rbd:kvmtest-pool/tgttttt.qcow2 -p qemu-img: Could not open 'rbd:kvmtest-pool/tgttttt.qcow2': The 'file' block driver requires a file name
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.
Since bug 1688814 is CLOSED as WONTFIX, just cover basic test with local fs is enough. QE agrees to close it.