Add support for receiving NBD write requests, as well as 'chunked'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
listening: set SO_REUSEADDR for convenience

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Implement Read when serving NBD

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
serve nbd: query the disk size using stat()

This allows a Linux nbd-client to mount the volume and then create
filesystems on it.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
serve: only output request info if --debug is on

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
sparse_dd: set the vhd parent search path to include the vhd's directory

We were previously using the current directory of the sparse_dd process.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Release 0.6.1

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-120439: Use Unix.LargeFile for 32-bit machines

Without this, calls to stat will fail for files larger than 4GB.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #2 from simonjbeaumont/ca-120439

CA-120439: Use Unix.LargeFile for 32-bit machines
Remove old/unused code

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-120525: Open VHD files RO where possible

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #4 from simonjbeaumont/ca-120525

Open VHD files RO where possible
Update CHANGES for 0.6.2 and 0.6.3
Merge pull request #3 from simonjbeaumont/remove-dead-code

Remove old/unused code
vhd-tool: 'serve' now accepts raw inputs as well as chunked and NBD

It will also infer the destination size using BLKGETSIZE64 since the
destination will often be a block device.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vhd-tool: in 'serve' (receiving data) open the destination read/write

Otherwise writes fail with EBADF (unsurprisingly)

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

vhd-tool serve fixes
Release 0.6.4
cli: add stub support for streaming a disk using output protocol 'tar'

This will be compatible with the XenServer VM import/export format.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add basic documentation for the XenServer tar format.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>