Bug 1789647

Summary: VDSM does not report 'memoryStats' and memUsage is 0 on RHEL8 HP guest (no balloon device)
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: vdsmAssignee: Tomasz Barański <tbaransk>
Status: CLOSED CANTFIX QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.7CC: jortialc, lsurette, rbarry, srevivo, ycui
Target Milestone: ovirt-4.4.1   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-03 16:31:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Veit Michel 2020-01-10 00:57:36 UTC
Description of problem:

If a RHEL8 (without ovirt-guest-agent) VM has the Memory Balloon device disabled (either manually or by the high performance profile:

1) In Admin Portal, Memory usage of Guest is always 0% as vdsm reports memUsage as 0.
2) memoryStats are missing for the Guest, all memory stats in the API are 0 too.

See:
# vdsm-client VM getStats vmID=e0bff6bc-0f64-4264-b036-bd122e4c5f38 | egrep 'memUsage|memoryStats'
        "memUsage": "0", 

It looks like VDSM first looks for Balloon stats, and then falls back to ovirt-guest-agent. But RHEL8 does not have oga.

https://github.com/oVirt/vdsm/blob/ovirt-4.3/lib/vdsm/virt/vm.py#L1799
https://github.com/oVirt/vdsm/blob/ovirt-4.3/lib/vdsm/virt/vmstats.py#L450

So without a balloon device this is not going to work.

Also found you tried to add this to qemu-ga in the past:
https://bugzilla.redhat.com/show_bug.cgi?id=1101915

Version-Release number of selected component (if applicable):
* vdsm-4.30.38-1.el7ev.x86_64
* RHEL8 
  * qemu-guest-agent-2.12.0-88.module+el8.1.0+5013+4f99814c.1.x86_64
  * no ovirt-guest-agent

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL8 Guest
2. Disable balloon device (Edit -> Resource Allocation)
   Note: Or enabling High Performance
3. Start VM

Actual results:
Incorrect stats

Expected results:
Correct stats

Comment 2 Tomasz Barański 2020-02-03 15:16:12 UTC
At this moment balloon device driver is the only way to get memory information from libvirt. When it's disabled, there's no way to read it. The libvirt team is not particularly happy to duplicate the functionality.

Comment 4 Ryan Barry 2020-02-03 16:31:53 UTC
Closing per comment#2. Without support from the underlying tools, we cannot resolve this

Comment 5 Germano Veit Michel 2020-02-03 21:53:02 UTC
Ack, documented in https://access.redhat.com/solutions/4727081