:_mod-docs-content-type: ASSEMBLY
[id="virt-storage-config-overview"]
= Storage configuration overview
include::_attributes/common-attributes.adoc[]
:context: virt-storage-config-overview

toc::[]

[role="_abstract"]
You can configure a default storage class, storage profiles, Containerized Data Importer (CDI), data volumes (DVs), and automatic boot source updates.

ifdef::openshift-dedicated[]
On {product-title}, specific configurations for Hyperdisk are required to ensure performance and support features like live migration. For more information, see "Storage configuration for {VirtProductName} 4.21.x on Google Cloud" in the "Additional resources" section.
endif::openshift-dedicated[]

[id="storage-configuration-tasks"]
== Storage

The following storage configuration tasks are mandatory:

ifndef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]

Configure a default storage class::

You must configure a default storage class for the cluster. Otherwise, {VirtProductName} cannot automatically import boot source images. `DataVolume` objects (DVs) and `PersistentVolumeClaim` objects (PVCs) that do not explicitly specify a storage class remain in the `Pending` state until you set a default storage class.

endif::openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]

Configure storage profiles::

You must configure storage profiles if your storage provider is not recognized by CDI. A storage profile provides recommended storage settings based on the associated storage class.

The following storage configuration tasks are optional:

Reserve additional PVC space for file system overhead::

By default, 5.5% of a file system PVC is reserved for overhead, reducing the space available for VM disks by that amount. You can configure a different overhead value.

Configure local storage by using the hostpath provisioner::

You can configure local storage for virtual machines by using the hostpath provisioner (HPP). When you install the {VirtProductName} Operator, the HPP Operator is automatically installed.

Configure user permissions to clone data volumes between namespaces::

You can configure RBAC roles to enable users to clone data volumes between namespaces.

[id="cdi-configuration-tasks"]
== Containerized Data Importer

You can perform the following Containerized Data Importer (CDI) configuration tasks:

Override the resource request limits of a namespace::

You can configure CDI to import, upload, and clone VM disks into namespaces that are subject to CPU and memory resource restrictions.

Configure CDI scratch space::

CDI requires scratch space (temporary storage) to complete some operations, such as importing and uploading VM images. During this process, CDI provisions a scratch space PVC equal to the size of the PVC backing the destination data volume (DV).

[id="dv-configuration-tasks"]
== Data volumes

You can perform the following data volume configuration tasks:

Enable preallocation for data volumes::

CDI can preallocate disk space to improve write performance when creating data volumes. You can enable preallocation for specific data volumes.

Manage data volume annotations::

Data volume annotations allow you to manage pod behavior. You can add one or more annotations to a data volume, which then propagates to the created importer pods.

[id="boot-source-configuration"]
== Boot source updates

You can perform the following boot source update configuration task:

Manage automatic boot source updates::

Boot sources can make virtual machine (VM) creation more accessible and efficient for users. If automatic boot source updates are enabled, CDI imports, polls, and updates the images so that they are ready to be cloned for new VMs. By default, CDI automatically updates Red Hat boot sources. You can enable automatic updates for custom boot sources.

[role="_additional-resources"]
[id="additional-resources_{context}"]
== Additional resources

ifndef::openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]
* xref:../../storage/dynamic-provisioning.adoc#dynamic-provisioning-defining-storage-class_dynamic-provisioning[Defining a storage class]
endif::openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]
* xref:../../virt/storage/virt-configuring-storage-profile.adoc#virt-configuring-storage-profile[Configure storage profiles]
* xref:../../virt/storage/virt-reserving-pvc-space-fs-overhead.adoc#virt-reserving-pvc-space-fs-overhead[Reserve additional PVC space for file system overhead]
* xref:../../virt/storage/virt-configuring-local-storage-with-hpp.adoc#virt-configuring-local-storage-with-hpp[Configure local storage by using the hostpath provisioner]
* xref:../../virt/storage/virt-enabling-user-permissions-to-clone-datavolumes.adoc#virt-enabling-user-permissions-to-clone-datavolumes[Configure user permissions to clone data volumes between namespaces]
* xref:../../virt/storage/virt-configuring-cdi-for-namespace-resourcequota.adoc#virt-configuring-cdi-for-namespace-resourcequota[Override the resource request limits of a namespace]
* xref:../../virt/storage/virt-preparing-cdi-scratch-space.adoc#virt-preparing-cdi-scratch-space[Configure CDI scratch space]
* xref:../../virt/storage/virt-using-preallocation-for-datavolumes.adoc#virt-using-preallocation-for-datavolumes[Enable preallocation for data volumes]
* xref:../../virt/storage/virt-managing-data-volume-annotations.adoc#virt-managing-data-volume-annotations[Manage data volume annotations]
* xref:../../virt/storage/virt-automatic-bootsource-updates.adoc#virt-automatic-bootsource-updates[Manage automatic boot source updates]
ifdef::openshift-dedicated[]
* link:https://access.redhat.com/articles/7139046[Storage configuration for {VirtProductName} 4.22.x on Google Cloud]
endif::openshift-dedicated[]
