* lun:1,
* user:"username",
* password-secret:"secret-alias",
+ * initiator-name:"iqn.2017-04.com.example:client"
* }
*/
"s:transport", "tcp",
"S:user", username,
"S:password-secret", objalias,
+ "S:initiator-name", src->initiator.iqn,
NULL));
goto cleanup;
return -1;
}
+ /* Use QEMU_CAPS_ISCSI_PASSWORD_SECRET as witness that iscsi 'initiator-name'
+ * option is available, it was introduced at the same time. */
+ if (src->initiator.iqn &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("iSCSI initiator IQN not supported with this QEMU binary"));
+ return -1;
+ }
+
return 0;
}
file.target=iqn.1992-01.com.example,file.lun=0,file.transport=tcp,format=raw,\
if=none,id=drive-scsi0-0-0-0 \
-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
-drive=drive-scsi0-0-0-0,id=scsi0-0-0-0
+drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 \
+-drive file.driver=iscsi,file.portal=example.org:3260,\
+file.target=iqn.1992-01.com.example:server,file.lun=0,file.transport=tcp,\
+file.initiator-name=iqn.1992-01.com.example:client,format=raw,if=none,\
+id=drive-scsi0-0-0-1 \
+-device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=1,\
+drive=drive-scsi0-0-0-1,id=scsi0-0-0-1
</source>
<target dev='sda' bus='scsi'/>
</disk>
+ <disk type='network' device='lun'>
+ <driver name='qemu' type='raw'/>
+ <source protocol='iscsi' name='iqn.1992-01.com.example:server/0'>
+ <host name='example.org' port='3260'/>
+ <initiator>
+ <iqn name='iqn.1992-01.com.example:client'/>
+ </initiator>
+ </source>
+ <target dev='sdb' bus='scsi'/>
+ </disk>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<controller type='scsi' index='0' model='virtio-scsi'/>