Check upload status more frequently
Delay closing connection until upload completes

vhd-tool will throw an exception if the connection closes early
Try multiple times to delete VDI

XAPI takes a while to release the VDI when upload is interrupted
Rename root_disk_size to disk_size

CreateVdi now takes an integer size
Note that disk_size is now in MB; root_disk_size was in bytes
Fixed example
Rename instance_name to vm_name

Fixed example
Rename instance_memory to vm_memory

Note that vm_memory is now in MB; instance_memory was in bytes
SetStaticMemoryRange now takes int64
Fixed example