Document URL: https://docs.openshift.com/container-platform/4.10/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html Section Number and Name: "Advanced Virtual Machine management" Describe the issue: ResourceQuotas do work with VMs, but they have functional limits. Specifically ResourceQuotas do not work with VMs out-of-the-box if the ResourceQUota has quota set for requests AND limits, that is because resources limits are not set on VMs by default. Suggestions for improvement: We need to cover 2 things 1. Tell that VMs work out-of-the-box with ResourceQuotas if the RQ has a quota set of requests _only_. 2. VMs will not work out-of-the-box with a ResourceQuota if the RQ has set both requests and limits OR limits only. For this to work, some mechanism or human has to set resource limits on the VM. In future this is planned to be automatic, but currently this is manual Additional information:
Thanks @ctomasko. No problem.
Hi @fdeutsch - This one's a little hard for me to understand as it's been worded. Here's what I was able to do: [NOTE] ==== You can only set `ResourceQuotas` for virtual machines if the resource quota has a set of requests. If the resource quota contains both requests and limits, the request limits on the virtual machine must be set. ==== If these terms aren't accurate, let's get together and maybe you can explain it so I can word it minimalistically. Thanks Bob
PR: https://github.com/openshift/openshift-docs/pull/48252
Direct doc preview: http://file.rdu.redhat.com/bgaydos/CNV-19689/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html
Fabian recommended: By default OpenShift Virtualization is setting CPU and memory requests on a VM, but not CPU and memory limits. Due to this you can only set requests in ResourceQuotas by default. In order to leverage requests and limits in ResourceQuota you will have to manually assign CPU and/or memory limits to a VM. Once this is done, a ResourceQuota with both requests and limits can be applied to namespaces containing VMs. I'll rephrase based on this for the next round.
I think that the following text would be more helpful to a VM owner. I suggest to drop the initial "By default " because it suggests there's a method to change the default (which we do not have). I also suggest make the text suited for the VM owner persona who has cannot make any change to the ResourceQuota imposed on them by their cluster-admin. Lastly, I think we should provide an example of a vm yaml with limits and guide how the limit should be set (150% of the request?). """ OpenShift Virtualization is setting CPU and memory requests on a VM, but not CPU and memory limits. This works well if your ResourceQuota uses only requests. However if your ResourceQuota has limits, too, you have to manually assign CPU and/or memory limits to a VM as shown in this YAML example... """
Thanks @@danken - @fdeutsch - Can you provide a YAML example to illustrate Dan's text? Thanks, Bob
Here you go ``` --- apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: with-limits spec: running: false template: spec: domain: … resources: requests: memory: 128Mi limits: memory: 256Mi # Should at least be 100Mi larger than requests ```
I will review https://github.com/openshift/openshift-docs/pull/48252 as soon as the example from Comment #10 is incorporated.
Thanks @sgott and @fdeutsch - PR: https://github.com/openshift/openshift-docs/pull/48252 Direct doc preview link: http://file.rdu.redhat.com/bgaydos/CNV-19689/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html Can you recommend a QE? Bob
Revised PR: https://github.com/openshift/openshift-docs/pull/48252 with a couple final questions for @pousley
DONE: https://github.com/openshift/openshift-docs/pull/48252