You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Mike Tutkowski <mi...@solidfire.com> on 2013/02/27 00:25:54 UTC

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
SR.

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=65)
*

*<?xml version="1.0" ?>*

*<iscsi-target-iqns>*

*<TGT>*

*<Index>0</Index>*

*<IPAddress>10.0.3.15</IPAddress>*

*<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*

*</TGT>*

*<TGT>*

*<Index>1</Index>*

*<IPAddress>192.168.56.7</IPAddress>*

*<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*

*</TGT>*

*<TGT>*

*<Index>2</Index>*

*<IPAddress>192.168.56.7</IPAddress>*

*<TargetIQN>*</TargetIQN>*

*</TGT>*

*</iscsi-target-iqns>*

        Connection connection = new Connection(new URL("http://192.168.56.9"
));

         Session.loginWithPassword(connection, "root", "password",
APIVersion.latest().toString());

         Host host = (Host)Host.getAll(connection).toArray()[0];

         Map<String, String> deviceConfig = new HashMap<String, 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 = 0; // Not sure if I need a "real" value here?

        final String name = "Test iSCSI SR";

        final String desc = "Created = " + new Date().toString();

        final String type = "lvmoiscsi";

        final String contentType = "unused"; // Not sure if I need a "real"
value here?

        final boolean shared = true;

        SR.create(connection, host, deviceConfig, size, name, desc, type,
contentType, shared, new HashMap<String, String>());
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<http://solidfire.com/solution/overview/?video=play>
*™*

Re: XAPI Create iSCSI SR Question

Posted by David Grizzanti <da...@sungard.com>.
Ok - that does help.  At least I know I'm not alone in it not working :)

I'll try to go the route of the separate XenServer instance.

Thanks!

On Mar 14, 2013, at 4:31 PM, Mike Tutkowski wrote:

