[libvirt] [PATCH v2 0/7] optionally expose disk usage during dumpxml

Daniel P. Berrange berrange at redhat.com
Tue Nov 18 16:42:24 UTC 2014


On Tue, Nov 18, 2014 at 04:38:49PM +0000, Daniel P. Berrange wrote:
> On Tue, Nov 18, 2014 at 06:31:46AM -0700, Eric Blake wrote:
> > v1 was here:
> > https://www.redhat.com/archives/libvir-list/2014-September/msg01077.html
> > 
> > This adds the framework for exposing disk of all disks from a single
> > dumpxml command.  I'm still working on a followup patch to further
> > list usage of disks in the backing chain, rather than just the
> > top-level disk, but want to get review started on this code.
> 
> I'm not really convinced that exposing disk allocation/capacity
> information in the XML is appropriate. The XML is intended as a
> representation of the guest hardware API and the host configuration.
> 
> The disk allocation/capacity info is neither of those things - it
> is a statistic about the current state of the system. THis is
> something that we'd usually report via dedicated APIs not the
> XML.

eg, I'd expect this data to be reported by either virDomainListGetStats
or virDomainBlockStatsFlags, not in the XML document. I think this would
be better for programs wanting to use this data too. They are going to
want to poll on this information reasonably frequently, so it makes no
sense to incur the overhead of formatting & parsing the entire domain
XML which will not be changing, just to get the disk stats which will
be changing.


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




More information about the libvir-list mailing list