Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions modules/virt-creating-vm-quotas-web.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Module included in the following assemblies:
//
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-creating-vm-quotas-web_{context}"]
= Creating virtual machine quotas using the web console

[role="_abstract"]
You can create Application Aware Quota (AAQ) quotas that limit virtual machine resource consumption by using the guided form in the {product-titles} web console. The form is the recommended approach for simple virtualization quota use cases.

.Prerequisites

* You have administrator privileges in the OpenShift cluster.
* The Application Aware Quota operator is enabled in your cluster. See xref:virt-enabling-aaq-operator_{context}[Enabling the Application Aware Quota operator].
* The project where you want to create the quota exists.

.Procedure

. In the {product-title} web console, click *Virtualization* -> *Quotas*.

. Click *Create quota*.

. In the dropdown menu, select *Create VM-specific quota*.
+
The create quota form is displayed.

. Enter a name for your quota in the *Quota name* field.
+
The name must be unique within the project.

. Select the project where you want to apply this quota.
+
By default, the current project is selected. You can click the dropdown to select a different project if needed.
+
[NOTE]
====
If a Kubernetes `ResourceQuota` already exists in the selected project, an alert is displayed with a link to view the existing ResourceQuota. You can still create the AAQ quota, but both quotas will apply to the project.
====

. Optional: Configure the vCPU allocation for virtual machines in this project.
+
In the *vCPU allocation* field, enter the maximum number of virtual CPUs permitted for all combined VMs in this project. This measurement excludes pod runtime resource consumption.

. Optional: Configure the virtual memory allocation for virtual machines in this project.
+
In the *Virtual memory allocation* field, enter the maximum memory capacity in GiB (gigabytes) permitted for all combined VMs in this project. This measurement excludes pod runtime resource consumption.

. Optional: Configure CPU allocation for VM pods.
+
In the *CPU allocation* field, enter the maximum CPU cores permitted for pods that run VM workloads. This includes both the VM and pod runtime resource consumption.

. Optional: Configure memory allocation for VM pods.
+
In the *Memory allocation* field, enter the maximum memory capacity in GiB for pods that run VM workloads. This includes both the VM and pod runtime resource consumption.

. Review the configuration and click *Create*.
+
The quota is created and you are redirected to the quota details page. The new quota is now active and enforcing resource limits on virtual machines in the selected project.

.Verification

. In the OpenShift web console, click *Virtualization* -> *Quotas*.

. In the quotas list, locate your newly created quota.

. Verify that the quota name is displayed in the list with the correct project and resource limits configured.

. Click the quota name to open its details page and confirm all settings are correct.
38 changes: 27 additions & 11 deletions modules/virt-enabling-aaq-operator.adoc
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-understanding-aaq-operator.adoc
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-enabling-aaq-operator_{context}"]
= Enabling the AAQ Operator
= Enabling the Application Aware Quota Operator

[role="_abstract"]
To deploy the AAQ Operator, set the `enableApplicationAwareQuota` field value to `true` in the `HyperConverged` custom resource (CR).
Enable the Application Aware Quota (AAQ) operator to manage resource quotas to extend native resource management capabilities. Enabling AAQ from the web console eliminates the need to manually edit the HyperConverged custom resource by using the CLI.

.Prerequisites
* You have access to the cluster as a user with `cluster-admin` privileges.
* You have installed the OpenShift CLI (`oc`).

* You have administrator privileges in the OpenShift cluster.
* The OpenShift Virtualization operator is installed and running.

.Procedure
* Set the `enableApplicationAwareQuota` field value to `true` in the `HyperConverged` CR by running the following command:

. In the OpenShift web console, click *Virtualization* -> *Overview*.

. Click the *Settings* tab.

. Under *Resource Management*, toggle the *Application Aware Quotas (AAQ)* to On.
+
The operator deployment begins automatically. The status changes from *Disabled* to *Enabled* after the operator pods are running.

. Optional: Click the *Edit* icon next to the *Quota calculation method* field to change the calculation method.
+
[source,terminal,subs="attributes+"]
----
$ oc patch {HCOCliKind} kubevirt-hyperconverged -n {CNVNamespace} \
--type json -p '[{"op": "add", "path": "/spec/enableApplicationAwareQuota", "value": true}]'
----
A modal dialog is displayed with the following options:

** *Virtual resources*: Measures only the virtual CPU and memory allocated to virtual machines (VMs), excluding pod runtime overhead. This is the default option for virtualization workloads.
** *Virtual Machine Instance (VMI) pod usage*: Measures the total virtual CPU and memory consumption of the VM pod, including both the virtual machine and pod runtime overhead.
** *Dedicated virtual resources*: Measures the virtual CPU and memory resources assigned to virtual machines and their associated pods, tracking quota usage separately for each type.

