[libvirt] The quest for virStorageVolResize()

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Jan 26 02:00:10 UTC 2012


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!

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

[1] Yes, I know there is a virDomainBlockResize but thats limited to
running domains and I haven't yet figured if it can be nicely binded
in libvirt-glib. Probably we'll want one function in libvirt-glib that
will abstract both virDomainBlockResize() and virStorageVolResize().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt+StorageVolResize.patch
Type: text/x-patch
Size: 14956 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120126/d37f7cc1/attachment-0001.bin>


More information about the libvir-list mailing list