On Tue, Mar 08, 2011 at 09:21:15AM -0500, Cole Robinson wrote:
On 03/08/2011 04:31 AM, Daniel P. Berrange wrote:
> On Mon, Mar 07, 2011 at 02:50:12PM -0500, Cole Robinson wrote:
>> On 02/22/2011 08:23 AM, Daniel P. Berrange wrote:
>>> This patch series introduces two new APIs to allow data upload/download
>>> to/from storage volumes, using the streams APIs. Mostly I wrote this so
>>> I had an easier way to test the streams handling in my RPC patch series
>>> than using QEMU tunnelled migration code. Cole has expressed an interest
>>> in this kind of functionality in the past to allow virt-manager to upload
>>> kernel/initrd to remote hosts for provisioning guests.
>>>
>>> Most of the code here is pretty boring & trivial. The first patch is
the
>>> one that is remotely interesting. One might argue we should just spawn
>>> 'dd' instead of this, but dd has some annoying aspects (you
can't control
>>> its write offset in units smaller than the block size) and this could be
>>> useful more broadly.
>>>
>>
>> Hmm doesn't look like any of the CreateUpload stuff is implemented? Dropped
>> from an earlier patch or just not finished yet? If that was implemented, I
>> think it would be all virt-manager would really need to facilitate URL
>> installation on remote machines.
>
> Yes, I was going to do a CreateUpload method, but then the actual impl
> in the storage driver was going to touch quite alot of code. So I dropped
> it for since, since you could do the same thing by just doing a CreateXML
> followed by Upload operation. Provided you don't pre-allocate in the
> CreatXML method it wouldn't have any negative performance hit todo the
> two separate steps.
>
So just create a 1 byte raw volume, then upload, and it will grow as
needed? Should be fine.
For portability you want to create a volume of the size you are planning
to upload, but set allocation==0, so it doesn't preallocate. This makes
it work if you want to upload to non-grow on demand volumes like LVM,
or block devices, or non-raw files
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|