diff --git a/modules/virt-customizing-storage-profile.adoc b/modules/virt-customizing-storage-profile.adoc index f562b38356..64b02d8426 100644 --- a/modules/virt-customizing-storage-profile.adoc +++ b/modules/virt-customizing-storage-profile.adoc @@ -6,7 +6,10 @@ = Customizing the storage profile -You can customize any storage profile. Use the `spec` section of the storage profile to provide specific attributes when creating an underlying persistent volume claim (PVC) for a data volume. +You can specify default parameters by editing the `StorageProfile` object for the provisioner's storage class. These default parameters only apply to the persistent volume claim (PVC) if they are not configured in the `DataVolume` object. + +.Prerequisites +* Ensure that your planned configuration is supported by the storage class and its provider. Specifying an incompatible configuration in a storage profile causes volume provisioning to fail. [NOTE] ==== @@ -19,21 +22,21 @@ If you create a data volume and omit YAML attributes and these attributes are no ==== .Procedure -. Edit the storage profile. In this example, the provisioner is not recognized by the CDI: +. Edit the storage profile. In this example, the provisioner is not recognized by CDI: + [source,terminal] ---- $ oc edit -n openshift-cnv storageprofile ---- + -.Example output -[source,terminal] +.Example storage profile +[source,yaml] ---- apiVersion: cdi.kubevirt.io/v1beta1 kind: StorageProfile metadata: name: - ... +# ... spec: {} status: provisioner: @@ -42,18 +45,18 @@ status: + . Provide the needed attribute values in the storage profile: + -.Example output -[source,terminal] +.Example storage profile +[source,yaml] ---- apiVersion: cdi.kubevirt.io/v1beta1 kind: StorageProfile metadata: name: - ... +# ... spec: claimPropertySets: - accessModes: - - ReadWriteOnce <1> + - ReadWriteOnce <1> volumeMode: Filesystem <2> status: @@ -61,6 +64,6 @@ status: storageClass: ---- <1> The `accessModes` that you select. -<2> The `volmumeMode` that you select. +<2> The `volumeMode` that you select. + After you save your changes, the selected values appear in the storage profile `status` element.