Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1118334

Summary: RFE: qemu: support -iscsi initiator-name=
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, frolland, mbooth, ptoscano, rgs2k7
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1118305 Environment:
Last Closed: 2020-11-03 17:00:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269, 1118305    

Description Richard W.M. Jones 2014-07-10 13:07:06 UTC
+++ This bug was initially created as a clone of Bug #1118305 +++

Original description of problem (against libguestfs):

libguestfs has no means to set an explicit initiator IQN for iSCSI connections.  A default intiator IQN  ( incase of LIBGUESTFS-BACKEND=direct ) or a random IQN ( in case of libvirt backend ) is used for iSCSI connections. 
This creates problems when storage systems expect a preconfigured initiator IQN to be used while establishing iSCSI connections.

The underlying QEMU command has an option (`-iscsi initiator-name=<initiator-iqn>' to set initiator IQN string explicitly. But currently libguestfs has no option to set this parameter and pass it on to QEMU.

------

To implement this fully, we will also need support in libvirt.

I posted a message to libvir-list which contains fuller details:

https://www.redhat.com/archives/libvir-list/2014-July/thread.html#00281

Comment 1 Cole Robinson 2016-04-10 19:04:03 UTC
Since this is a global setting and not a per-disk setting, figuring out what the XML would look like is a bit tricky since we probably need a new top level element like <domain> <iscsi XXX/> </domain> or similar

Comment 2 Pino Toscano 2016-04-11 09:00:41 UTC
Theoretically qemu allows to set per-drive iscsi properties, although the system for this does not work for IQNs containing colons:
http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg06501.html
http://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg00025.html (continuation of the above)

I'm currently playing with qemu's -drive to allow settings better per-drive iscsi properties.

Comment 3 Richard W.M. Jones 2016-04-11 09:47:00 UTC
(In reply to Pino Toscano from comment #2)
> Theoretically qemu allows to set per-drive iscsi properties, although the
> system for this does not work for IQNs containing colons:
> http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg06501.html
> http://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg00025.html
> (continuation of the above)
> 
> I'm currently playing with qemu's -drive to allow settings better per-drive
> iscsi properties.

Can't you use a json: URL to specify an IQN with a colon in it?

Search the qemu man page for "json:" for examples.

Comment 4 Daniel Berrangé 2020-11-03 17:00:02 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.