Cloud Experts Documentation

Deploying OpenShift Virtualization on ARO

This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.

OpenShift Virtualization is a feature of OpenShift that allows you to run virtual machines alongside your containers. This is useful for running legacy applications that can’t be containerized, or for running applications that require special hardware or software that isn’t available in a container.

In this tutorial, I’ll show you how to deploy OpenShift Virtualization on Azure Red Hat OpenShift (ARO). I’ll show you how to create an ARO cluster, deploy the OpenShift Virtualization operator, and create a virtual machine.

It’s important to keep in mind that this tutorial is designed to show you the quickest way to get started with OpenShift Virtualization on ARO. It’s not designed to be a production-ready deployment. If you’re planning to deploy OpenShift Virtualization in a production environment, you should follow the official documentation and best practices.

Pre-requisites

  1. You will need an 4.18+ ARO Cluster (see Deploying ARO using azurerm Terraform Provider if you need help creating one).

    Note: as of the writing of this guide 4.19 was used

  2. CLIs and Command Line Tools Needed

  • oc (logged into the ARO cluster)
  • jq
  • yq
  1. Environment Variables

Create a machine pools for VMs

  1. Create Azure Boost Machine Sets

    The following will create a machine set for VMs in each availability zone the cluster is in

Install OpenShift Virtualization Operators

  1. Deploy the OpenShift Virtualization Operator

  2. If you want to see the progress of the operator you can log into the OpenShift Console (hint run oc whoami --show-console to get the URL)

    list of installed operators
  3. Create an OpenShift Virtualization operand

    Note: this is all defaults, so will not support a lot of the more advanced features you might want.

  4. New “Virtualization” Section in the OpenShift Console

    Once the operator is installed you should see a new “Virtualization” section in the OpenShift Console (you may be prompted to refresh the page)

    Virtualization Section
  5. Close the popup window and click the “Download virtctl” button to download the virtctl binary.

Add OpenShift Data Foundation

Optional but highly recommended

To enable advanced OpenShift Virtualization features like Live Migration, you need a high-performing StorageClass. While numerous options exist, this tutorial will use OpenShift Data Foundation for storage. It offers excellent performance and has a strong record of success with OpenShift Virtualization.

Follow this guide to add OpenShift Data Foundation to your cluster.

Create a Virtual Machine

  1. Create a project and a secret containing your public SSH key

  2. Create a VM

  3. Start the VM

  4. Watch for the VM to be ready

    Every 2.0s: oc get vm NAME AGE STATUS READY example-vm 3m16s Running False

  5. SSH into the VM

  6. Congratulations! You now have a virtual machine running on OpenShift Virtualization on ARO!

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2023 Red Hat, Inc.