Working with resource quotas for virtual machines
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
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 least100Mi
larger than therequests.memory
value.Save the
VirtualMachine
manifest.