Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FE13EB84 for ; Wed, 27 Feb 2013 01:44:01 +0000 (UTC) Received: (qmail 92982 invoked by uid 500); 27 Feb 2013 01:44:00 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 92935 invoked by uid 500); 27 Feb 2013 01:44:00 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 92927 invoked by uid 99); 27 Feb 2013 01:44:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2013 01:44:00 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of mike.tutkowski@solidfire.com does not designate 209.85.219.48 as permitted sender) Received: from [209.85.219.48] (HELO mail-oa0-f48.google.com) (209.85.219.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2013 01:43:55 +0000 Received: by mail-oa0-f48.google.com with SMTP id j1so89932oag.7 for ; Tue, 26 Feb 2013 17:43:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=MzznWVFdL3U0QjmogKm/a0tjWHQhYZZBwHoKH8qreJ4=; b=kq+OPdmGXeUUXnQlrzPjWlLvglLC85HbyJWK5HyRViCkjFdqd/4TQarvsuMcxits6D cpuSVCocOIcFLvnq9kEYrZccc9Qfc0JwuqkWLRmAZayRaYGZiARpuqHeEqJ8cu0/QTES rohTS4ts9xC8O//LZXyL4HaZxRChMqpgpT94X6LQax5gOD2BcbLUpzpx0zvQs2mhV/XU d2GiKnfaOd0kt0p3BE5qQgDsKoZUvQs5+WY8HCwlCB63v7/HSGvcFFMrMm9k7AHFKHag RMstHYZoKFfInne2i+XtmWQMOK+mXt6i3FbHO4f8/Q0KkS9Z17mP6u16yFIvBDs4bZsY gOaQ== MIME-Version: 1.0 X-Received: by 10.60.22.34 with SMTP id a2mr378030oef.97.1361929414955; Tue, 26 Feb 2013 17:43:34 -0800 (PST) Received: by 10.182.146.5 with HTTP; Tue, 26 Feb 2013 17:43:34 -0800 (PST) In-Reply-To: References: Date: Tue, 26 Feb 2013 18:43:34 -0700 Message-ID: Subject: Re: XAPI Create iSCSI SR Question From: Mike Tutkowski To: "cloudstack-dev@incubator.apache.org" , Alex Huang Content-Type: multipart/alternative; boundary=e89a8fb205e4fced4604d6aae60b X-Gm-Message-State: ALoCoQmnScfNq/ZazldAAjZXb3Kg4fxjhDjBsoBKMxhGwsg6JCl9FK74NkYkdaskR83TjAP84nKt X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb205e4fced4604d6aae60b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hey Alex, Thanks for the suggestion. I used xe and found out (through the docs) that my contextType (String variable) should have been equal to "user". Once I made that change, it all worked. On Tue, Feb 26, 2013 at 5:54 PM, Mike Tutkowski < mike.tutkowski@solidfire.com> wrote: > We do allow for the creation of a Primary Storage in CS based on a > pre-existent Storage Repository, so I should be able to track down where > that happens. > > I think we even include the XAPI source code for the SR class that does > this. > > > On Tue, Feb 26, 2013 at 5:39 PM, Mike Tutkowski < > mike.tutkowski@solidfire.com> wrote: > >> I've heard of the xe CLI...I should look into that more. >> >> Thanks >> >> >> On Tue, Feb 26, 2013 at 5:21 PM, Alex Huang wrote= : >> >>> Mike, >>> >>> It's been a while since I'ved the XenServer XAPI apis so I don't know >>> for sure what you've set is correct. However, I can point out that the= way >>> I normally debug these things is I used the xe command line tool to fir= st >>> create the iscsi SR. And then I look at the SR parameters and then try= to >>> configure it with the java api to make the SR look the same. It's much >>> easier to figure it out this way. >>> >>> --Alex >>> >>> > -----Original Message----- >>> > From: Mike Tutkowski [mailto:mike.tutkowski@solidfire.com] >>> > Sent: Tuesday, February 26, 2013 3:26 PM >>> > To: cloudstack-dev@incubator.apache.org >>> > Subject: XAPI Create iSCSI SR Question >>> > >>> > Hi, >>> > >>> > I'm totally new to using the Xen Management API. >>> > >>> > I'm working on a little project where I create an iSCSI volume, then = a >>> Storage >>> > Repository based on the volume, then a Primary Storage based on the S= R. >>> > >>> > When running the code below (hard coding the info that's asked for), = I >>> > receive the following exception (*bolded*): >>> > >>> > *"The request is missing or has an incorrect target IQN parameter" >>> (id=3D65) >>> > * >>> > >>> > ** >>> > >>> > ** >>> > >>> > ** >>> > >>> > *0* >>> > >>> > *10.0.3.15* >>> > >>> > *iqn.2013-01.com.solidfire:volume-1* >>> > >>> > ** >>> > >>> > ** >>> > >>> > *1* >>> > >>> > *192.168.56.7* >>> > >>> > *iqn.2013-01.com.solidfire:volume-1* >>> > >>> > ** >>> > >>> > ** >>> > >>> > *2* >>> > >>> > *192.168.56.7* >>> > >>> > *** >>> > >>> > ** >>> > >>> > ** >>> > >>> > Connection connection =3D new Connection(new >>> > URL("http://192.168.56.9" >>> > )); >>> > >>> > Session.loginWithPassword(connection, "root", "password", >>> > APIVersion.latest().toString()); >>> > >>> > Host host =3D (Host)Host.getAll(connection).toArray()[0]; >>> > >>> > Map deviceConfig =3D new HashMap>> String>(); >>> > >>> > >>> > deviceConfig.put("target", "192.168.56.7"); // the IP address >>> of the box >>> > hosting the iSCSI target >>> > >>> > deviceConfig.put("targetiqn", >>> "iqn.2013-01.com.solidfire:volume-1"); >>> > // the IQN >>> > >>> > deviceConfig.put("SCSIid", >>> > "14945540000000000174363735d33eaa0b2066de99378683d"); // the SCSI ID >>> > >>> > final long size =3D 0; // Not sure if I need a "real" value h= ere? >>> > >>> > final String name =3D "Test iSCSI SR"; >>> > >>> > final String desc =3D "Created =3D " + new Date().toString(); >>> > >>> > final String type =3D "lvmoiscsi"; >>> > >>> > final String contentType =3D "unused"; // Not sure if I need = a >>> "real" >>> > value here? >>> > >>> > final boolean shared =3D true; >>> > >>> > SR.create(connection, host, deviceConfig, size, name, desc, >>> type, >>> > contentType, shared, new HashMap()); Thanks for any >>> > assistance here! :) >>> > >>> > -- >>> > *Mike Tutkowski* >>> > *Senior CloudStack Developer, SolidFire Inc.* >>> > e: mike.tutkowski@solidfire.com >>> > o: 303.746.7302 >>> > Advancing the way the world uses the >>> > cloud >>> > *(tm)* >>> >> >> >> >> -- >> *Mike Tutkowski* >> *Senior CloudStack Developer, SolidFire Inc.* >> e: mike.tutkowski@solidfire.com >> o: 303.746.7302 >> Advancing the way the world uses the cloud >> *=99* >> > > > > -- > *Mike Tutkowski* > *Senior CloudStack Developer, SolidFire Inc.* > e: mike.tutkowski@solidfire.com > o: 303.746.7302 > Advancing the way the world uses the cloud > *=99* > --=20 *Mike Tutkowski* *Senior CloudStack Developer, SolidFire Inc.* e: mike.tutkowski@solidfire.com o: 303.746.7302 Advancing the way the world uses the cloud *=99* --e89a8fb205e4fced4604d6aae60b--