<div dir="ltr">Hi,<div><br></div><div>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:</div><div><br></div><div>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. </div><div><br></div><div>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?</div><div><br></div><div>Can you help reviewing it? Thanks very much in advance!</div><div><br></div><div>Test step:</div><div>1.  iSCSI server:</div><div><div>  o- iscsi ............................................................................................................ [Targets: 2]</div><div>  | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6 ....................................................... [TPGs: 1]</div><div>  | | o- tpg1 ..................................................................................... [gen-acls, tpg-auth, 1-way auth]</div><div>  | |   o- acls .......................................................................................................... [ACLs: 0]</div><div>  | |   o- luns .......................................................................................................... [LUNs: 4]</div><div>  | |   | o- lun0 ................................................................ [fileio/file1 (/tmp/lun1.img) (default_tg_pt_gp)]</div><div>  | |   o- portals .................................................................................................... [Portals: 1]</div><div>  | |     o- <a href="http://0.0.0.0:3260">0.0.0.0:3260</a> ..................................................................................................... [OK]</div><div>  | o- iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece ....................................................... [TPGs: 1]</div><div>  |   o- tpg1 .................................................................................................. [gen-acls, no-auth]</div><div>  |     o- acls .......................................................................................................... [ACLs: 0]</div><div>  |     o- luns .......................................................................................................... [LUNs: 3]</div><div>  |     | o- lun0 ................................................................ [fileio/file3 (/tmp/lun3.img) (default_tg_pt_gp)]</div><div>  |     o- portals .................................................................................................... [Portals: 1]</div><div>  |       o- <a href="http://0.0.0.0:3260">0.0.0.0:3260</a> ..................................................................................................... [OK]</div></div><div><br></div><div><div><div class="gmail_signature"><div dir="ltr">2. Set iscsi secret.</div><div dir="ltr"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"># cat iscsi-secret.xml</span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><secret ephemeral='no' private='yes'></span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><description>iSCSI secret</description></span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><usage type='iscsi'></span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><target>libvirtiscsi</target></span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"></usage></span><br style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:13.3333px"></secret></span></div><div dir="ltr"><font color="#000000" face="Arial, Helvetica, sans-serif"><div dir="ltr"><span style="font-size:13.3333px"># virsh secret-define iscsi-secret.xml </span></div><div dir="ltr"><span style="font-size:13.3333px">Secret 47bd2f3e-023f-44ba-85a3-e8fa7f16ff23 created</span></div><div dir="ltr"><span style="font-size:13.3333px"># MYSECRET=`printf %s "redhat" | base64`</span></div><div dir="ltr"><span style="font-size:13.3333px"># virsh secret-set-value 47bd2f3e-023f-44ba-85a3-e8fa7f16ff23 $MYSECRET</span></div><div dir="ltr"><span style="font-size:13.3333px">Secret value set</span></div><div style="font-size:13.3333px"><br></div><div style="font-size:13.3333px">3. Create backing chain.</div><div><div style="font-size:13.3333px"># qemu-img create -f qcow2 -b iscsi://<a href="http://redhat:redhat@10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0">redhat:redhat@10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0</a> iscsi://<a href="http://10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0">10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0</a> -o backing_fmt=qcow2</div><div style="font-size:13.3333px"><br></div><div style="font-size:13.3333px">4. Start guest.</div><div><span style="font-size:13.3333px"># qemu-img info iscsi://<a href="http://10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0">10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0</a> --backing-chainimage: json:{"driver": "qcow2", "file": {"lun": "0", "portal": "<a href="http://10.66.7.27:3260">10.66.7.27:3260</a>", "driver": "iscsi", "transport": "tcp", "target": "iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece"}}</span></div><div><span style="font-size:13.3333px">file format: qcow2</span></div><div><span style="font-size:13.3333px">virtual size: 5.0G (5368709120 bytes)</span></div><div><span style="font-size:13.3333px">disk size: unavailable</span></div><div><span style="font-size:13.3333px">cluster_size: 65536</span></div><div><span style="font-size:13.3333px">backing file: iscsi://<a href="http://redhat:redhat@10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0">redhat:redhat@10.66.7.27:3260/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6/0</a></span></div><div><span style="font-size:13.3333px">backing file format: qcow2</span></div><div><span style="font-size:13.3333px">Format specific information:</span></div><div><span style="font-size:13.3333px">    compat: 1.1</span></div><div><span style="font-size:13.3333px">    lazy refcounts: false</span></div><div><span style="font-size:13.3333px">    refcount bits: 16</span></div><div><span style="font-size:13.3333px">    corrupt: false</span></div><div><span style="font-size:13.3333px"><br></span></div><div><span style="font-size:13.3333px">image: json:{"driver": "qcow2", "file": {"lun": "0", "portal": "<a href="http://10.66.7.27:3260">10.66.7.27:3260</a>", "driver": "iscsi", "transport": "tcp", "user": "redhat", "password": "redhat", "target": "iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.9cba196611e6"}}</span></div><div><span style="font-size:13.3333px">file format: qcow2</span></div><div><span style="font-size:13.3333px">virtual size: 5.0G (5368709120 bytes)</span></div><div><span style="font-size:13.3333px">disk size: unavailable</span></div><div><span style="font-size:13.3333px">cluster_size: 65536</span></div><div><span style="font-size:13.3333px">Format specific information:</span></div><div><span style="font-size:13.3333px">    compat: 1.1</span></div><div><span style="font-size:13.3333px">    lazy refcounts: false</span></div><div><span style="font-size:13.3333px">    refcount bits: 16</span></div><div><span style="font-size:13.3333px">    corrupt: false</span></div><div><br></div><div style="font-size:13.3333px"># virsh dumpxml rhel7 | grep disk -A 9</div><div style="font-size:13.3333px">...</div><div><div><span style="font-size:13.3333px">    <disk type='network' device='disk'></span></div><div><span style="font-size:13.3333px">      <driver name='qemu' type='qcow2'/></span></div><div><span style="font-size:13.3333px">      <source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.a8d92ebb4ece/0'></span></div><div><span style="font-size:13.3333px">        <host name='10.66.7.27' port='3260'/></span></div><div><span style="font-size:13.3333px">      </source></span></div><div><span style="font-size:13.3333px">      <target dev='vdb' bus='virtio'/></span></div><div><span style="font-size:13.3333px">      <alias name='virtio-disk1'/></span></div><div><span style="font-size:13.3333px">      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/></span></div><div><span style="font-size:13.3333px">    </disk></span></div></div><div style="font-size:13.3333px">...</div></div></font><div><br></div><div><br></div><div>Best Regards</div><div>Meina Li</div></div></div></div>
</div></div>