> OK, just tried it on DevCloud2 and on my personally built XenServer
> instance.
> 
> DevCloud2 did not work.  It returned the error you listed (driver not
> recognised).
> 
> My XenServer instance did work.
> 
> Hope that helps!  :)
> 
> 
> On Thu, Mar 14, 2013 at 2:09 PM, Mike Tutkowski <
> mike.tutkowski@solidfire.com> wrote:
> 
>> Hi David,
>> 
>> I was able to successfully create a shared iSCSI SR on my XenServer host
>> from a Java app, but it was not using DevCloud2 (just a XenServer instance
>> I had built up on my own).
>> 
>> Let me try to run it against DevCloud2 and see what results I get.
>> 
>> Get back to you in a bit,
>> Mike
>> 
>> 
>> On Thu, Mar 14, 2013 at 1:59 PM, David Grizzanti <
>> david.grizzanti@sungard.com> wrote:
>> 
>>> Hey Mike,
>>> 
>>> I know this thread is a bit old, but I'm trying to accomplish something
>>> similar to what you were working on here and running into an issue that you
>>> may have faced.  Were you working inside DevCloud2 when you were doing this?
>>> 
>>> When trying to create the SR (inside Devcloud2), I'm hitting an issue
>>> where the 'lvmoiscsi' driver is not recognized when running 'xe sr-create'.
>>> The command I'm running for reference:
>>> 
>>> Command:
>>> xe sr-create name-label=CS-TEST-1 content-type=user
>>> device-config-target=10.133.208.69
>>> device-config-targetIQN=iqn.2010-01.com.solidfire:wien.cs-test-1.12183
>>> device-config-localIQN=iqn.1993-08.org.debian:01:5c4722894fb
>>> type=lvmoiscsi shared=true
>>> 
>>> Error:
>>> The SR could not be connected because the driver was not recognised.
>>> driver: lvmoiscsi
>>> 
>>> Did you run into anything like this?  I've googled around and it seems
>>> that some of the drivers are not included with xcp by default, but no one
>>> really had an easy solution that I could tell.
>>> 
>>> We have full Xenserver versions running in our lab that seem to have the
>>> necessary drivers, so I could just spin up a separate host if that makes
>>> this all easier, but I figured I would check first.
>>> 
>>> Thanks
>>> 
>>> --
>>> Dave
>>> On Feb 26, 2013, at 6:25 PM, Mike Tutkowski wrote:
>>> 
>>>> 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
>>>> SR.
>>>> 
>>>> 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=65)
>>>> *
>>>> 
>>>> *<?xml version="1.0" ?>*
>>>> 
>>>> *<iscsi-target-iqns>*
>>>> 
>>>> *<TGT>*
>>>> 
>>>> *<Index>0</Index>*
>>>> 
>>>> *<IPAddress>10.0.3.15</IPAddress>*
>>>> 
>>>> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>>>> 
>>>> *</TGT>*
>>>> 
>>>> *<TGT>*
>>>> 
>>>> *<Index>1</Index>*
>>>> 
>>>> *<IPAddress>192.168.56.7</IPAddress>*
>>>> 
>>>> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>>>> 
>>>> *</TGT>*
>>>> 
>>>> *<TGT>*
>>>> 
>>>> *<Index>2</Index>*
>>>> 
>>>> *<IPAddress>192.168.56.7</IPAddress>*
>>>> 
>>>> *<TargetIQN>*</TargetIQN>*
>>>> 
>>>> *</TGT>*
>>>> 
>>>> *</iscsi-target-iqns>*
>>>> 
>>>>       Connection connection = new Connection(new URL("
>>> http://192.168.56.9"
>>>> ));
>>>> 
>>>>        Session.loginWithPassword(connection, "root", "password",
>>>> APIVersion.latest().toString());
>>>> 
>>>>        Host host = (Host)Host.getAll(connection).toArray()[0];
>>>> 
>>>>        Map<String, String> deviceConfig = new HashMap<String,
>>> 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 = 0; // Not sure if I need a "real" value here?
>>>> 
>>>>       final String name = "Test iSCSI SR";
>>>> 
>>>>       final String desc = "Created = " + new Date().toString();
>>>> 
>>>>       final String type = "lvmoiscsi";
>>>> 
>>>>       final String contentType = "unused"; // Not sure if I need a
>>> "real"
>>>> value here?
>>>> 
>>>>       final boolean shared = true;
>>>> 
>>>>       SR.create(connection, host, deviceConfig, size, name, desc, type,
>>>> contentType, shared, new HashMap<String, String>());
>>>> 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<http://solidfire.com/solution/overview/?video=play>
>>>> *™*
>>> 
>>> 
>> 
>> 
>> --
>> *Mike Tutkowski*
>> *Senior CloudStack Developer, SolidFire Inc.*
>> e: mike.tutkowski@solidfire.com
>> o: 303.746.7302
>> Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play>
>> *™*
>> 
> 
> 
> 
> -- 
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*


Re: XAPI Create iSCSI SR Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
OK, just tried it on DevCloud2 and on my personally built XenServer
instance.

DevCloud2 did not work.  It returned the error you listed (driver not
recognised).

My XenServer instance did work.

Hope that helps!  :)


