Bookmark this page

Guided Exercise: Deploy the OpenShift Virtualization Operator

Deploy the OpenShift Virtualization operator in an existing Red Hat OpenShift environment and create a VM to prove the operator's functionality.

Outcomes

  • Deploy the OpenShift Virtualization operator in an existing OpenShift instance by using the web console.

  • Review the installed operators and confirm that the OpenShift Virtualization operator is installed.

  • Create a Fedora virtual machine from a template.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command ensures that the cluster API is reachable and creates the required resources for this exercise.

[student@workstation ~]$ lab start virtualization-deploy

Instructions

  1. Open a web browser and log in to https://console-openshift-console.apps.ocp4.example.com from the workstation machine.

    1. Click htpasswd_provider and log in as the admin user with redhatocp as the password.

  2. From the RHOCP web console left panel, navigate to OperatorsOperatorHub. If you do not see the left panel, then click the main menu icon at the upper left of the web console.

  3. Type virtualization in the OperatorHub search bar. Scroll down and select OpenShift Virtualization from the list.

  4. From the Operator page, click Install to open the Install Operator page.

    Review the available installation options. For this exercise, keep the default options:

    • Update channel is set to stable.

    • Version is set to 4.14.1.

    • Installation mode is set to A specific namespace on the cluster.

    • Installed Namespace is set to Operator recommended Namespace: openshift-cnv.

    • Update approval is set to Automatic.

      Click Install to initiate the operator installation.

  5. Create a HyperConverged instance.

    1. After the OpenShift Virtualization operator installation completes, you are prompted to create a HyperConverged instance. Click Create HyperConverged to view the options for the HyperConverged instance.

      Note

      You can also create a HyperCoverged instance in the OpenShift web console by navigating to OperatorsInstalled Operators. Select the OpenShift Virtualization operator and then click the OpenShift Virtualization Deployment tab. Click Create HyperConverged to view the options for the HyperConverged instance.

    2. Accept the default options and click Create in the lower left of the window.

    3. Wait for the operation to finish. The kubevirt-hyperconverged HyperConverged instance displays a status of Conditions: ReconcileComplete, Available, Upgradable when the operation completes.

  6. Log out of the web console, and log in as the admin user to ensure that the Virtualization entry appears in the side panel.

  7. From the OpenShift web console left panel, navigate to OperatorsInstalled Operators to confirm that the OpenShift Virtualization installation succeeded.

  8. Create a project and a simple VM to confirm the functionality of OpenShift Virtualization.

    1. From the OpenShift web console left panel, navigate to VirtualizationVirtualMachines.

    2. From the Project menu, click Create Project.

    3. Name the project as test-vms, and then click Create.

    4. Click Create virtual machine, select the From template option, and then select the CentOS Stream 9 VM template.

    5. Enter the virtual machine name CentOS-test, or leave the autogenerated name, and click Quick create Virtual machine to deploy the VM.

  9. From the resulting details page for the VM, monitor the deployment of the VM until the status is Running.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish virtualization-deploy

10.Remove the deployed test VM by selecting btn:Actions[Delete].

Revision: do316-4.14-d8a6b80