WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

RE: [Xen-API]do NOT support vdi_introduce and vdi_import

To: Anthony Xu <anthony@xxxxxxxxx>
Subject: RE: [Xen-API]do NOT support vdi_introduce and vdi_import
From: Julian Chesterfield <Julian.Chesterfield@xxxxxxxxxxxxx>
Date: Mon, 11 Jan 2010 19:11:42 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 11 Jan 2010 11:11:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1263236811.2930.58.camel@mobl-ant>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <1262746411.2982.98.camel@mobl-ant> <81A73678E76EA642801C8F2E4823AD2143B8C19454@xxxxxxxxxxxxxxxxxxxxxxxxx> <DECC4DEE86A8074C9ABE8DFD330CB6E341A31F163D@xxxxxxxxxxxxxxxxxxxxxxxxx> <1263236811.2930.58.camel@mobl-ant>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqS8UAf6to5Gak5SHizHJDLGlxLSwAAIp9g
Thread-topic: [Xen-API]do NOT support vdi_introduce and vdi_import
Where did the VHD file come from? Try querying the header using the vhd-util 
tool in Dom0 to see if it's recognized as a valid VHD.

- Julian

-----Original Message-----
From: Anthony Xu [mailto:anthony@xxxxxxxxx] 
Sent: Monday, January 11, 2010 7:07 PM
To: Julian Chesterfield
Cc: Dave Scott; xen-api@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-API]do NOT support vdi_introduce and vdi_import

Thanks for all your response!
I'm using XCP 0.1 not the latest hg repos, both VDI.introduce and
SR.scan do not work. Does SR.scan work in latest repos?


Thanks,
Anthony

On Mon, 2010-01-11 at 08:20 -0800, Julian Chesterfield wrote:
> It's easier just to issue an sr-scan after adding the VHD to the repository. 
> This has the same effect as VDI.introduce.
> 
> - Julian
> 
> -----Original Message-----
> From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-api-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Dave Scott
> Sent: Monday, January 11, 2010 4:14 PM
> To: 'Anthony Xu'; xen-api@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [Xen-API]do NOT support vdi_introduce and vdi_import
> 
> Hi Anthony,
> 
> Vdi_introduce should be fairly straightforward. You have to modify the 
> storage backend (/opt/xensource/sm) to advertise the capability 
> 'VDI_INTRODUCE' and then implement the function. The semantics should be: 
> check that the disk exists on the backend storage and, if so, create the 
> database record (look for _db_introduce). If the disk doesn't exist then 
> throw an error.
> 
> The hg repos for the SM stuff are currently not online -- however this is on 
> my to-do list.
> 
> If you are using nfs then you can copy the vhd file to the nfs export and 
> then call vdi_introduce. You could also call SR.scan.
> 
> Vdi_import is trickier. There is an HTTP PUT /vdi_import (used by 'xe 
> vdi-import') but this will not preserve sparseness of the vhd file. We're 
> working on a prototype of a better (sparseness-preserving!) vhd import method 
> but this is not ready yet.
> 
> Cheers,
> Dave
> 
> 
> > -----Original Message-----
> > From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> > bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Anthony Xu
> > Sent: 06 January 2010 02:54
> > To: xen-api@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-API]do NOT support vdi_introduce and vdi_import
> > 
> > I want to use vdi_introduce or vdi_import to import pre-installed OS
> > vhd
> > file. But both nfs SR and local lvm SR do NOT support vdi_introduce and
> > vdi_import commands.
> > 
> > [root@localhost ~]# xe sr-param-list
> > uuid=884cf893-79fa-8874-b785-5cacaf295818
> > uuid ( RO)                    : 884cf893-79fa-8874-b785-5cacaf295818
> >               name-label ( RW): Local storage
> >         name-description ( RW):
> >                     host ( RO): localhost.localdomain
> >       allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug;
> > update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
> >       current-operations (SRO):
> >                     VDIs (SRO): 37c0d4b0-018c-4238-b618-2712d4bd7508;
> > b268d63b-137c-495c-b0c4-6cce0299ba86;
> > e87f19be-ab8d-4f70-bf8b-f68e93c9e9a0
> >                     PBDs (SRO): f7ce6a0f-ed5c-3f0b-0a31-5202e87a1587
> >       virtual-allocation ( RO): 42949672960
> >     physical-utilisation ( RO): 43062919168
> >            physical-size ( RO): 71802290176
> >                     type ( RO): lvm
> >             content-type ( RO): user
> >                   shared ( RW): false
> >             other-config (MRW): i18n-original-value-name_label: Local
> > storage; i18n-key: local-storage
> >                sm-config (MRO): allocation: thick; use_vhd: true;
> > devserial: scsi-SATA_Hitachi_HDS7216_PVHF04ZNR2AN5H
> >                    blobs ( RO):
> > 
> > 
> > 
> > 
> > Any idea to enable vdi_introduce or vdi_import?
> > 
> > I appreciate your help!
> > 
> > 
> > Thanks,
> > Anthony
> > 
> > 
> > 
> > _______________________________________________
> > xen-api mailing list
> > xen-api@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/mailman/listinfo/xen-api
> 
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/mailman/listinfo/xen-api


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api