Disk import/export APIs: Difference between revisions

From Xen
Jump to navigationJump to search
(Created page with "These APIs are present in the following xapi versions: * TODO To detect the presence of these APIs: * TODO: either expose a capability or suggest a "try it and see" approach = …")
 
No edit summary
Line 6: Line 6:


= Using the 'xe' CLI =
= Using the 'xe' CLI =

== Exporting a full disk image ==


The following command will export a VDI with uuid $VDI in vhd format to the local file 'full.vhd':
The following command will export a VDI with uuid $VDI in vhd format to the local file 'full.vhd':
Line 16: Line 18:
* vhd
* vhd
* raw
* raw

== Exporting only block changes/deltas ==

Assuming you have taken a VDI snapshot with a command like:

SNAPSHOT=$(xe vdi-snapshot uuid=$VDI)

You can export only the changes between the VDI and the snapshot with:

xe vdi-export uuid=$VDI base=$SNAPSHOT filename=delta.vhd format=vhd --progress

This should be a lot quicker than a full export and the output file should be smaller.

The currently supported formats are:
* vhd

Revision as of 12:43, 28 August 2014

These APIs are present in the following xapi versions:

  • TODO

To detect the presence of these APIs:

  • TODO: either expose a capability or suggest a "try it and see" approach

Using the 'xe' CLI

Exporting a full disk image

The following command will export a VDI with uuid $VDI in vhd format to the local file 'full.vhd':

 xe vdi-export uuid=$VDI filename=full.vhd format=vhd  --progress

The vhd format can be *sparse*, so if there are unallocated blocks within the VDI which xapi is aware of, they will be omitted from the vhd therefore making the vhd smaller. This should work on all current vhd-based storage types (EXT, NFS)

The currently supported formats are:

  • vhd
  • raw

Exporting only block changes/deltas

Assuming you have taken a VDI snapshot with a command like:

 SNAPSHOT=$(xe vdi-snapshot uuid=$VDI)

You can export only the changes between the VDI and the snapshot with:

 xe vdi-export uuid=$VDI base=$SNAPSHOT filename=delta.vhd format=vhd --progress

This should be a lot quicker than a full export and the output file should be smaller.

The currently supported formats are:

  • vhd