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 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 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
Show replies by date