<div dir="ltr"><div>Thanks Rich for your response.</div><div> Perhaps, this option could be passed via an environment variable and guestfish could pass it down to qemu.</div><div><br></div><div>I will file a bug requesting this feature. This is an absolutely necessary feature we would to like to have in order to make use of libguestfs in our work. Generally, what is the turnaround time for such feature requests to appear in a release? </div>
<div><br></div><div>Meanwhile, I am thinking of the following as a workaround </div><div>1. Make use of iscsi-initiator utils ( which gets installed as part of libguestfs dependency ) to establish iscsi connection</div><div>
2. This will create a device such as /dev/sdb</div><div>3. Mount the partition and execute our guestfs script as follows</div><div>guestfish -m /dev/sdb1:/ -f myscript.txt</div><div><br></div><div>Will this work without -a parameter ? </div>
<div>Any other alternative?</div><div><br></div><div>Thanks</div><div>Raghu</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 July 2014 16:02, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Jul 04, 2014 at 05:43:30PM +0530, Raghu wrote:<br>
> Hi,<br>
><br>
> I could not find any option to set iSCSI initiator iqn while using<br>
> guestfish, although the underlying qemu command has this option.<br>
> It appears that each time guestfish tries to connect to iSCSI LUN, a<br>
> randomly generated initiator iqn is being used. This is preventing<br>
> guestfish to connect to the iSCSI target in our environment as the target<br>
> allows incoming connection based on the preconfigured initiator iqn.<br>
><br>
> Is there way to set iSCSI initiator iqn with guestfish command?<br>
<br>
</div></div>At the API level, this is what is currently possible:<br>
<br>
  <a href="http://libguestfs.org/guestfs.3.html#iscsi" target="_blank">http://libguestfs.org/guestfs.3.html#iscsi</a><br>
  <a href="http://libguestfs.org/guestfs.3.html#guestfs_add_drive_opts" target="_blank">http://libguestfs.org/guestfs.3.html#guestfs_add_drive_opts</a><br>
<br>
>From my (limited) understanding of iSCSI, I believe it is the case<br>
that the target and initiator iqn's are different things.  We need to<br>
pass the `-iscsi initiator-name=<initiator-iqn>' parameter.<br>
<br>
This is not supported right now, but it's certainly something which we<br>
should add.  See also this section in the FAQ for how to supply<br>
patches or file bugs requesting new features:<br>
<br>
  <a href="http://libguestfs.org/guestfs-faq.1.html#developers" target="_blank">http://libguestfs.org/guestfs-faq.1.html#developers</a><br>
<br>
Rich.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora Windows cross-compiler. Compile Windows programs, test, and<br>
build Windows installers. Over 100 libraries supported.<br>
<a href="http://fedoraproject.org/wiki/MinGW" target="_blank">http://fedoraproject.org/wiki/MinGW</a><br>
</font></span></blockquote></div><br></div>