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>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-API]do NOT support vdi_introduce and vdi_import
From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Date: Mon, 11 Jan 2010 16:13:59 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Mon, 11 Jan 2010 08:18:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1262746411.2982.98.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>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqOe3QW07Ipde71TzSGYZozwZ0ClwEXSbBQ
Thread-topic: [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