Configuring KubeVirt VM root volume

At cluster creation time, you can configure the storage class that is used to host the KubeVirt virtual machine (VM) root volumes by using the --root-volume-storage-class argument.

Procedure
  • To set a custom storage class and volume size for KubeVirt VMs, run a command 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 \
      --root-volume-storage-class ocs-storagecluster-ceph-rbd \
      --root-volume-size 64
    • --name specifies the name of your hosted cluster.

    • --node-pool-replicas specifies the worker count.

    • --pull-secret specifies the path to your pull secret.

    • --memory specifies a value for memory.

    • --cores specifies a value for CPU.

    • --root-volume-storage-class specifies a name of the storage class to host the KubeVirt VM root volumes.

    • --root-volume-size specifies the volume size.

      As a result, you get a hosted cluster created with VMs hosted on persistent volume claims (PVCs).