. Select your preferred quota calculation method and click *Save*.

.Verification

. Verify that a new *Quotas* option is displayed in the left navigation menu under *Virtualization*. This indicates that AAQ is ready for quota creation and management.
42 changes: 42 additions & 0 deletions modules/virt-managing-quota-details-web.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Module included in the following assemblies:
//
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-managing-quota-details-web_{context}"]
= Managing virtual machine quota details using the web console

[role="_abstract"]
The quota details page in the {product-title} web console provides information about an Application Aware Quota (AAQ), including resource limits, current usage, and visualizations of how quota capacity is being consumed.

[NOTE]
====
Cluster scoped quotas show only the YAML definition due to the complexity that these quotas require.
====

.Prerequisites

* You have administrator privileges in the OpenShift cluster.
* The Application Aware Quota operator is enabled in your cluster.
* An Application Aware Quota exists in your cluster.

.Procedure

. In the {product-title} web console, click *Virtualization* -> *Quotas*.

. Click the quota name to open the *Quota details* view.
+
The *Quota details* view displays visual indicators, quota metadata, and tabulated data:
+
* Circular utilization charts visually represent resource consumption in your project
* The *Details* element provides metadata such as the Quota name, scope, applied labels and project.
* The *Quota details* element provides a tabulated views that display the current and maximum utilization of each resource type.
+
[NOTE]
====
If a Kubernetes `ResourceQuota` also exists in the same project as this AAQ quota, an alert is displayed at the top of the details page with a link to view the ResourceQuota. Both quotas apply simultaneously to the project.
====

. Optional: Click on the *YAML* tab to review the resource configuration of the quota.

. Optional: Use the *Actions* panel to edit or delete the quota.
58 changes: 58 additions & 0 deletions modules/virt-managing-quotas-list-web.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Module included in the following assemblies:
//
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-managing-quotas-list-web_{context}"]
= Managing virtual machine quotas using the list view

[role="_abstract"]
The Application Aware Quota (AAQ) quotas page in the OpenShift web console provides a centralized view of all quotas managed by the AAQ operator. From this page, you can view quota status, usage, and perform management actions such as editing and deleting quotas.

.Prerequisites

* You have administrator privileges in the OpenShift cluster.
* The Application Aware Quota operator is enabled in your cluster.
* At least one Application Aware Quota exists in your cluster.

.Procedure

. In the OpenShift web console, click *Virtualization* -> *Quotas*.
+
The quotas list view is displayed, showing all project-scoped AAQ quotas by default.

. Click the *Cluster-scoped quotas* tab to view cluster scoped quotas.
+
This tab is displayed only if cluster-scoped quotas have been defined in your cluster.
+
[NOTE]
====
Cluster-scoped quotas can only be created or edited using YAML. The form-based creation option is not available for cluster-scoped quotas due to their complexity.
====

. To view detailed information about a specific quota, click the quota name to open the quota details page.

. To edit a quota, click the Options menu {kebab} at the end of the quota row
.. Select *Edit quota*.
+
The edit form is displayed with the current quota configuration.
.. Click *Save* after you have completed modifying the resource limits.
+
[NOTE]
====
If the quota was initially created with advanced settings via YAML, clicking *Edit quota* opens the YAML editor instead of the form.
====

. To delete a quota, click the Options menu {kebab} at the end of the quota row and select *Delete quota*. A confirmation dialog is displayed.
.. Click *Delete* to remove the quota.
+
[WARNING]
====
Deleting a quota removes all resource enforcement for the quota. Virtual machines in the affected project are no longer subject to the quota limits.
====

. To create a new quota from the list view, click *Create quota*.
.. Select an option from the dropdown menu:
+
** *Create VM-specific quota*: Opens the form-based creation experience for simple VM quota use cases.
** *Create quota for any resource*: Opens the YAML editor for advanced quota configurations that include pod limits or other resource types.
8 changes: 4 additions & 4 deletions modules/virt-setting-resource-quota-limits-for-vms.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: PROCEDURE
[id="virt-setting-resource-quota-limits-for-vms_{context}"]
= Setting resource quota limits for virtual machines
= Setting resource quota limits for virtual machines by using the CLI

