[libvirt] Virtual disk size associated with a Domain

IKI-サガル バルウェ sagar.barve at ikic.co.jp
Mon Jun 14 08:15:26 UTC 2010


Thanks Daniel,

> In 0.8.1 we added a virDomainGetBlockInfo API that will give you this
> data directly.
I am currently using libvirt 0.6.3. Is there a way to do it in this version.
If it is not at all possible in 0.6.3, and only possible from 0.8.1 onwards,
then I will upgrade to 0.8.1. Because for the version upgrade, I will have
to clearly explain to my client the reason why we need to upgrade.

So, If I can fetch the same info as "virDomainGetBlockInfo" in 0.6.3 in some
other way, that would be just awesome. Or if I can calculate the disk size
from any other parameters, then please guide me on that also.
Please help.

Thanks and Regards
Sagar Barve

----- Original Message ----- 
From: "Daniel P. Berrange" <berrange at redhat.com>
To: "IKI-サガル バルウェ" <sagar.barve at ikic.co.jp>
Cc: <libvir-list at redhat.com>
Sent: Friday, June 11, 2010 6:43 PM
Subject: Re: [libvirt] Virtual disk size associated with a Domain


> On Fri, Jun 11, 2010 at 06:09:19PM +0900, IKI-サガル バルウェ wrote:
>> Hello,
>>
>> Is there any way to fetch the size of all the virtual disks associated
>> with
>> a Domain??
>>
>> I could not find one in the libvirt API., I tried using 'virStorageVol'
>> and
>> 'virStoragePool', but they returned null objects.
>> Also I fetched 'virDomainBlockStats', but did not understand the
>> information
>> returned. i.e. 'rd_bytes' and 'wr_bytes'. Can we use this info for
>> calculating the disk sizes?
>
> In 0.8.1 we added a virDomainGetBlockInfo API that will give you this
> data directly.
>
>> Also, What does the size of the "img" file for a Domain represent? Is it
>> the
>> disc size?
>
> virDomainGetBlockInfo gives both several sizes - see the header file
> comments for a description of what each means.
>
>
> Daniel
> -- 
> |: Red Hat, Engineering, London    -o-
> http://people.redhat.com/berrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org -o-
> http://deltacloud.org :|
> |: http://autobuild.org        -o-
> http://search.cpan.org/~danberr/ :|
> |: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B
> 9505 :|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100614/3290d8a2/attachment-0001.htm>


More information about the libvir-list mailing list