On Thu, Mar 14, 2013 at 2:09 PM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> Hi David,
>
> I was able to successfully create a shared iSCSI SR on my XenServer host
> from a Java app, but it was not using DevCloud2 (just a XenServer instance
> I had built up on my own).
>
> Let me try to run it against DevCloud2 and see what results I get.
>
> Get back to you in a bit,
> Mike
>
>
> On Thu, Mar 14, 2013 at 1:59 PM, David Grizzanti <
> david.grizzanti@sungard.com> wrote:
>
>> Hey Mike,
>>
>> I know this thread is a bit old, but I'm trying to accomplish something
>> similar to what you were working on here and running into an issue that you
>> may have faced.  Were you working inside DevCloud2 when you were doing this?
>>
>> When trying to create the SR (inside Devcloud2), I'm hitting an issue
>> where the 'lvmoiscsi' driver is not recognized when running 'xe sr-create'.
>>  The command I'm running for reference:
>>
>> Command:
>> xe sr-create name-label=CS-TEST-1 content-type=user
>> device-config-target=10.133.208.69
>>  device-config-targetIQN=iqn.2010-01.com.solidfire:wien.cs-test-1.12183
>>  device-config-localIQN=iqn.1993-08.org.debian:01:5c4722894fb
>> type=lvmoiscsi shared=true
>>
>> Error:
>> The SR could not be connected because the driver was not recognised.
>> driver: lvmoiscsi
>>
>> Did you run into anything like this?  I've googled around and it seems
>> that some of the drivers are not included with xcp by default, but no one
>> really had an easy solution that I could tell.
>>
>> We have full Xenserver versions running in our lab that seem to have the
>> necessary drivers, so I could just spin up a separate host if that makes
>> this all easier, but I figured I would check first.
>>
>> Thanks
>>
>> --
>> Dave
>> On Feb 26, 2013, at 6:25 PM, Mike Tutkowski wrote:
>>
>> > 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
>> > SR.
>> >
>> > 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=65)
>> > *
>> >
>> > *<?xml version="1.0" ?>*
>> >
>> > *<iscsi-target-iqns>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>0</Index>*
>> >
>> > *<IPAddress>10.0.3.15</IPAddress>*
>> >
>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>1</Index>*
>> >
>> > *<IPAddress>192.168.56.7</IPAddress>*
>> >
>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>2</Index>*
>> >
>> > *<IPAddress>192.168.56.7</IPAddress>*
>> >
>> > *<TargetIQN>*</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *</iscsi-target-iqns>*
>> >
>> >        Connection connection = new Connection(new URL("
>> http://192.168.56.9"
>> > ));
>> >
>> >         Session.loginWithPassword(connection, "root", "password",
>> > APIVersion.latest().toString());
>> >
>> >         Host host = (Host)Host.getAll(connection).toArray()[0];
>> >
>> >         Map<String, String> deviceConfig = new HashMap<String,
>> 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 = 0; // Not sure if I need a "real" value here?
>> >
>> >        final String name = "Test iSCSI SR";
>> >
>> >        final String desc = "Created = " + new Date().toString();
>> >
>> >        final String type = "lvmoiscsi";
>> >
>> >        final String contentType = "unused"; // Not sure if I need a
>> "real"
>> > value here?
>> >
>> >        final boolean shared = true;
>> >
>> >        SR.create(connection, host, deviceConfig, size, name, desc, type,
>> > contentType, shared, new HashMap<String, String>());
>> > 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<http://solidfire.com/solution/overview/?video=play>
>> > *™*
>>
>>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: XAPI Create iSCSI SR Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
Hi David,

I was able to successfully create a shared iSCSI SR on my XenServer host
from a Java app, but it was not using DevCloud2 (just a XenServer instance
I had built up on my own).

Let me try to run it against DevCloud2 and see what results I get.

Get back to you in a bit,
Mike


On Thu, Mar 14, 2013 at 1:59 PM, David Grizzanti <
david.grizzanti@sungard.com> wrote:

