[Libguestfs] iSCSI initiator iqn
Richard W.M. Jones
rjones at redhat.com
Sun Jul 6 19:09:47 UTC 2014
On Sun, Jul 06, 2014 at 11:07:42PM +0530, Raghu wrote:
> Thanks Rich for your response.
See also:
https://www.redhat.com/archives/libvir-list/2014-July/msg00281.html
> Perhaps, this option could be passed via an environment variable and
> guestfish could pass it down to qemu.
If you're using the 'direct' backend then environment variables get
passed along to qemu unmodified, so you could use a qemu wrapper
script which parses the environment variable and adds the appropriate
'-iscsi ...' flag.
http://libguestfs.org/guestfs.3.html#backend
http://libguestfs.org/guestfs.3.html#qemu-wrappers
The 'direct' backend is the default upstream, and in every distro
except Fedora/RHEL. Fedora >= 18 & RHEL >= 7 now default to the
'libvirt' backend, but you can switch them to use the direct backend
by setting a single environment variable.
http://libguestfs.org/guestfs.3.html#environment-variables
While it's possible to use hacks like this, it's better to fix the API
properly in the long term, so please do still file an RFE bug.
> 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?
Please file the bug - I'll have a look at it when I can, but it
wouldn't be available as a new feature in a stable release before
version 1.28 (which is due in about 2-3 months from now).
http://libguestfs.org/guestfs.3.html#libguestfs-version-numbers
> Meanwhile, I am thinking of the following as a workaround
> 1. Make use of iscsi-initiator utils ( which gets installed as part of
> libguestfs dependency ) to establish iscsi connection
> 2. This will create a device such as /dev/sdb
> 3. Mount the partition and execute our guestfs script as follows
> guestfish -m /dev/sdb1:/ -f myscript.txt
>
> Will this work without -a parameter ?
> Any other alternative?
qemu wrapper is going to be much simpler -- see above.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list