Utility functions for Image transfer.
Download image from the glance image server.
Get size of the vmdk file that is to be downloaded for attach in spawn. Need this to create the dummy virtual disk for the meta-data file. The geometry of the disk created depends on the size.
Start the data transfer from the reader to the writer. Reader writes to the pipe and the writer reads from the pipe. This means that the total transfer time boils down to the slower of the read/write and not the addition of the two times.
Upload the snapshotted vm disk file to Glance image server.