[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] How to use iSCSI disk with Xenserver VM






On Thu, Aug 15, 2013 at 9:28 PM, Bob Ball <bob.ball@xxxxxxxxxx> wrote:

Don’t forget it – just introduce.

 

You might need to specify more parameters than you are though, and make sure they match up with vdi-param-list shows.


Thanks Bob,

You are right about additional parameters. They were sm-config:LUNid=0 sm-config:SCSIid=3600144f0ffffffff0000520c011b0001.
The disk is now available in VM and is accessible from XenCenter as well.
Is there any limit per host for max number of SRs ?  25-50 SRs (VDIs) should be an acceptable number per host.

Since the VDI is now accessible, I would see if I can write xapi hooks on VM action.

Thanks once again for your help.
 

 

Bob

 

From: Rushikesh Jadhav [mailto:2rushikeshj@xxxxxxxxx]
Sent: 15 August 2013 16:53


To: Bob Ball
Cc: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] How to use iSCSI disk with Xenserver VM

 

 

 

On Thu, Aug 15, 2013 at 1:38 PM, Bob Ball <bob.ball@xxxxxxxxxx> wrote:

After running sr-introduce, find the record for the VDI on that SR and run vdi-introduce using the details from that record.

 

This will update the managed flag so XAPI knows that it can manipulate it.

 

Actually #xe sr-create automatically creates the VDI with managed ( RO): false . If I do vdi-forget and then vdi-introduce, it fails with below error

 

# xe vdi-introduce uuid=daff8cde-029e-2c80-d2e4-a3ff012d0342 sr-uuid=43be7e37-ba1e-468b-4366-5c865ab4e1db location=daff8cde-029e-2c80-d2e4-a3ff012d0342 type=system 

Error code: SR_BACKEND_FAILURE_46

Error parameters: , The VDI is not available,

 

May be duplicate VDI uuids ?

 

#xe sr-scan re-reads the disks and register it as VDI but the managed flag stays to "false". 

The managed field is RO so I'm not able to update it.  Any ideas ?

 

Thanks.

 

Bob

 

From: Rushikesh Jadhav [mailto:2rushikeshj@xxxxxxxxx]
Sent: 14 August 2013 23:40


To: Bob Ball
Cc: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] How to use iSCSI disk with Xenserver VM

 

 

 

On Thu, Aug 15, 2013 at 3:15 AM, Bob Ball <bob.ball@xxxxxxxxxx> wrote:

I'd advise you to use sr-introduce rather than sr-create.

 

You'll have to provide a UUID, but you can generate one based on the targetIQN perhaps?

 

Hi Bob,

 

I have created the sr with type iSCSI and it has successfully created with vdi-per-LUN iSCSI. Then I created a VBD with

# xe vbd-create bootable=0 device=1 vdi-uuid=daff8cde-029e-2c80-d2e4-a3ff012d0342  vm-uuid=dc3c8f17-27bb-86e8-ee28-706ffb680dde 

c0d20cbf-58a7-b2db-a4ad-85a357129e37

but Im not able to see it inside VM. When I try to activate the VBD it throws error like

 

# xe vbd-plug uuid=c0d20cbf-58a7-b2db-a4ad-85a357129e37 

This operation cannot be performed because the system does not manage this VDI

vdi: c0d20cbf-58a7-b2db-a4ad-85a357129e37

 

# xe vbd-param-get  uuid=c0d20cbf-58a7-b2db-a4ad-85a357129e37  param-name=attachable

false (error: Api_errors.Server_error("VDI_NOT_MANAGED", _))

 

Looks familiar ?

 

 

Bob

 


From: Rushikesh Jadhav [2rushikeshj@xxxxxxxxx]
Sent: 14 August 2013 22:42


To: Bob Ball
Cc: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] How to use iSCSI disk with Xenserver VM

 

 

 

On Thu, Aug 15, 2013 at 2:57 AM, Bob Ball <bob.ball@xxxxxxxxxx> wrote:

Ah - understood.

 

 

Thanks. 

 

The iSCSI SR will of course be logged in while the SR is plugged on the host (through the PBD).

 

You could potentially use a hook script (create files called vm-pre-start and vm-post-destroy in /etc/xapi.d) to create the SR dynamically, but beyond that there isn't currently a way to only have the iSCSI target logged in when the VM is booted.

 

 

Hopefully the sr-create will not auto format the luns on every mount :)

Thanks for your help. I'll report back if any success on this.

 

Bob

 


From: Rushikesh Jadhav [2rushikeshj@xxxxxxxxx]
Sent: 14 August 2013 22:22
To: Bob Ball
Cc: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] How to use iSCSI disk with Xenserver VM

 

 

On Thu, Aug 15, 2013 at 2:31 AM, Bob Ball <bob.ball@xxxxxxxxxx> wrote:

Hi,

 

You can create an SR using the undocumented and unsupported "iscsi" type and set the device config target and targetIQN values - this will set up a single VDI which is a raw lun.

 

 

Thanks Bob but I'm looking for a generic way in which I would be storing the LUN info in VM properties other-config (MRW)  or if possible in VBD other config such that whenever VM tries to boot, the hook will login on iSCSI target and pass the device.  I think this needs be handled by blktap rather than XAPI or SMAPI, what you say ?

 

Attach that VDI to a guest and it should be what you're looking for?

 

Trying to automate it.

 

 

Thanks,

 

Bob

 


From: xen-api-bounces@xxxxxxxxxxxxx [xen-api-bounces@xxxxxxxxxxxxx] on behalf of Rushikesh Jadhav [2rushikeshj@xxxxxxxxx]
Sent: 14 August 2013 16:07
To: xen-api@xxxxxxxxxxxxx
Subject: [Xen-API] How to use iSCSI disk with Xenserver VM

Hello All,

 

Since normal Xen supports iSCSI lun as device for xvda, I would like to know its possibility with Xenserver.

 

What are the possible ways may be hacky to get it working ? 

 

Since XAPI can now support Ceph as custom drive, how hard it would be to use same for iSCSI ?  

 

From Xenserver POV, I undestood that Ceph is acting as a SR but I'm expecting to pass iSCSI lun as raw block device to VM.

 

Thanks.

 

 

 

 


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.