Mapping KubeVirt CSI storage classes
You can map the infrastructure storage class to the hosted storage class during cluster creation.
|
|
KubeVirt CSI supports mapping only an infrastructure storage class that is capable of |
The following table shows how volume and access mode capabilities map to KubeVirt CSI storage classes:
| Infrastructure CSI capability | Hosted cluster CSI capability | VM live migration support | Notes |
|---|---|---|---|
RWX: |
|
Supported |
Use |
RWO |
RWO |
Not supported |
Lack of live migration support affects the ability to update the underlying infrastructure cluster that hosts the KubeVirt VMs. |
RWO |
RWO |
Not supported |
Lack of live migration support affects the ability to update the underlying infrastructure cluster that hosts the KubeVirt VMs. Use of the infrastructure |
-
To map the infrastructure storage class to the hosted storage class, use the
--infra-storage-class-mappingargument as shown in the following example:$ hcp create cluster kubevirt \ --name my-hosted-cluster \ --node-pool-replicas 2 \ --pull-secret /user/name/pullsecret \ --memory 8Gi \ --cores 2 \ --infra-storage-class-mapping=<infrastructure_storage_class>/<hosted_storage_class>-
--namespecifies the name of your hosted cluster. -
--node-pool-replicasspecifies the worker count. -
--pull-secretspecifies the path to your pull secret. -
--memoryspecifies a value for memory. -
--coresspecifies a value for CPU. -
--infra-storage-class-mappingspecifies the storage class names for the infrastructure and hosted cluster. Replace<infrastructure_storage_class>with the infrastructure storage class name and<hosted_storage_class>with the hosted cluster storage class name. You can use the--infra-storage-class-mappingargument multiple times within thehcp create clustercommand.After you create the hosted cluster, the infrastructure storage class is visible within the hosted cluster. When you create a Persistent Volume Claim (PVC) within the hosted cluster that uses one of those storage classes, KubeVirt CSI provisions that volume by using the infrastructure storage class mapping that you configured during cluster creation.
-