Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
There are a few reasons for the mismatch. First, what QMP reports will only match with what the guest sees when the balloon operation has completed; if you query those values while the operation is in-flight they will most probably not match. Secondly, you should check MemTotal in the guest and not MemFree.
Created attachment 890657 [details] monitor.log Description of problem: Boot guest with 2G memory and evict it to 1637M, guest still reported it has 3792M memory but in fact, qemu QMP monitor report it only has 1637M memory. Version-Release number of selected component (if applicable): Guest Kernel(RHEL.7.0): Kernel 3.10.0-121.el7.x86_64 on an x86_64 Qemu version: qemu-kvm-rhev-0.12.1.2-2.415.el6_5.8.x86_64 Host kernel version(RHEL.6.6): kernel-2.6.32-431.el6.x86_64 How reproducible: less than 40% Steps to Reproduce: 1. boot rhel7.0 guest with below command: /usr/bin/qemu-kvm \ -S \ -name 'virt-tests-vm1' \ -M rhel6.5.0 \ -nodefaults \ -vga cirrus \ -device AC97,bus=pci.0,addr=03 \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20140429-015011-WOPiuDUB,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140429-015011-WOPiuDUB,server,nowait \ -device isa-serial,chardev=serial_id_serial0 \ -chardev socket,id=seabioslog_id_20140429-015011-WOPiuDUB,path=/tmp/seabios-20140429-015011-WOPiuDUB,server,nowait \ -device isa-debugcon,chardev=seabioslog_id_20140429-015011-WOPiuDUB,iobase=0x402 \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=04 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.0-64-virtio.qcow2 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=05 \ -device virtio-net-pci,mac=9a:38:39:3a:3b:3c,id=id6xqG0A,vectors=4,netdev=idk6eU1g,bus=pci.0,addr=06 \ -netdev tap,id=idk6eU1g,vhost=on,vhostfd=25,fd=24 \ -m 2048 \ -smp 1,maxcpus=1,cores=1,threads=1,sockets=2 \ -cpu 'Opteron_G3' \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=c,menu=off \ -balloon virtio \ -no-kvm-pit-reinjection \ -enable-kvm 2. evict guest memory to 1637M by qmp command and monitor memory info in guest and qmp: {"execute": "balloon", "arguments": {"value": 1716518912}, "id": "Y7Urc56G"} query memory info by qmp command: {"execute": "query-balloon", "id": "fKdjsrrn"} query memory info in guest os: cat /proc/meminfo |grep MemFree Actual results: guest os reported memory value mismatch with the value reported by qmp query-balloon Expected results: guest os reported memory value match with the value reported by qmp query-balloon Additional info: host memory info: MemTotal: 3856176 kB MemFree: 2431332 kB Buffers: 94884 kB Cached: 1049796 kB SwapCached: 0 kB Active: 655204 kB Inactive: 551356 kB Active(anon): 62276 kB Inactive(anon): 0 kB Active(file): 592928 kB Inactive(file): 551356 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 58720240 kB SwapFree: 58720240 kB Dirty: 77724 kB Writeback: 0 kB AnonPages: 62040 kB Mapped: 15724 kB Shmem: 224 kB Slab: 123784 kB SReclaimable: 65812 kB SUnreclaim: 57972 kB KernelStack: 1248 kB PageTables: 4980 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 60648328 kB Committed_AS: 247540 kB VmallocTotal: 34359738367 kB VmallocUsed: 134328 kB VmallocChunk: 34359599564 kB HardwareCorrupted: 0 kB AnonHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 6976 kB DirectMap2M: 2023424 kB DirectMap1G: 2097152 kB