Red Hat Bugzilla – Bug 1271107
The vaule of Used memory in 'virsh dominfo' is 0 when the guest is shut off
Last modified: 2016-11-03 14:26:10 EDT
Description of problem: The vaule of Used memory in 'virsh dominfo' is 0 when the guest is shut off Version-Release number of selected component (if applicable): kernel-3.10.0-322.el7.x86_64 qemu-kvm-1.5.3-104.el7.x86_64 libvirt-1.2.17-13.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. create a guest named rhel7 2. #virsh destroy rhel7 3. #virsh dumpxml rhel7 ******* <memory unit='KiB'>4194300</memory> <currentMemory unit='KiB'>1024857</currentMemory> ******* 4. #virsh dominfo rhel7 ******* Max memory: 4194300 KiB Used memory: 0 KiB ******* Actual results: the vaule of Used memory in step4 is 0,that is not the same as the value of currentMemory in step 3 Expected results: the vaule of Used memory in step4 is the same as the value of currentMemory in step 3
Already fixed upstream: commit 60acb38abbee1636a9cddf8d296f700d115c8f77 Author: Jim Fehlig <jfehlig@suse.com> Date: Mon Aug 10 12:49:55 2015 -0600 Revert "LXC: show used memory as 0 when domain is not active" This reverts commit 1ce7c1d20cfd5afb26d2dbc88201085d52415d0e, which introduced a significant semantic change to the virDomainGetInfo() API. Additionally, the change was only made to 2 of the 15 virt drivers. Conflicts: src/qemu/qemu_driver.c Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Verify this bug with libvirt-1.3.4-1.el7.x86_64: 1. prepare a inactive guest: # virsh list --all Id Name State ---------------------------------------------------- - rhel7.0-rhel shut off 2. check guest current memory: # virsh dumpxml rhel7.0-rhel <domain type='kvm'> <name>rhel7.0-rhel</name> <uuid>67c7a123-5415-4136-af62-a2ee098ba6cd</uuid> <maxMemory slots='16' unit='KiB'>15243264</maxMemory> <memory unit='KiB'>1818624</memory> <currentMemory unit='KiB'>1798144</currentMemory> 3. check dominfo output: # virsh dominfo rhel7.0-rhel Id: - Name: rhel7.0-rhel UUID: 67c7a123-5415-4136-af62-a2ee098ba6cd OS Type: hvm State: shut off CPU(s): 12 Max memory: 1818624 KiB Used memory: 1798144 KiB Persistent: yes Autostart: disable Managed save: no Security model: selinux Security DOI: 0
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. https://rhn.redhat.com/errata/RHSA-2016-2577.html