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

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



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


 


Rackspace

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