IBM Cloud Docs
Installing the OpenShift Virtualization Operator on Red Hat OpenShift on IBM Cloud clusters

Installing the OpenShift Virtualization Operator on Red Hat OpenShift on IBM Cloud clusters

Virtual Private Cloud 4.17 and later Red Hat CoreOS only Baremetal worker nodes only

You can use the OpenShift Virtualization Operator to manage virtual machine workloads alongside your container workloads.

The OpenShift Virtualization Operator adds Kubernetes custom resources to enable virtualization. You can use these resources for the following tasks.

  • Create and manage Linux and Windows virtual machines (VMs).
  • Run pod and VM workloads alongside each other in your cluster.
  • Clone or import VMs.
  • Manage network interface controllers and storage disks attached to your VMs.
  • Migrate virtual machines between nodes.

Secondary networks and User defined networks aren't supported. For more information, see Primary networks.

Prerequisites

Before you begin, make sure that you have the following.

  • A Red Hat OpenShift on IBM Cloud cluster at version 4.17 or later
  • VPC Baremetal workers
  • RHCOS operating system
  • Outbound traffic protection disabled
  • OpenShift Data Foundation installed

To install ODF, see Deploying OpenShift Data Foundation on VPC clusters.

Setting up virtualization with File Storage for VPC

  1. In the kube-system/addon-vpc-block-csi-driver-configmap configmap, set the IsStorageClassDefault property to false.

    oc edit cm -n kube-system addon-vpc-block-csi-driver-configmap
    
  2. Install the File Storage for VPC add-on from IBM cloud console.

  3. Verify the add-on is installed by listing the storage classes.

    oc get storageclass
    
  4. Choose a storage class, for example ibmc-vpc-file-metro-1000-iops and set it as the default by editing the kube-system/addon-vpc-file-csi-driver-configmap and entering it as the SET_DEFAULT_STORAGE_CLASS field.

    oc edit cm -n kube-system addon-vpc-file-csi-driver-configmap
    
  5. Wait a few minutes for the changes to take effect.

  6. Subscribe to the OpenShift Virtualization catalog by using the CLI.

  7. Follow the steps to Deploy the OpenShift Virtualization Operator by using the CLI.

  8. Wait until StorageProfile resources are created for each StorageClass. As CDI does not automatically recognize VPC File storage properties, you need to properly set it up.

  9. Edit the StorageProfile for the default storage class (ibmc-vpc-file-metro-1000-iops) and add the following specs.

    spec:
      claimPropertySets:
      - accessModes:
        - ReadWriteMany
        volumeMode:
          Filesystem
    
  10. Check if the resource status is updated with a claimPropertySets that represents the new specs.

    oc get storageprofile ibmc-vpc-file-metro-1000-iops -o yaml
    
  11. In the OpenShift console, look for a new main menu item called Virtualization. You can now use the console to create template VMs from the console.

Next steps

Review the following Red Hat docs for creating and managing VMs in your cluster.