Add helper functions to create and query .qcow2 files via qemu-img

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add basic support for qcow2

This adds the ability to create, destroy and query .qcow2 format
files.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a list of supported formats

The list can be used to generate the capabilities (i.e. format 'x'
becomes 'FORMAT_X') and help text.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
qcow2 disks have a maximum size of 2^63 - 513

This is due to a command-line parsing artifact in qemu-img:

http://rwmj.wordpress.com/2011/10/03/maximum-qcow2-disk-size/

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Reject SR.attach with unrecognised image formats

If no default image format is provided (format=XXX) in the device_config
then we will still default to vhd.

If an unrecognised default image format is provided then we raise an
Unimplemented error.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Parse qcow2 backing file information from 'qemu-img info'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Move the disk tree handling to a separate module

I believe we can treat qcow2 images the same way as we treat
vhd files, through creating a tree where a vhd parent = a
qcow2 backing_file.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove references to 'vhd' in disk_tree.ml

Since we intend to use this code for qcow2 as well, it's confusing
to talk about 'vhd' files.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Implement snapshot and clone for qcow2

We build the same kind of tree as we do for vhd.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Implement VDI.resize for qcow2

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Return xenstore_data:format=... when we need to use a QDISK

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update to 0.9.14; update ChangeLog

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

Add qcow2 file format support