IBM & Red Hat on AWS

OpenShift Virtualization on Red Hat OpenShift Service on AWS (ROSA)

Like many things which are interesting and impactful, OpenShift Virtualization is not a completely new thing, it is based on the upstream open source project KubeVirt, which has been around for a few years. When I first looked at it, I was confused, asking myself many questions: “why does this exist?”, “why would a virtualization admin switch from a known hypervisor to go down a Kubernetes rabbit hole?”, “why on AWS? Just use Amazon Elastic Cloud Compute (EC2)”, “why VMs? and not containers”. For nearly a decade customers have been trying to modernize their business and application workloads adopting the move away from virtual machines to micro services approach. So for a while I came to the conclusion : KubeVirt is a thing and it is simply not my thing…

Here we are, years later, and I’m taking another look, just in case I missed something. In this blog post we are going to explore the function of OpenShift Virtualization, who is it for, and what are some practical use cases for it on AWS.

What is OpenShift Virtualization?

Like many other virtualization stacks, OpenShift Virtualization allows customers to create virtual machines (VMs) and run them on virtual hosts, the VM containing a full Operating system with attached virtual disk storage and networking. The big difference here is it runs on top of Kubernetes as a container orchestrator (OpenShift in this case). Yes, it allows customers to create, run, and manage VM based workloads on their OpenShift environments. On face value this prompts several thoughts of thoughts of dreams within dreams or some chicken and egg situations (don’t use VMs, use containers, or do both by running your VMs on containers running on VMs on AWS). Huh? what? …. We shall unpack this better as we continue through the blog post. OpenShift Virtualization is part of OpenShift and installed as an Operator from the OperatorHub, and it is FREE. Yes, there are no additional licensing or subscription costs.

Who is this for? How does it fit into a modernization strategy?

This is an interesting rabbit hole. OpenShift Virtualization is not a one size fits all, silver bullet replacement for enterprise virtualization stacks. It is designed for customers who have adopted a modernization strategy, including the use of micro services and Kubernetes, but also have additional workloads which are not ready to be refactored from VMs to containers.

There are a few drivers for this, including Commercial Off the Self (COTS) workloads where customers do not control the code base, legacy workloads which have a lower priority for modernization, or legacy workloads which carry a high risk for potential negative business impact. Developers can use OpenShift to modernize application workloads and run VM workloads using the same investment without incurring additional licensing and subscription costs. Customers who have invested in OpenShift as part of their modernization strategy, and who are exploring reducing their cost footprint related to their existing virtualization implementation, could explore workload consolidation using OpenShift Virtualization.

OpenShift Virtualization also opens the door for portability, allowing customers migrating to the cloud from on premises to lift and shift both their container and VM workloads to OpenShift on AWS. This approach could provide an accelerated means of getting into the cloud while they assess their next step. With the shift to managed OpenShift, OpenShift Virtualization on Red Hat OpenShift Service on AWS (ROSA) becomes a compelling thing to explore.

Installing OpenShift Virtualization Operator:

Step 1: From the OpenShift web console, select Operators, OperatorHub, and then search for OpenShift Virtualization as seen below.

Red Hat OpenShift Virtualization in the OpenShift operator hub

Red Hat OpenShift Virtualization in the OpenShift operator hub

Step 2: Click on the OpenShift Virtualization Operator and click on the Install button.

OpenShift Virt Operator install

OpenShift Virt Operator install

OpenShift Virt Operator install

OpenShift Virt Operator install

For this blog I chose the default settings and opted for automatic updates

Once the Virtualization Operator is installed a HyperConverged infrastructure needs to be created.
Step 3: Click on Create HyperConverged.

Create Hyperconverged

Create Hyperconverged

Once the operator is installed, a new virtualization tab appears within the OpenShift web console allowing for the management of Virtual Machine workloads.

Virtualization tab In OpenShift web console

Virtualization tab In OpenShift web console

Adding another Machine pool with bare metal nodes:

This is performed after the ROSA cluster provisioning step. We will add a new Machine pool using the Red Hat Hybrid Cloud Console. Once logged in to the Hybrid Cloud Console, select the ROSA cluster, click on Machine pools, and click on Add machine pool.

Add Machine Pool via Hybrid console

Add Machine Pool via Hybrid console

We are going to add a general purpose M7.metal instance to each AZ.

Add Machine Pool

Add Machine Pool

Most customers make use of some form of attached storage array for their virtual servers, typically consisting of multiple disks with replication for storage resilience. On AWS, this approach would consist of multiple compute nodes (one in each AWS Availability Zone (AZ)) using attached Amazon Elastic Block Store (EBS) volumes that are replication between the nodes for resilience. This is less desirable as it results the need to duplicate, or even triplicate, of the storage related resources. There are also additional data transfer costs related to data replication between storage nodes.

Traditional storage server based architecture

Traditional storage server based architecture

Alternatively, using Amazon Elastic File System (Amazon EFS) is the recommended approach for shared storage. Amazon EFS is a managed service which is supported in OpenShift and can be deployed via the OperatorHub. AWS takes care of the data replication behind the scenes, providing resilience for customers without requiring multiple compute nodes or volumes for their storage. They simply have an endpoint to the shared storage in each AZ. This is beneficial to customers as it could result in a reduction of storage related costs.

OpenShift presents this shared storage via Kubernetes Persistent Volume Claims (PVCs) to OpenShift container workloads and VMs. We will dive deeper into this topic in a future blog.

Now that OpenShift Virtualization is configured on ROSA, the next step is NOT to create VMs. Creating new VMs simply goes against what the business is trying to achieve with their modernization goals. Instead, we will import existing VMs.
The following documentation discusses installing the Virtctl-Client, which is useful for future automation but is beyond the scope of this blog post.

VMs can be migrated to OpenShift Virtualization in few ways, including importing a VM template exported from an existing virtualization environment or making use of the Red Hat Migration Toolkit for Virtualization (MTV). Importing from a template is a good option for ad-hoc imports or small numbers of VMs, as these would first need to be exported and then imported, but this approach is certainly not new in the virtualization space.

Red Hat has created a few Migration Toolkits based on the up stream open source Konveyor project. One is the Migration toolkit for applications (MTA) which helps customers start their modernization journey and convert application code to containers. Another is the Migration Toolkit for Containers (MTC) which assists with moving container workloads to new environments e.g., OpenShift v3 to v4, on premises to AWS, self managed OpenShift Container Platform (OCP) to managed (ROSA). Finally, there is the Migration toolkit for Virtualization (MTV) which can be installed on an OpenShift cluster from the OperatorHub.

Once installed, customers are able to create source (existing virtualization stack) and destination (OpenShift Virtualization host running the toolkit) providers. Once configured, the toolkit is able to view the running inventory of VMs on the source and then migrate them to OpenShift Virtualization.

Summary and Conclusion:

Right, it seems OpenShift Virtualization is not just a thing for someone else! For customers who have invested in OpenShift as part of their overall business modernization strategy and have VM workloads which cannot be modernized in the short term, OpenShift virtualization may be a meaningful consolidation option to extend on any existing OpenShift investment. Running OpenShift virtualization on ROSA allows customers to add the benefit of a managed service to underpin their virtualization stack.

Should you wish to dive deeper into this please do not hesitate to reach out to your AWS or Red Hat account team or email the AWS Red Hat partner team.