Remove the hardcoded disabling of ballooning for dom0

To express "don't balloon me", set the dynamic-min and dynamic-max
to the same values.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add 'xe vdi-export' for symmetry with 'xe vdi-import'

  xe vdi-export uuid=<VDI> filename=<filename>

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xe vdi-{export,import}: display a progress bar if "--progress" is given

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>
{import,export}_raw_vdi use vhd-tool via vhd_tool_wrapper

This allows both functions to use O_DIRECT.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
{import,export}_raw_vdi: update Task.progress

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
VDI.export: allow the user to specify a format; currently either 'raw' 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>
import_raw_vdi: normalise whitespace

$ 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>
import_raw_vdi: support importing vhd-format data

This requires vhd-tool >= 0.6.6

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
xe vdi-import: add support for [type=(raw|vhd)]

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
VDI.export: add /dev/mapper to the vhd parent search path

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
VDI.export: add a 'base' argument to export only VDI differences

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #1769 from djs55/smapiv2

Remove the hardcoded disabling of ballooning for dom0
CA-136885: Populates the gateway and dns fields for DHCP pifs

Signed-off-by: Ravi Pandey <ravi.pandey@citrix.com>
Merge pull request #1783 from ravippandey/ca-136885_tr3

CA-136885: Populates the gateway and dns fields for DHCP pifs
Merge pull request #1782 from djs55/forupstream/VDI.export

Not recently tested: Add prototype vhd-format VDI.{import,export}