This is a cache of https://docs.openshift.com/rosa/virt/virtual_machines/advanced_vm_management/virt-working-with-resource-quotas-for-vms.html. It is a snapshot of the page at 2024-11-25T03:27:39.569+0000.
Working with resource quotas for virtual machines - Virtual machines | Virtualization | Red Hat OpenShift <strong>service</strong> on AWS
×

Create and manage resource quotas for virtual machines.

Setting resource quota limits for virtual machines

Resource quotas that only use requests automatically work with virtual machines (VMs). If your resource quota uses limits, you must manually set resource limits on VMs. Resource limits must be at least 100 MiB larger than resource requests.

Procedure
  1. Set limits for a VM by editing the VirtualMachine manifest. For example:

    apiVersion: kubevirt.io/v1
    kind: VirtualMachine
    metadata:
      name: with-limits
    spec:
      running: false
      template:
        spec:
          domain:
    # ...
            resources:
              requests:
                memory: 128Mi
              limits:
                memory: 256Mi  (1)
    1 This configuration is supported because the limits.memory value is at least 100Mi larger than the requests.memory value.
  2. Save the VirtualMachine manifest.