> Hey Mike,
>
> I know this thread is a bit old, but I'm trying to accomplish something
> similar to what you were working on here and running into an issue that you
> may have faced.  Were you working inside DevCloud2 when you were doing this?
>
> When trying to create the SR (inside Devcloud2), I'm hitting an issue
> where the 'lvmoiscsi' driver is not recognized when running 'xe sr-create'.
>  The command I'm running for reference:
>
> Command:
> xe sr-create name-label=CS-TEST-1 content-type=user
> device-config-target=10.133.208.69
>  device-config-targetIQN=iqn.2010-01.com.solidfire:wien.cs-test-1.12183
>  device-config-localIQN=iqn.1993-08.org.debian:01:5c4722894fb
> type=lvmoiscsi shared=true
>
> Error:
> The SR could not be connected because the driver was not recognised.
> driver: lvmoiscsi
>
> Did you run into anything like this?  I've googled around and it seems
> that some of the drivers are not included with xcp by default, but no one
> really had an easy solution that I could tell.
>
> We have full Xenserver versions running in our lab that seem to have the
> necessary drivers, so I could just spin up a separate host if that makes
> this all easier, but I figured I would check first.
>
> Thanks
>
> --
> Dave
> On Feb 26, 2013, at 6:25 PM, Mike Tutkowski wrote:
>
> > 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
> > SR.
> >
> > 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=65)
> > *
> >
> > *<?xml version="1.0" ?>*
> >
> > *<iscsi-target-iqns>*
> >
> > *<TGT>*
> >
> > *<Index>0</Index>*
> >
> > *<IPAddress>10.0.3.15</IPAddress>*
> >
> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> >
> > *</TGT>*
> >
> > *<TGT>*
> >
> > *<Index>1</Index>*
> >
> > *<IPAddress>192.168.56.7</IPAddress>*
> >
> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> >
> > *</TGT>*
> >
> > *<TGT>*
> >
> > *<Index>2</Index>*
> >
> > *<IPAddress>192.168.56.7</IPAddress>*
> >
> > *<TargetIQN>*</TargetIQN>*
> >
> > *</TGT>*
> >
> > *</iscsi-target-iqns>*
> >
> >        Connection connection = new Connection(new URL("
> http://192.168.56.9"
> > ));
> >
> >         Session.loginWithPassword(connection, "root", "password",
> > APIVersion.latest().toString());
> >
> >         Host host = (Host)Host.getAll(connection).toArray()[0];
> >
> >         Map<String, String> deviceConfig = new HashMap<String, 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 = 0; // Not sure if I need a "real" value here?
> >
> >        final String name = "Test iSCSI SR";
> >
> >        final String desc = "Created = " + new Date().toString();
> >
> >        final String type = "lvmoiscsi";
> >
> >        final String contentType = "unused"; // Not sure if I need a
> "real"
> > value here?
> >
> >        final boolean shared = true;
> >
> >        SR.create(connection, host, deviceConfig, size, name, desc, type,
> > contentType, shared, new HashMap<String, String>());
> > 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<http://solidfire.com/solution/overview/?video=play>
> > *™*
>
>


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: XAPI Create iSCSI SR Question

Posted by David Grizzanti <da...@sungard.com>.
Hey Mike,

I know this thread is a bit old, but I'm trying to accomplish something similar to what you were working on here and running into an issue that you may have faced.  Were you working inside DevCloud2 when you were doing this?

When trying to create the SR (inside Devcloud2), I'm hitting an issue where the 'lvmoiscsi' driver is not recognized when running 'xe sr-create'.  The command I'm running for reference:

Command:
xe sr-create name-label=CS-TEST-1 content-type=user device-config-target=10.133.208.69  device-config-targetIQN=iqn.2010-01.com.solidfire:wien.cs-test-1.12183  device-config-localIQN=iqn.1993-08.org.debian:01:5c4722894fb 
type=lvmoiscsi shared=true

Error:
The SR could not be connected because the driver was not recognised.
driver: lvmoiscsi

Did you run into anything like this?  I've googled around and it seems that some of the drivers are not included with xcp by default, but no one really had an easy solution that I could tell.

We have full Xenserver versions running in our lab that seem to have the necessary drivers, so I could just spin up a separate host if that makes this all easier, but I figured I would check first.

Thanks

--
Dave
On Feb 26, 2013, at 6:25 PM, Mike Tutkowski wrote:

> 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
> SR.
> 
> 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=65)
> *
> 
> *<?xml version="1.0" ?>*
> 
> *<iscsi-target-iqns>*
> 
> *<TGT>*
> 
> *<Index>0</Index>*
> 
> *<IPAddress>10.0.3.15</IPAddress>*
> 
> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> 
> *</TGT>*
> 
> *<TGT>*
> 
> *<Index>1</Index>*
> 
> *<IPAddress>192.168.56.7</IPAddress>*
> 
> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> 
> *</TGT>*
> 
> *<TGT>*
> 
> *<Index>2</Index>*
> 
> *<IPAddress>192.168.56.7</IPAddress>*
> 
> *<TargetIQN>*</TargetIQN>*
> 
> *</TGT>*
> 
> *</iscsi-target-iqns>*
> 
>        Connection connection = new Connection(new URL("http://192.168.56.9"
> ));
> 
>         Session.loginWithPassword(connection, "root", "password",
> APIVersion.latest().toString());
> 
>         Host host = (Host)Host.getAll(connection).toArray()[0];
> 
>         Map<String, String> deviceConfig = new HashMap<String, 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 = 0; // Not sure if I need a "real" value here?
> 
>        final String name = "Test iSCSI SR";
> 
>        final String desc = "Created = " + new Date().toString();
> 
>        final String type = "lvmoiscsi";
> 
>        final String contentType = "unused"; // Not sure if I need a "real"
> value here?
> 
>        final boolean shared = true;
> 
>        SR.create(connection, host, deviceConfig, size, name, desc, type,
> contentType, shared, new HashMap<String, String>());
> 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<http://solidfire.com/solution/overview/?video=play>
> *™*


