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

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 :|


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