[virt-tools-list] Obtaining usable output from virDomainMemoryStats()

Eric Blake eblake at redhat.com
Mon May 13 17:09:04 UTC 2013


On 05/11/2013 10:19 AM, Tadej Janež wrote:
> On Sat, 2013-05-11 at 11:50 -0400, Cole Robinson wrote: 
>>>
>>
>> Hmm, qemu doesn't seem to be reporting this info? I'm on F19 with latest
>> libvirt and qemu 1.4.1
> 
>> sudo virsh qemu-monitor-command --hmp f18 "info balloon"
>> balloon: actual=2048
> 
> I get a similar output for this command on my machine:
> balloon: actual=1024
> 
> The version of qemu that I'm using is qemu-kvm-1.2.2-11.fc18.x86_64.
> 
>> Not sure what the problem is...
> 
> Me neither. Maybe someone else on the list has some clues?

qemu can't provide guest stats without guest interaction, but waiting
for guest interaction is a security hole (a non-cooperative guest can
refuse to acknowledge the request, and thus block qemu and libvirt from
doing useful work on other guests).  Therefore, ever since qemu 0.15 or
so, the 'info balloon' command was intentionally crippled so as to plug
the security hole, so that the information it reports is now only what
qemu can report without guest interaction.

There is work underway to switch to an event-based solution - where qemu
periodically asks the guest but without blocking, the guest informs qemu
when it wants, and where libvirt can then query the most recent guest
information (if any) without blocking, which works to remove the hole of
a non-cooperative guest stopping progress.  But until libvirt been has
wired up to use the new QMP querying commands for those properties (and
for that matter, until you are using a qemu new enough), there's no way
for libvirt to report a stat that qemu doesn't provide.

https://lists.gnu.org/archive/html/qemu-devel/2013-01/msg04832.html

I couldn't (quickly) find an open bugzilla against libvirt requesting
that it start using the qom-get command on new-enough qemu, in order to
get guest memory stat reporting back operational.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130513/35e20abc/attachment.sig>


More information about the virt-tools-list mailing list