Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prototype vhd-format VDI.{import,export} #1832

Merged
merged 14 commits into from
Jul 23, 2014

Conversation

johnelse
Copy link
Contributor

We add 'xe vdi-export' to the existing 'xe vdi-import' (still using HTTP GET and PUT underneath). We support format=raw as well as format=vhd. We support import and export of delta disks. For good measure we include a nice progress bar for the CLI.

The actual .vhd processing is offloaded to the vhd-tool utility.

Backported from #1782

David Scott and others added 14 commits July 20, 2014 17:50
  xe vdi-export uuid=<VDI> filename=<filename>

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit c1f8bf5)
Note we now send 'PrintStderr' commands to the CLI while it is busy
downloading or uploading disk images. A multithreaded CLI is necessary
for this to work.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 752287c)
This allows both functions to use O_DIRECT.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 7de0ede)

Conflicts:
	ocaml/xapi/OMakefile
	ocaml/xapi/import_raw_vdi.ml
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit b89c237)
…' or 'vhd'

The HTTP handler accepts an additional argument:

  GET /export_raw_vdi?vdi=<vdi>&format=<raw|vhd>...

The content-disposition HTTP header is used to suggest a useful filename, and
the content-type HTTP header is set to either application/octet-stream or
application/vhd.

The CLI accepts an optional argument:

  xe vdi-export uuid=<uuid> filename=<filename> [format=(raw|vhd)]

.vhd format export will require a newer vhd-tool (>= 0.6.5)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 59fa5ee)
$ camlp4o -printer o -no_comments ocaml/xapi/import_raw_vdi.ml | md5sum
e74faa7367f4c06d818a04fd87dfeeb5
$ git checkout HEAD^
$ camlp4o -printer o -no_comments ocaml/xapi/import_raw_vdi.ml | md5sum
e74faa7367f4c06d818a04fd87dfeeb5

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 6c16a13)

Conflicts:
	ocaml/xapi/import_raw_vdi.ml
This requires vhd-tool >= 0.6.6

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 99abc50)

Conflicts:
	ocaml/xapi/import_raw_vdi.ml
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit be7acec)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 7f60bff)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 62590b8)
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
Signed-off-by: John Else <john.else@citrix.com>
johnelse added a commit that referenced this pull request Jul 23, 2014
Add prototype vhd-format VDI.{import,export}
@johnelse johnelse merged commit d2711d8 into xapi-project:xs64bit-ring3 Jul 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant