[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] esx_storage_driver: Add API to upload volumes (virStorageVolUpload for ESX storage driver)



2012/6/30 Ata Bohra <ata husain hotmail com>:
> Patch to add API to upload Volume contents using ESX driver. As stream
> driver is not supported for ESX, I have used libcurl to transfer the volume,
> second, using flags here to pass
> file descriptor of the source file.

This might work for your testing but cannot be included into the
official libvirt repo because you're not implementing the upload
function correctly. You abused the flags to pass a file descriptor
instead of correctly implementing a stream driver for ESX.

I can see why you did this. A libcurl based stream driver is not that
simple. I know that because I already implemented one for the download
part.

Another problem is that your approach doesn't support the default VMDK
style used by ESX. ESX uses separate files for metadata and content:

foobar.vmdk - metadata file
foobar-flat.vmdk - content file

The problem here with libvirt is that it's storage concept assume that
a file based volume is exactly represented by one file. So this
doesn't work here.

As I mentioned I already have a libcurl based stream driver for the
download part ready. I didn't complete this work yet (and that's why
it is not yet published) because I need to resolve the two-file
problem first.

So, give me a day or two to finish this and also implement the upload part.

Matthias


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]