From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaQ83-0003lL-Ur for qemu-devel@nongnu.org; Fri, 11 Sep 2015 11:20:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaQ82-0003Tb-Sz for qemu-devel@nongnu.org; Fri, 11 Sep 2015 11:20:43 -0400 References: <1441951252-13439-1-git-send-email-famz@redhat.com> From: Eric Blake Message-ID: <55F2F141.3000809@redhat.com> Date: Fri, 11 Sep 2015 09:20:33 -0600 MIME-Version: 1.0 In-Reply-To: <1441951252-13439-1-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R3LsB4RC74E03t0pM1Q8HGtta6ALBTFuq" Subject: Re: [Qemu-devel] [PATCH] iscsi: Add chap and "initiator-name" etc as per drive options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Peter Lieven , Ronnie Sahlberg , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R3LsB4RC74E03t0pM1Q8HGtta6ALBTFuq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/11/2015 12:00 AM, Fam Zheng wrote: > Previously we use "-iscsi id=3Dtarget-iqn,user=3Dfoo,password=3Dbar,...= " to > specify iscsi connection parameters, unfortunately it doesn't work with= > qemu-img. >=20 > This patch adds per drive options to iscsi driver so that at least > qemu-img can use the "json:{...}" filename magic. >=20 > Signed-off-by: Fam Zheng > --- > block/iscsi.c | 83 +++++++++++++++++++++++++++++++++++++++++++++------= -------- > 1 file changed, 64 insertions(+), 19 deletions(-) It would be nice to also add a matching BlockdevOptionsIscsi to qapi/block-core.json, to allow setting these structured options from QMP. Separate patch is fine, but we need to do the work for ALL of the remaining block devices eventually, and now that you are structuring the command line is a good time to think about it. > static void iscsi_nop_timed_event(void *opaque) > @@ -1229,6 +1253,27 @@ static QemuOptsList runtime_opts =3D { > .name =3D "filename", > .type =3D QEMU_OPT_STRING, > .help =3D "URL to the iscsi image", > + },{ > + .name =3D "user", > + .type =3D QEMU_OPT_STRING, > + .help =3D "username for CHAP authentication to target", > + },{ > + .name =3D "password", > + .type =3D QEMU_OPT_STRING, > + .help =3D "password for CHAP authentication to target", > + },{ Also, this requires passing the password in the command line. We _really_ need to solve the problem of allowing the password to be passed via a fd or other QMP command, rather than on the command line. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --R3LsB4RC74E03t0pM1Q8HGtta6ALBTFuq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEbBAEBCAAGBQJV8vFBAAoJEKeha0olJ0Nq2Y0H+Oot/A6xXq4x0naOo3WHp2oM xFH/2vWFGcvW+aTcXy+zdf+Uk1C7q254sVrOK8FOwdpvljlGopJlP62t1NTlWDVG deLn7qIP85DDV8Gp3MyT3X25DoIi6MppVqckoGN+mvDWC6vkmY25g9uKhT57vGgw yKFVj3t1dFdXgzlFT9H0BUgfIDfrmemISiPsjpJNvHqLnpEtRAs1GX1aTTv/iamH JBEe0GidnFXQbGyz0U47WBbHzWiBH/3OXljGn8A2ElVpYygSpsJKAm6fUq1lql7B C0ciVXZRGp8OGhsDvrQDo/WCEppuGNr16z0EHzTli/twjs0akLqn1SDZCtJBrQ== =CUYw -----END PGP SIGNATURE----- --R3LsB4RC74E03t0pM1Q8HGtta6ALBTFuq--