[libvirt-users] Whether libvirt can support all backing chain layer are iscsi network disk type

Hi, For backing chain that all images are iscsi network disk type , such as iscsi://ip/iqn../0(base image) <-iscsi://ip/iqn../1(active image). Currently, 'qemu-img info --backing-chain' command can display correct backing file info, but after starting guest with the active image in backing chain, it don't include the related <backingStore> element in dumpxml. So, Whether libvirt can support all backing chain layer are iscsi network disk type? Best Regards Meina Li On Wed, Jan 3, 2018 at 6:39 AM, Meina Li <meili@redhat.com> wrote:
Hi,
I am a libvirt qe, I am testing the function about the new location of disk auth element (as sub-element of the source element) in Backing Chain Management. And I have a questions:
When all the backing chain are iscsi network disk type(no matter if the authentication is exist), start the guest , it will only has the top level disk in xml and there are no other backingStore in it. The test step is below.
So can this function support all backing chain with network disk type actually, or only use network authentication as the base image for backing chain of file disk type?
Can you help reviewing it? Thanks very much in advance!
Test step: 1. iSCSI server: o- iscsi ............................................................ ................................................ [Targets: 2] | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6 ....................................................... [TPGs: 1] | | o- tpg1 ..................................................................................... [gen-acls, tpg-auth, 1-way auth] | | o- acls .............................. ............................................................................ [ACLs: 0] | | o- luns .............................. ............................................................................ [LUNs: 4] | | | o- lun0 .............................. .................................. [fileio/file1 (/tmp/lun1.img) (default_tg_pt_gp)] | | o- portals .............................. ...................................................................... [Portals: 1] | | o- 0.0.0.0:3260 .............................. ....................................................................... [OK] | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece ....................................................... [TPGs: 1] | o- tpg1 ............................................................ ...................................... [gen-acls, no-auth] | o- acls .............................. ............................................................................ [ACLs: 0] | o- luns .............................. ............................................................................ [LUNs: 3] | | o- lun0 .............................. .................................. [fileio/file3 (/tmp/lun3.img) (default_tg_pt_gp)] | o- portals .............................. ...................................................................... [Portals: 1] | o- 0.0.0.0:3260 .............................. ....................................................................... [OK]
2. Set iscsi secret. # cat iscsi-secret.xml <secret ephemeral='no' private='yes'> <description>iSCSI secret</description> <usage type='iscsi'> <target>libvirtiscsi</target> </usage> </secret> # virsh secret-define iscsi-secret.xml Secret 47bd2f3e-023f-44ba-85a3-e8fa7f16ff23 created # MYSECRET=`printf %s "redhat" | base64` # virsh secret-set-value 47bd2f3e-023f-44ba-85a3-e8fa7f16ff23 $MYSECRET Secret value set
3. Create backing chain. # qemu-img create -f qcow2 -b iscsi://redhat:redhat@10.66.7. 27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0 iscsi://10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn. a8d92ebb4ece/0 -o backing_fmt=qcow2
4. Start guest. # qemu-img info iscsi://10.66.7.27:3260/iqn.2003-01.org.linux-iscsi. localhost.x8664:sn.a8d92ebb4ece/0 --backing-chainimage: json:{"driver": "qcow2", "file": {"lun": "0", "portal": "10.66.7.27:3260", "driver": "iscsi", "transport": "tcp", "target": "iqn.2003-01.org.linux-iscsi. localhost.x8664:sn.a8d92ebb4ece"}} file format: qcow2 virtual size: 5.0G (5368709120 <0536%20870%209120> bytes) disk size: unavailable cluster_size: 65536 backing file: iscsi://redhat:redhat@10.66.7.27: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": " 10.66.7.27:3260", "driver": "iscsi", "transport": "tcp", "user": "redhat", "password": "redhat", "target": "iqn.2003-01.org.linux-iscsi. localhost.x8664:sn.9cba196611e6"}} file format: qcow2 virtual size: 5.0G (5368709120 <0536%20870%209120> bytes) disk size: unavailable cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false
# 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='10.66.7.27' port='3260'/> </source> <target dev='vdb' bus='virtio'/> <alias name='virtio-disk1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </disk> ...
Best Regards Meina Li

On Tue, Jan 09, 2018 at 22:12:00 -0500, Meina Li wrote:
Hi,
For backing chain that all images are iscsi network disk type , such as iscsi://ip/iqn../0(base image) <-iscsi://ip/iqn../1(active image). Currently, 'qemu-img info --backing-chain' command can display correct backing file info, but after starting guest with the active image in backing chain, it don't include the related <backingStore> element in dumpxml.
So, Whether libvirt can support all backing chain layer are iscsi network disk type?
Libvirt can't introspect the backing chain for certain storage technologies, thus the <backingStore> elements are missing for them. Note that the chain should show up as unterminated (not having <backingStore/> in the last visible layer) which indicates that there may be images libvirt can't inspect. This will eventually be solved by keeping the full backing chain in the XML.
participants (2)
-
Meina Li
-
Peter Krempa