[role="_abstract"]
By default, {VirtProductName} automatically manages CPU and memory limits for virtual machines (VMs) if a namespace enforces resource quotas that require limits to be set. The memory limit is automatically set to twice the requested memory and the CPU limit is set to one per vCPU.
Expand Down Expand Up @@ -48,9 +48,9 @@ spec:
+
where
+
spec.template.spec.domain.memory.guest:: Specifies the actual amount of RAM that is shown to the guest operating system (OS) in the VM.
spec.template.spec.domain.memory.guest:: Specifies the actual amount of RAM that is shown to the guest operating system in the VM.
+
spec.template.spec.domain.resources.limits.memory:: Specifies the hard limit for total memory consumption by the `virt-launcher` pod that hosts the VM. This limit must account for the guest OS RAM plus the hypervisor overhead.
spec.template.spec.domain.resources.limits.memory:: Specifies the hard limit for total memory consumption by the `virt-launcher` pod that hosts the VM. This limit must account for the guest operating system RAM plus the hypervisor runtime resource consumption.
+
This example configuration is supported because the `spec.template.spec.domain.resources.limits.memory` value is at least `100Mi` larger than the `spec.template.spec.domain.memory.guest` value.

Expand Down
30 changes: 30 additions & 0 deletions modules/virt-understanding-aaq-operator.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Module included in the following assemblies:
//
// * virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc

:_mod-docs-content-type: CONCEPT
[id="virt-understanding-aaq-operator_{context}"]
= Understanding the Application Aware Quota Operator

[role="_abstract"]
The Application Aware Quota (AAQ) operator extends Kubernetes native `ResourceQuota` to measure virtual machine (VM) resource consumption in mixed pod and VM environments.

AAQ provides quota enforcement designed for virtualization workloads:

Kubernetes ResourceQuota:: Measures and enforces resource limits at the pod level. When applied to VMs, it measures the entire VM pod's resource consumption, including hypervisor overhead and pod infrastructure, which does not reflect actual VM resource allocation.

Application Aware Quota (AAQ):: Extends ResourceQuota functionality to accurately measure and enforce VM resource consumption. AAQ understands the virtualization layer and can measure actual virtual CPU and memory allocated to VMs, separate from pod overhead.

AAQ supports two types of quotas:

Project-scoped quotas:: Apply resource limits to a specific namespace or project. These are the most common use case for virtualization workloads.

Cluster-scoped quotas:: Apply resource limits across the entire cluster. These are useful for advanced scenarios where you need cluster-wide resource enforcement.

When you enable AAQ, you must configure a quota calculation method. This setting determines how AAQ measures VM resource consumption across your cluster:

Virtual resources:: Measures the actual virtual CPU and memory allocated to VMs, excluding the VM pod runtime resource consumption.

Virtual Machine Instance (VMI) pod usage:: Measures the total resource consumption of the VM pod, including both VM and pod runtime resource consumption.

Dedicated virtual resources:: Measures dedicated CPU and memory resources assigned to VMs. Use this option for pinned or reserved compute scenarios.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@ Create and manage resource quotas for virtual machines.

include::modules/virt-setting-resource-quota-limits-for-vms.adoc[leveloffset=+1]

[role="_additional-resources"]
include::modules/virt-understanding-aaq-operator.adoc[leveloffset=+1]

include::modules/virt-enabling-aaq-operator.adoc[leveloffset=+1]

include::modules/virt-creating-vm-quotas-web.adoc[leveloffset=+1]

include::modules/virt-managing-quotas-list-web.adoc[leveloffset=+1]

include::modules/virt-managing-quota-details-web.adoc[leveloffset=+1]

[id="additional-resources_virt-working-with-resource-quotas-for-vms"]
[role="_additional-resources"]
== Additional resources
* xref:../../../applications/quotas/quotas-setting-per-project.adoc#quotas-setting-per-project[Resource quotas per project]
* xref:../../../applications/quotas/quotas-setting-across-multiple-projects.adoc#quotas-setting-across-multiple-projects[Resource quotas across multiple projects]
* xref:../../../applications/quotas/quotas-setting-across-multiple-projects.adoc#quotas-setting-across-multiple-projects[Resource quotas across many projects]
* xref:../../../virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc#virt-understanding-aaq-operator_virt-working-with-resource-quotas-for-vms[Understanding the Application Aware Quota operator]
* xref:../../../virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc#virt-enabling-aaq-operator_virt-working-with-resource-quotas-for-vms[Enabling the Application Aware Quota operator]
* xref:../../../virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc#virt-creating-vm-quotas-web_virt-working-with-resource-quotas-for-vms[Creating virtual machine quotas using the web console]
* xref:../../../virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc#virt-managing-quotas-list-web_virt-working-with-resource-quotas-for-vms[Managing virtual machine quotas using the list view]
* xref:../../../virt/managing_vms/advanced_vm_management/virt-working-with-resource-quotas-for-vms.adoc#virt-managing-quota-details-web_virt-working-with-resource-quotas-for-vms[Managing virtual machine quota details using the web console]