Hide Forgot
Description of problem: Because of qemu-kvm temporarily disabled guest-provided-stats-on-info-ballon-monitor feature from 112-now version, in fact, libvirt qemu driver doesn't support qemudDomainMemoryStats API now, but the current source codes display it indeed support it in src/qemu/qemu_driver.c: ...... qemudDomainBlockStats, /* domainBlockStats */ qemudDomainInterfaceStats, /* domainInterfaceStats */ qemudDomainMemoryStats, /* domainMemoryStats */ qemudDomainBlockPeek, /* domainBlockPeek */ qemudDomainMemoryPeek, /* domainMemoryPeek */ qemuDomainGetBlockInfo, /* domainGetBlockInfo */ ...... So I can successfully run virsh dommemstat on active domain, however, the result is empty, which will let user very confused. If qemu-kvm doesn't support the feature on rhel6.1 release, IMHO,libvirt should raise a error information at least, it looks this: error: Unable to get memory statistics error: qemu driver currently doesn't support the feature Version-Release number of selected component (if applicable): # rpm -q libvirt libvirt-0.8.7-7.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.145.el6.x86_64 # uname -r 2.6.32-113.el6.x86_64 How reproducible: always, if qemu-kvm version is from 0.12.1.2-2.113 to now Steps to Reproduce: 1. virsh start domainname 2. virsh dommemstat domainname Actual results: return a empty value Expected results: libvirt raises a friendly prompt information Additional info: See also bug 572453
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
patch posted to upstream: http://www.redhat.com/archives/libvir-list/2011-June/msg00156.html
commit 41514f7b3e4eaa18a98976c05fab771fec4ded18 Author: Osier Yang <jyang> Date: Tue Jun 14 11:21:35 2011 +0800 qemu: Parse current balloon value returned by query_balloon Qemu once supported following memory stats which will returned by "query_balloon": stat_put(dict, "actual", actual); stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]); stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]); stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]); stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]); stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]); stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]); But it later disabled all the stats except "actual" by commit 07b0403dfc2b2ac179ae5b48105096cc2d03375a. libvirt doesn't parse "actual", so user will always see a empty result with "virsh dommemstat $domain". Even qemu haven't disabled the stats, we should support parsing "actual".
Reproduce this issue on libvirt-0.9.2-1.el6.x86_64 #virsh start rhel6 #virsh dommemstat rhel6 Return Nothing Tested this issue with: libvirt-0.9.3-1.el6 qemu-kvm-0.12.1.2-2.167.el6 kernel-2.6.32-164.el6 # virsh list --all Id Name State ---------------------------------- 1 rhel6 running # virsh dommemstat rhel6 actual 1048300 # virsh dumpxml rhel6 <domain type='kvm' id='1'> <name>rhel6</name> <uuid>f66ecb57-f669-b21a-61ab-099d28f74361</uuid> <memory>1048570</memory> <currentMemory>1048300</currentMemory> <vcpu>2</vcpu> ...................... So change the bug status to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html