The basics of OpenShift virtualization
Here in this blog, we are going to learn the basics of Openshift virtualization.
Running several virtual machines (VMs) per physical computing node has been one of the main goals of RHV, as it has been with any traditional hypervisor like Xen, VMware, or a KVM-based system to increase physical hardware utilization. All of these technologies do this function exceptionally well, and classic hypervisors appear to be nearly as reliable as the services offered by contemporary cloud platforms thanks to add-ons like Software-Defined Networking (SDN).
Essentially, Red Hat Virtualization and Red Hat OpenStack Platform use Red Hat Enterprise Linux’s (RHEL) libvirt (KVM) capabilities to run virtual machines. These solutions offer more user-friendly interfaces and setup choices, which enhance KVM management. All of those extra bells and whistles, though, are really just better methods for building and administering virtual machines.
Red Hat OpenShift Virtualization is a new tool that Red Hat offers for managing and creating KVM-based virtual machines. Now, I’ll admit that I was skeptical when I first learned about OpenShift Virtualization. In addition, I thought it was a horrible idea! Why would we need an additional layer of complexity beneath the virtualized OS when VMs simply do not operate in the same way as containers? But now that I know how OpenShift Virtualization functions and makes use of the same reliable KVM-based technology Red Hat has been offering and utilizing for years, I can see how OpenShift Virtualization can assist us in managing virtual machines in OpenShift.
The operation of Red Hat OpenShift Virtualization
OpenShift Virtualization offers much of the same functionality as RHV and OpenStack Platform, with the exception that it functions as an OpenShift Operator. Both platforms make it simple to create and manage KVM-based virtual machines. This allows you to update and containerize your apps while maintaining the functionality of virtualized workloads. With OpenShift Virtualization, you may run virtual machines (VMs) in addition to your standard containerized workloads. Therefore, if you are currently operating an OpenShift installation on-premise, then using it makes the most sense.
If your bare-metal compute nodes are already configured appropriately, installing the Openshift Virtualization Operator in an already-existing OpenShift cluster simply takes a few minutes, after which you may begin spinning up virtual machines (VMs) in OpenShift. All of this is made possible by the fact that QEmu, KVM, and libvirt—the core technologies you have been effectively utilizing for years—are the foundation of OpenShift Virtualization. The QEmu process is utilizing OpenShift’s already strong SDN and is operating inside a container, which is the sole difference. Thus, a virtual machine (VM) in OpenShift Virtualization starts up and operates exactly like it does in RHV or OpenStack, but it also has the advantage of being controlled by an OpenShift cluster that is already operational in your environment.
Three of Red Hat’s products are compared side by side in the graphic below, demonstrating how QEmu, KVM, and libvirt interact with the virtual machine. These components operate within a container with OpenShift Virtualization, but their relationships stay exactly the same. The software that runs the guest operating system is the same tried-and-true method that you have been using for years, whether you are running virtual machines (VMs) inside or outside of containers.
Adding OpenShift Virtualization is very simple for system administrators who are already experienced with administering OpenShift on-premise. Similar to microservices, virtual machines can be accessed, moved, and load-balanced within pods. This implies that OpenShift Virtualization can be set up to detect and take remedial action, such restarting the VM or starting it on a different node, if a virtual machine (VM) hangs or crashes due to a software problem.
A new image may be provided, and the virtual machine configuration can be updated to use it. The task of starting the new virtual machine and ending the previous ones will be handled by OpenShift Virtualization. This is another easy way to upgrade the application operating within the VM. As an alternative, you can clone or take a snapshot of your virtual machine’s disk before updating the program. The task of starting the new virtual machine and ending the previous ones will be handled by OpenShift Virtualization.
The Migration Toolkit for Virtualization (MTV) has also been released by Red Hat. These tools allow you to plan your virtual machine migrations and establish a direct connection between OpenShift Virtualization and your current hypervisor architecture. With the least amount of downtime possible, the migration plan will transfer your virtual machine into OpenShift Virtualization at a time of your choosing.
Using OpenShift Virtualization: A Guide
Let’s take a look at how to install and use OpenShift Virtualization in order to allay some of the anxiety, doubt, and worry associated with using a separate product to manage virtual machines. We’ll only cover the broad ideas here; if you’d like more specific instructions, check out our training or documentation, as well as this other blog article that goes over the advantages of OpenShift Virtualization.
Install the OpenShift Virtualization Operator from the Operator Hub in the same way you would any other Operator after your OpenShift cluster is up and running on bare-metal worker nodes.
After installation is complete, select Create HyperConverged. Your first virtual machine can now be started after that process is finished.
A new Virtualization section in the OpenShift console navigation bar might be one of the first things you notice.
This is where you can construct virtual machines, see and create custom templates, and obtain an overview of the virtualization environment. You may also browse the official template catalog.
There aren’t any built virtual machines (VMs) when you click on VirtualMachines.
To explore the various templates in the catalog and launch your first virtual machine (VM), click the Create virtual machine button and then select From template.
By selecting the relevant template, we will launch a fresh RHEL 9 instance for this example.
On the following screen, you can change your virtual machine’s name and adjust some of the virtualized hardware’s properties. For now, we’ll just name it and choose Quick Create Virtual Machine.
Your newly created virtual machine is now operational, just a few seconds after it was created via OpenShift Virtualization.
You may check if the virtual machine (VM) is up and running and prepared to connect to the network by clicking on its name and then the Console tab.
Conclusion
The tools we have learnt to manage virtualized workloads, like Red Hat Virtualization, may feel quite familiar to those of us who have been using traditional hypervisors for years. However, as technology develops, the environment changes, and as businesses depend more on platforms that make use of containers, virtualizing operating systems is now as simple as installing an Operator inside of an already-existing OpenShift cluster.
Red Hat OpenShift Virtualization leverages the technologies that many of us are already familiar with, while delivering the reliability, self-healing, scalability, and resource management that we have come to expect from traditional hypervisors. The news that Red Hat Virtualization will be discontinued in a few years shouldn’t scare you into looking for a different hypervisor that performs the same functions; instead, it should pique your curiosity in the innovations and advancements that containerized software has to offer.