You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Configuring the default and virt-default storage classes
9
+
10
+
A storage class determines how persistent storage is provisioned for workloads. In {VirtProductName}, the virt-default storage class takes precedence over the cluster default storage class and is used specifically for virtualization workloads. Only one storage class should be set as virt-default or cluster default at a time. If multiple storage classes are marked as default, the virt-default storage class overrides the cluster default. To ensure consistent behavior, configure only one storage class as the default for virtualization workloads.
11
+
12
+
[IMPORTANT]
13
+
====
14
+
Boot sources are created using the default storage class. When the default storage class changes, old boot sources are automatically updated using the new default storage class. If your cluster does not have a default storage class, you must define one.
15
+
16
+
If boot source images were stored as volume snapshots and both the cluster default and virt-default storage class have been unset, the volume snapshots are cleaned up and new data volumes will be created. However the newly created data volumes will not start importing until a default storage class is set.
17
+
====
18
+
19
+
.Procedure
20
+
21
+
. Patch the current virt-default or a cluster default storage class to false:
22
+
.. Identify all storage classes currently marked as virt-default by running the following command:
23
+
+
24
+
[source,terminal]
25
+
----
26
+
$ oc get sc -o json| jq '.items[].metadata|select(.annotations."storageclass.kubevirt.io/is-default-virt-class"=="true")|.name'
27
+
----
28
+
+
29
+
.. For each storage class returned, remove the virt-default annotation by running the following command:
= Configuring a storage class for custom boot source updates
8
+
= Configuring a storage class for boot source images
9
9
10
-
You can override the default storage class by editing the `HyperConverged`custom resource (CR).
10
+
You can configure a specific storage class in the `HyperConverged` resource.
11
11
12
12
[IMPORTANT]
13
13
====
14
-
Boot sources are created from storage using the default storage class. If your cluster does not have a default storage class, you must define one before configuring automatic updates for custom boot sources.
14
+
To ensure stable behavior and avoid unnecessary re-importing, you can specify the `storageClassName` in the `dataImportCronTemplates` section of the `HyperConverged` resource.
15
15
====
16
16
17
17
.Procedure
@@ -23,7 +23,7 @@ Boot sources are created from storage using the default storage class. If your c
<1> In this example, the current default storage class is named `hostpath-csi-basic`.
58
+
. Wait for the HyperConverged Operator (HCO) and Scheduling, Scale, and Performance (SSP) resources to complete reconciliation.
74
59
75
-
.. Remove the annotation from the current default storage class by running the following command:
60
+
. Delete any outdated `DataVolume` and `VolumeSnapshot` objects from the `openshift-virtualization-os-images` namespace by running the following command.
<1> Replace `<current_default_storage_class>` with the `storageClassName` value of the default storage class.
82
66
83
-
. Set the new storage class as the default by running the following command:
67
+
. Wait for all `DataSource` objects to reach a "Ready - True" status. Data sources can reference either a PersistentVolumeClaim (PVC) or a VolumeSnapshot. To check the expected source format, run the following command:
0 commit comments