Skip to content

Commit 630f75c

Browse files
committed
Merge pull request #74 from djs55/importexport
Import/export: document use_compression
2 parents 1e3f8a8 + 01d261d commit 630f75c

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

xen-api/importexport.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ title: VM import/export
33
layout: default
44
---
55

6-
VMs can be exported to a file and later imported to any XenServer host. The export protocol is a simple HTTP(S) GET, which should be performed on the master if the VM is on a pool member. Authorization is either standard HTTP basic authentication, or if a session has already been obtained, this can be used. The VM to export is specified either by UUID or by reference. To keep track of the export, a task can be created and passed in using its reference. The request might result in a redirect if the VM's disks are only accessible on a pool member.
7-
8-
The following arguments are passed on the command line:
9-
10-
Argument | Description
11-
------------|---------------------------------------------------------
12-
session_id | the reference of the session being used to authenticate; required only when not using HTTP basic authentication
13-
task_id | the reference of the task object with which to keep track of the operation; optional, required only if you have created a task object to keep track of the export
14-
ref | the reference of the VM; required only if not using the UUID
15-
uuid | the UUID of the VM; required only if not using the reference
6+
VMs can be exported to a file and later imported to any Xapi host. The export
7+
protocol is a simple HTTP(S) GET, which should be sent to the Pool master.
8+
Authorization is either via a pre-created `session_id` or by HTTP basic
9+
authentication (particularly useful on the command-line).
10+
The VM to export is specified either by UUID or by reference. To keep track of
11+
the export, a task can be created and passed in using its reference. Note that
12+
Xapi may send an HTTP redirect if a different host has better access to the
13+
disk data.
14+
15+
The following arguments are passed as URI query parameters or HTTP cookies:
16+
17+
Argument | Description
18+
----------------|---------------------------------------------------------
19+
session_id | the reference of the session being used to authenticate; required only when not using HTTP basic authentication
20+
task_id | the reference of the task object with which to keep track of the operation; optional, required only if you have created a task object to keep track of the export
21+
ref | the reference of the VM; required only if not using the UUID
22+
uuid | the UUID of the VM; required only if not using the reference
23+
use_compression | an optional boolean "true" or "false" (defaulting to "false"). If "true" then the output will be gzip-compressed before transmission.
1624

1725

1826
For example, using the Linux command line tool cURL:
@@ -33,6 +41,9 @@ restore | if `true`, the import is treated as replacing the original VM - th
3341
force | if `true`, any checksum failures will be ignored (the default is to destroy the VM if a checksum error is detected)
3442
sr_id | the reference of an SR into which the VM should be imported. The default behavior is to import into the `Pool.default_SR`
3543

44+
Note there is no need to specify whether the export is compressed, as Xapi
45+
will automatically detect and decompress gzip-encoded streams.
46+
3647
For example, again using cURL:
3748

3849
```sh

0 commit comments

Comments
 (0)