Description of problem: [1] Created a VM with below resources.limit.memory and resources.requests.memory. ~~~ # oc get vm rhel7-forward-rook -o yaml |yq -y '.spec.template.spec.domain.resources' limits: memory: 5Gi requests: memory: 4Gi ~~~ The namespace has got Max Limit/Request Ratio for memory set to 2. ~~~ # oc describe limits Name: resource-limits Namespace: nijin-cnv Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Container cpu - 2 2 2 - Container memory - 8Gi 4Gi 4Gi 2 <<< ~~~ [2] Increased the VM memory to 5 Gi from the web UI. ~~~ Click on VM => Details => Edit CPU | Memory ~~~ This only increased the requests and not the limits. ~~~ # oc get vm rhel7-forward-rook -o yaml|yq -y '.spec.template.spec.domain.resources' limits: memory: 5Gi requests: memory: 5Gi ~~~ VM will start since the ratio is 1 less than maxLimitRequestRatio. [3] Decreased the VM memory to 2 Gi from web UI and now, the VM startup fails with the error below because the ratio is more than 2: ~~~ Click on VM => Details => Edit CPU | Memory ~~~ ~~~ 5s Warning FailedCreate virtualmachineinstance/rhel7-forward-rook (combined from similar events): Error creating pod: pods "virt-launcher-rhel7-forward-rook-f78gg" is forbidden: memory max limit to request ratio per Container is 2, but provided ratio is 2.342071 ~~~ In [2] and [3], there is no option to mention the limits. Also, it doesn't increase the limits automatically in proportion to the increase in requests. Version-Release number of selected component (if applicable): OpenShift Virtualization 4.11.0 How reproducible: 100% Steps to Reproduce: Please refer above. Actual results: Limits are not changed/no options to change the limits while increasing/decreasing the virtual machine resources from GUI Expected results: The customer is expecting to decrease/increase the limits in proportion to the increase/decrease of the requests. Additional info:
As the Epic mentioned in Comment1 is closed, https://issues.redhat.com/browse/CNV-19156 GUI QE, could test this and see if this is fixed.
(In reply to Kedar Bidarkar from comment #5) > As the Epic mentioned in Comment1 is closed, > https://issues.redhat.com/browse/CNV-19156 > > GUI QE, could test this and see if this is fixed. I could still reproduce the issue on CNV-v4.14.0.rhel9-1219, I don't see any UI work is done, so assign the bug back for further investigation.
It seems nothing can be done from UI, since the bug is still reproducible, move the bug back to virt for further investigation. Don't know what's has been done in the backend, is it something can be verified?
Hi @nashok, the backend won't resize the VM limit by design, it's up to you to decide requests and limits for the VM especially because it cannot be aware of ratio requirements like in this case. This definitely looks like a UI RFE to expose limits as well, changing bz component for them to assess the bug.