On 01/21/2012 03:03 AM, Ronnie Sahlberg wrote: > This patch adds configuration variables for iSCSI to set > initiator-name to use when logging in to the target, > which type of header-digest to negotiate with the target > and username and password for CHAP authentication. > > This allows specifying a initiator-name either from the command line > -iscsi initiator-name=iqn.2004-01.com.example:test > or from a configuration file included with -readconfig > [iscsi] > initiator-name = iqn.2004-01.com.example:test > header-digest = CRC32C|CRC32C-NONE|NONE-CRC32C|NONE > user = CHAP username > password = CHAP password >
Can -readconfig support reading from an inherited fd, rather than only taking a file name that qemu has to open()? That way, libvirt could create a pipe, pass in the fd with something like '-readconfig fd:nnn', then pass in the configuration data over the pipe without ever having to store the unencrypted CHAP password in an on-disk file (libvirt has mechanisms already in place for storing authentication data in a secure manner, but once libvirt has decrypted secure storage into something that qemu can consume, writing it out to a temporary file on disk defeats some of the security). > +++ b/qemu-doc.texi > @@ -730,6 +730,41 @@ export LIBISCSI_CHAP_PASSWORD=<password> > iscsi://<host>/<target-iqn-name>/<lun> > @end example > > +Various session related parameters can be set via special options, either > +in a configuration file provided via '-readconfig' or directly on the > +command line. > + > +@example > +Setting a specific initiator name to use when logging in to the target > +-iscsi initiator-name=iqn.qemu.test:my-initiator > +@end example > + > +@example > +Controlling which type of header digest to negotiate with the target > +-iscsi header-digest=CRC32C|CRC32C-NONE|NONE-CRC32C|NONE > +@end example > + > +These can also be set via a configuration file > +@example > +[iscsi] > + user = "CHAP username" > + password = "CHAP password" > + initiator-name = "iqn.qemu.test:my-initiator" > + # header digest is one of CRC32C|CRC32C-NONE|NONE-CRC32C|NONE > + header-digest = "CRC32C" > +@end example Can you give an actual command line that uses -readconfig, as part of your example? > + > +Settign the target name allows different options for different targets s/Settign/Setting/ -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature