Install container-native virtualization to add virtualization functionality to your OpenShift Container Platform cluster.

Before you deploy container-native virtualization, you must create two Custom Resource Definition (CRD) objects:

  • kind: OperatorGroup

  • kind: CatalogSource

You can create both objects by running a single command.

To finish installing container-native virtualization, use the OpenShift Container Platform 4.1 web console to subscribe to and deploy the container-native virtualization Operators.

container-native virtualization is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/.

Preparing to install container-native virtualization

Before deploying container-native virtualization:

  • Create a namespace called kubevirt-hyperconverged.

  • Create OperatorGroup and CatalogSource Custom Resource Definition objects (CRDs) in the kubevirt-hyperconverged namespace.

Prerequisites
  • OpenShift Container Platform 4.1

  • User with cluster-admin privileges

  • The OpenShift Container Platform Command-line Interface (CLI), commonly known as oc

Procedure
  1. Create the kubevirt-hyperconverged namespace by running the following command:

    $ oc new-project kubevirt-hyperconverged
  2. Create the OperatorGroup and CatalogSource in the kubevirt-hyperconverged namespace by running the following command:

    cat <<EOF | oc apply -f -
    apiVersion: operators.coreos.com/v1alpha2
    kind: OperatorGroup
    metadata:
      name: hco-operatorgroup
      namespace: kubevirt-hyperconverged
    ---
    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
      name: hco-catalogsource
      namespace: openshift-operator-lifecycle-manager
      imagePullPolicy: Always
    spec:
      sourceType: grpc
      image: registry.redhat.io/container-native-virtualization/hco-bundle-registry:v2.0.0
      displayName: KubeVirt HyperConverged
      publisher: Red Hat
    EOF

Subscribing to the KubeVirt HyperConverged Cluster Operator catalog

Before you install container-native virtualization, subscribe to the KubeVirt HyperConverged Cluster Operator catalog from the OpenShift Container Platform web console. Subscribing gives the kubevirt-hyperconverged namespace access to the container-native virtualization Operators.

Prerequisites
  • OperatorGroup and CatalogSource Custom Resource Definition objects (CRDs), both created in the kubevirt-hyperconverged namespace

Procedure
  1. Open a browser window and navigate to the OpenShift Container Platform web console.

  2. Select the kubevirt-hyperconverged project from the Projects list.

  3. Navigate to the CatalogOperator Management page.

  4. In the Operator Catalogs tab, locate KubeVirt HyperConverged Cluster Operator and click Create Subscription.

  5. Click Create to launch the container-native virtualization Operators.

Deploying container-native virtualization

After subscribing to the KubeVirt HyperConverged Cluster Operator catalog, create the KubeVirt HyperConverged Cluster Operator Deployment custom resource to deploy container-native virtualization.

Prerequisites
  • An active subscription to the KubeVirt HyperConverged Cluster Operator catalog in the kubevirt-hyperconverged namespace

Procedure
  1. Navigate to the CatalogInstalled Operators page.

  2. Click KubeVirt HyperConverged Cluster Operator.

  3. Click the KubeVirt HyperConverged Cluster Operator Deployment tab and click Create HyperConverged.

  4. Click Create to launch container-native virtualization.

  5. Navigate to the WorkloadsPods page and monitor the container-native virtualization Pods until they are all Running. After all the Pods display the Running state, you can access container-native virtualization.

You can verify the installation by navigating to the web console at kubevirt-web-ui.your.app.subdomain.host.com. Log in by using your OpenShift Container Platform credentials.