×

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

You can use the OpenShift Container Platform 4.2 web console to subscribe to and deploy the container-native virtualization Operators.

Prerequisites
  • OpenShift Container Platform 4.2

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 installing container-native virtualization, create a namespace that is named openshift-cnv.

Prerequisites
  • User with cluster-admin privileges

Procedure
  1. From the OpenShift Container Platform web console, navigate to the AdministrationNamespaces page.

  2. Click Create Namespace.

  3. In the Name field, type openshift-cnv.

  4. Click Create.

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 openshift-cnv namespace access to the container-native virtualization Operators.

Prerequisites
  • Create a namespace that is named openshift-cnv.

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

  2. Navigate to the OperatorsOperatorHub page.

  3. Locate the KubeVirt HyperConverged Cluster Operator and then select it.

  4. Read the information about the Operator and click Install.

  5. On the Create Operator Subscription page:

    1. Select A specific namespace on the cluster from the Installation Mode list and choose the openshift-cnv namespace.

      • All namespaces on the cluster (default) installs the Operator in the default openshift-operators namespace to watch and be made available to all namespaces in the cluster. This option is not supported for use with container-native virtualization. You must only install the Operator in the openshift-cnv namespace.

    2. Select 2.1 from the list of available Update Channel options.

    3. For Approval Strategy, ensure that Automatic, which is the default value, is selected. Container-native virtualization automatically updates when a new z-stream release is available.

  6. Click Subscribe to make the Operator available to the selected namespaces on this OpenShift Container Platform cluster.

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 openshift-cnv namespace

Procedure
  1. Navigate to the OperatorsInstalled Operators page.

  2. Click KubeVirt HyperConverged Cluster Operator.

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

    1. After you click Create HyperConverged, a YAML file is displayed. Remove the single quotation marks around the word 'false'. This is a workaround for the issue reported in BZ#1767167.

      When it is initially displayed, the YAML file resembles the following example:

      apiVersion: hco.kubevirt.io/v1alpha1
      kind: HyperConverged
      metadata:
        name: kubevirt-hyperconverged
        namespace: openshift-cnv
      spec:
        BareMetalPlatform: 'false' (1)
      1 Ensure that this line reads BareMetalPlatform: false before proceeding to the next step.
  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.