RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1271107 - The vaule of Used memory in 'virsh dominfo' is 0 when the guest is shut off
Summary: The vaule of Used memory in 'virsh dominfo' is 0 when the guest is shut off
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 07:55 UTC by lijuan men
Modified: 2016-11-03 18:26 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:26:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description lijuan men 2015-10-13 07:55:16 UTC
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

Comment 1 Peter Krempa 2015-10-13 08:53:42 UTC
Already fixed upstream:

commit 60acb38abbee1636a9cddf8d296f700d115c8f77
Author: Jim Fehlig <jfehlig>
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>

Comment 3 Luyao Huang 2016-06-01 08:42:39 UTC
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

Comment 5 errata-xmlrpc 2016-11-03 18:26:10 UTC
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


Note You need to log in before you can comment on or make changes to this bug.