[libvirt] The quest for virStorageVolResize()

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Jan 26 17:07:38 UTC 2012


On Thu, Jan 26, 2012 at 12:55 PM, Daniel P. Berrange
<berrange at redhat.com> wrote:
> On Thu, Jan 26, 2012 at 04:00:10AM +0200, Zeeshan Ali (Khattak) wrote:
>> Hi everyone,
>>    In Boxes we'll need to change the size of the storage volumes (we
>> use qcow2 files) but turns out that there is no virStorageVolResize()
>> yet[1]. In my chat with Daniel on IRC, he mentioned that this would be
>> a trivial task so I thought I should try to do it myself. I've been
>> looking into this for several hours now and haven't gotten very far. I
>> guess Daniel overestimated my skills of deciphering complicated code.
>> :) Attached is my very much WIP patch that at least builds but doesn't
>> exactly work yet:
>>
>> virsh # vol-resize 'Microsoft Windows XP.qcow2' '4G' gnome-boxes
>> error: Failed to change size of volume 'Microsoft Windows XP.qcow2' to 4G
>>
>> error: this function is not supported by the connection driver:
>> virStorageVolResize
>> ---------------------
>>
>> If anyone can have a look and tell me if I'm going anywhere towards
>> the right direction and what level of indirection I'm missing here,
>> that would be awesome!
>
> You were so close !

Glad to hear. :) Thanks for the detailed advice, I should have a
reviewable patch soon.


>> diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
>> index 4ca7216..5155022 100644
>> --- a/src/libvirt_public.syms
>> +++ b/src/libvirt_public.syms
>> @@ -516,4 +516,9 @@ LIBVIRT_0.9.9 {
>>          virDomainSetNumaParameters;
>>  } LIBVIRT_0.9.8;
>>
>> +LIBVIRT_0.9.10 {
>> +    global:
>> +     virStorageVolResize;
>> +} LIBVIRT_0.9.9;
>
> I think you'll have a merge conflict if you rebase to latest
> GIT, since we pushed a couple of APIs yesterday.

I'll try not to forget to rebase on latest git master before sending
out my patch for review.


-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the libvir-list mailing list