[libvirt] Getting memory usage info for domains with balloon driver disabled

Daniel P. Berrangé berrange at redhat.com
Wed Jan 15 14:52:11 UTC 2020


On Wed, Jan 15, 2020 at 03:45:50PM +0100, Tomasz Barański wrote:
> Hello,
> 
> I'm looking for a way to read guest memory usage information (RAM used,
> RAM available) for VMs with balloon driver disabled.
> 
> oVirt used to read that information using ovirt guest agent, but OGA is no
> longer used (and not even available for RHEL8).
> 
> I've seen that there was a discussion about adding it to the QEMU guest
> agent a couple years back[1] but it has not been implemented.
> 
> dominfo doesn't help:
> 
>     # virsh dominfo 306c001c-f569-4afa-b024-81135c566a73 | grep memory
>     Max memory:     1048576 KiB
>     Used memory:    1048576 KiB
> 
> dommemstat doesn't help:
> 
>     # virsh dommemstat 306c001c-f569-4afa-b024-81135c566a73
>     rss 1049432
> 
> Neither does domstats.
> 
> Is there any other way to get the info?

The balloon driver is the only thing that libvirt is able to use
for this purpose.

If you need the functionality the balloon driver provides, why
are you disabling the balloon driver in the guest ? It doesn't
really make sense to re-implement the logic again in the guest
agent, when the balloon driver is already capable of providing
this information.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list