Bug 2174892 - GUI should set VM memory to guest memory instead of memory requests
Summary: GUI should set VM memory to guest memory instead of memory requests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: SSP
Version: future
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.14.0
Assignee: Karel Šimon
QA Contact: zhe peng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-02 14:48 UTC by Itamar Holder
Modified: 2023-11-08 14:05 UTC (History)
5 users (show)

Fixed In Version: kubevirt-ssp-operator-rhel9-container-v4.14.0-107
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:05:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt common-templates pull 543 0 None Merged feat: replace vm.spec.template.spec.domain.resources.requests.memory … 2023-09-06 07:09:18 UTC
Red Hat Issue Tracker CNV-26378 0 None None None 2023-03-02 14:50:45 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:05:20 UTC

Internal Links: 2236545

Description Itamar Holder 2023-03-02 14:48:55 UTC
Description of problem:
Currently when choosing memory amount in the GUI console, the memory is applied to `vmi.spec.domain.resources.requests[memory]`.

This field is NOT meant to reflect the amount of memory allocated to the guest, but instead the amount of memory allocated to the virt-launcher pod (which includes virtualization infrastructure overhead in addition to the guest memory).

When users set a memory amount for VMs/VMIs, they mean to set `vmi.spec.domain.memory.guest`, which specifies the amount of memory the guest could use.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Define a VM with certain amount of memory
2. See that for this vmi `vmi.spec.domain.resources.requests[memory]` is being set with the specified amount.
3.

Actual results:
When defining a VMI with a memory amount, `vmi.spec.domain.resources.requests[memory]` field is being set.

Expected results:
When defining a VMI with a memory amount, `vmi.spec.domain.memory.guest` should be set.
`vmi.spec.domain.resources.requests[memory]` should stay empty unless the user had explicitly asked to populate it.

Comment 1 Matan Schatzman 2023-03-06 07:31:46 UTC
Hey @iholder 

Currently, our common templates still contain request.memory , I can adjust our editors and wizard to add the user adjustments of memory to memory.guest, but in the final VM/VMI object, the memory will appear in both request.memory and memory.guest - is this the desired result? imho I think our common templates should be updated to the memory.guest?

Comment 2 Itamar Holder 2023-03-08 10:30:32 UTC
Hey @mschatzm,

Thanks for bringing it into attention.
Eventually, VMs/VMIs should *only* have the guest memory field populated, unless the user explicitly populates requests[memory] field on rare cases.

So yes, our templates need to be updated so the memory request is not populated by default.

Comment 3 Guohua Ouyang 2023-08-01 05:28:36 UTC
Move the bug to SSP for updating the common templates.

Comment 4 Dominik Holler 2023-08-02 15:19:08 UTC
It would be helpful to verify this bug on a cluster with quotas enabled.

Comment 5 zhe peng 2023-09-13 07:37:53 UTC
verify with build: CNV-v4.14.0.rhel9-1912

step:
1. Define a VM with 4 GB memory from GUI
2. start vm and check VMI
...
memory:
        guest: 4Gi
...

Comment 8 errata-xmlrpc 2023-11-08 14:05:04 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 (Important: OpenShift Virtualization 4.14.0 Images security and bug fix update), 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://access.redhat.com/errata/RHSA-2023:6817


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