Re: XAPI Create iSCSI SR Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
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 <Al...@citrix.com>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 first
>>> 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 SR.
>>> >
>>> > 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=65)
>>> > *
>>> >
>>> > *<?xml version="1.0" ?>*
>>> >
>>> > *<iscsi-target-iqns>*
>>> >
>>> > *<TGT>*
>>> >
>>> > *<Index>0</Index>*
>>> >
>>> > *<IPAddress>10.0.3.15</IPAddress>*
>>> >
>>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>>> >
>>> > *</TGT>*
>>> >
>>> > *<TGT>*
>>> >
>>> > *<Index>1</Index>*
>>> >
>>> > *<IPAddress>192.168.56.7</IPAddress>*
>>> >
>>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>>> >
>>> > *</TGT>*
>>> >
>>> > *<TGT>*
>>> >
>>> > *<Index>2</Index>*
>>> >
>>> > *<IPAddress>192.168.56.7</IPAddress>*
>>> >
>>> > *<TargetIQN>*</TargetIQN>*
>>> >
>>> > *</TGT>*
>>> >
>>> > *</iscsi-target-iqns>*
>>> >
>>> >         Connection connection = new Connection(new
>>> > URL("http://192.168.56.9"
>>> > ));
>>> >
>>> >          Session.loginWithPassword(connection, "root", "password",
>>> > APIVersion.latest().toString());
>>> >
>>> >          Host host = (Host)Host.getAll(connection).toArray()[0];
>>> >
>>> >          Map<String, String> deviceConfig = new HashMap<String,
>>> 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 = 0; // Not sure if I need a "real" value here?
>>> >
>>> >         final String name = "Test iSCSI SR";
>>> >
>>> >         final String desc = "Created = " + new Date().toString();
>>> >
>>> >         final String type = "lvmoiscsi";
>>> >
>>> >         final String contentType = "unused"; // Not sure if I need a
>>> "real"
>>> > value here?
>>> >
>>> >         final boolean shared = true;
>>> >
>>> >         SR.create(connection, host, deviceConfig, size, name, desc,
>>> type,
>>> > contentType, shared, new HashMap<String, String>()); 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<http://solidfire.com/solution/overview/?video=play>
>>> > *(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<http://solidfire.com/solution/overview/?video=play>
>> *™*
>>
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: XAPI Create iSCSI SR Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
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 <Al...@citrix.com> 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 first
>> 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 SR.
>> >
>> > 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=65)
>> > *
>> >
>> > *<?xml version="1.0" ?>*
>> >
>> > *<iscsi-target-iqns>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>0</Index>*
>> >
>> > *<IPAddress>10.0.3.15</IPAddress>*
>> >
>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>1</Index>*
>> >
>> > *<IPAddress>192.168.56.7</IPAddress>*
>> >
>> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *<TGT>*
>> >
>> > *<Index>2</Index>*
>> >
>> > *<IPAddress>192.168.56.7</IPAddress>*
>> >
>> > *<TargetIQN>*</TargetIQN>*
>> >
>> > *</TGT>*
>> >
>> > *</iscsi-target-iqns>*
>> >
>> >         Connection connection = new Connection(new
>> > URL("http://192.168.56.9"
>> > ));
>> >
>> >          Session.loginWithPassword(connection, "root", "password",
>> > APIVersion.latest().toString());
>> >
>> >          Host host = (Host)Host.getAll(connection).toArray()[0];
>> >
>> >          Map<String, String> deviceConfig = new HashMap<String,
>> 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 = 0; // Not sure if I need a "real" value here?
>> >
>> >         final String name = "Test iSCSI SR";
>> >
>> >         final String desc = "Created = " + new Date().toString();
>> >
>> >         final String type = "lvmoiscsi";
>> >
>> >         final String contentType = "unused"; // Not sure if I need a
>> "real"
>> > value here?
>> >
>> >         final boolean shared = true;
>> >
>> >         SR.create(connection, host, deviceConfig, size, name, desc,
>> type,
>> > contentType, shared, new HashMap<String, String>()); 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<http://solidfire.com/solution/overview/?video=play>
>> > *(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<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: XAPI Create iSCSI SR Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
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 <Al...@citrix.com> 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 first
> 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 SR.
> >
> > 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=65)
> > *
> >
> > *<?xml version="1.0" ?>*
> >
> > *<iscsi-target-iqns>*
> >
> > *<TGT>*
> >
> > *<Index>0</Index>*
> >
> > *<IPAddress>10.0.3.15</IPAddress>*
> >
> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> >
> > *</TGT>*
> >
> > *<TGT>*
> >
> > *<Index>1</Index>*
> >
> > *<IPAddress>192.168.56.7</IPAddress>*
> >
> > *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> >
> > *</TGT>*
> >
> > *<TGT>*
> >
> > *<Index>2</Index>*
> >
> > *<IPAddress>192.168.56.7</IPAddress>*
> >
> > *<TargetIQN>*</TargetIQN>*
> >
> > *</TGT>*
> >
> > *</iscsi-target-iqns>*
> >
> >         Connection connection = new Connection(new
> > URL("http://192.168.56.9"
> > ));
> >
> >          Session.loginWithPassword(connection, "root", "password",
> > APIVersion.latest().toString());
> >
> >          Host host = (Host)Host.getAll(connection).toArray()[0];
> >
> >          Map<String, String> deviceConfig = new HashMap<String,
> 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 = 0; // Not sure if I need a "real" value here?
> >
> >         final String name = "Test iSCSI SR";
> >
> >         final String desc = "Created = " + new Date().toString();
> >
> >         final String type = "lvmoiscsi";
> >
> >         final String contentType = "unused"; // Not sure if I need a
> "real"
> > value here?
> >
> >         final boolean shared = true;
> >
> >         SR.create(connection, host, deviceConfig, size, name, desc, type,
> > contentType, shared, new HashMap<String, String>()); 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<http://solidfire.com/solution/overview/?video=play>
> > *(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<http://solidfire.com/solution/overview/?video=play>
*™*

RE: XAPI Create iSCSI SR Question

Posted by Alex Huang <Al...@citrix.com>.
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 first 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 SR.
> 
> 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=65)
> *
> 
> *<?xml version="1.0" ?>*
> 
> *<iscsi-target-iqns>*
> 
> *<TGT>*
> 
> *<Index>0</Index>*
> 
> *<IPAddress>10.0.3.15</IPAddress>*
> 
> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> 
> *</TGT>*
> 
> *<TGT>*
> 
> *<Index>1</Index>*
> 
> *<IPAddress>192.168.56.7</IPAddress>*
> 
> *<TargetIQN>iqn.2013-01.com.solidfire:volume-1</TargetIQN>*
> 
> *</TGT>*
> 
> *<TGT>*
> 
> *<Index>2</Index>*
> 
> *<IPAddress>192.168.56.7</IPAddress>*
> 
> *<TargetIQN>*</TargetIQN>*
> 
> *</TGT>*
> 
> *</iscsi-target-iqns>*
> 
>         Connection connection = new Connection(new
> URL("http://192.168.56.9"
> ));
> 
>          Session.loginWithPassword(connection, "root", "password",
> APIVersion.latest().toString());
> 
>          Host host = (Host)Host.getAll(connection).toArray()[0];
> 
>          Map<String, String> deviceConfig = new HashMap<String, 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 = 0; // Not sure if I need a "real" value here?
> 
>         final String name = "Test iSCSI SR";
> 
>         final String desc = "Created = " + new Date().toString();
> 
>         final String type = "lvmoiscsi";
> 
>         final String contentType = "unused"; // Not sure if I need a "real"
> value here?
> 
>         final boolean shared = true;
> 
>         SR.create(connection, host, deviceConfig, size, name, desc, type,
> contentType, shared, new HashMap<String, String>()); 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<http://solidfire.com/solution/overview/?video=play>
> *(tm)*