As a mature technology, virtualization has undergone significant changes in the era of mixed cloud and even AI. This article explores an alternative to traditional virtualization: OpenShift Virtualization , which is a function provided by Red Hat OpenShift.
One of the main purposes of traditional virtualization technology is to increase the utilization of physical hardware by running multiple virtual machines on each physical computing node. All these products are very good at this task, and by adding additional components such as Software Defined Network (SDN), it seems that traditional hypervisors are almost as powerful as the services provided by modern cloud platforms.
Whether it's Red Hat virtualization or Red Hat OpenStack The platform has been used Red Hat Enterprise Linux (RHEL) To run the virtual machine. These products improve KVM management by providing easier to use interfaces and configuration options. In the end, however, all these additional capabilities only improve the way virtual machines are created and managed.
Now, Red Hat provides another way to create and manage KVM based virtual machines: Red Hat OpenShift Virtualization 。
How Red Hat OpenShift virtualization works
OpenShift virtualization provides an easy way to create and manage KVM based virtual machines in the form of OpenShift Operator. Enterprise users can continue to run virtualized workloads while modernizing and containerizing applications. OpenShift virtualization is an add-on component of OpenShift, which provides the ability to run virtual machines alongside regular containerized workloads. Therefore, if you have already run the OpenShift environment locally, it is the most reasonable choice.
It only takes a few minutes to install the Openshift Virtualization Operator in the existing OpenShift cluster. Assuming that the bare metal computing node has been correctly configured, you can start the virtual machine in OpenShift within a few seconds. All of this is possible because OpenShift virtualization relies on the same basic technologies that have been used successfully for many years: QEmu, KVM, and libvirt.
The difference is that the QEmu process runs in a container and takes advantage of OpenShift's already powerful SDN. Therefore, when a virtual machine is started in OpenShift virtualization, it runs in the same way as it does in Red Hat virtualization or OpenStack, but with the added benefit of being managed by an OpenShift cluster that is already running in the environment.
The figure below shows how QEmu, KVM and libvirt interact with each other in the three products of Red Hat, and compares their relationship with virtual machines. In OpenShift virtualization, these components run in a container, but their relationships remain identical. Whether running virtual machines inside or outside the container, the software running the guest operating system is the same reliable solution you have relied on for many years.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/455822092cd6cde76ea9543061e217387294af.jpg)
For system administrators who are already familiar with running OpenShift locally, adding OpenShift virtualization is relatively simple. Virtual machines run in Pod and can be accessed, migrated or load balanced like microservices. This means that if the virtual machine has a software problem and hangs or crashes, OpenShift virtualization can be configured to detect and take corrective actions, such as restarting the virtual machine or starting the virtual machine on another node.
Upgrading the applications running inside the virtual machine can also be as simple as providing a new image and then updating the virtual machine configuration - OpenShift virtualization will be responsible for starting the new virtual machine and shutting down the old virtual machine. In addition, virtual machine disks can be snapped or cloned before upgrading applications. This provides a smooth recovery process in the event of a failure during the upgrade process.
Red Hat also released the Virtualization Migration Toolkit (MTV). With these tools, you can directly connect OpenShift virtualization to the existing hypervisor infrastructure and create a migration plan for the virtual machine. The migration plan will run at the selected time and migrate the virtual machine to OpenShift virtualization to achieve very little downtime.
How to use OpenShift virtualization
Fear, uncertainty, and doubt about using different products to manage virtual machines? Learn how to easily install and use OpenShift virtualization.
Once an OpenShift cluster is run on the bare metal work node, just like installing any other operator, install the OpenShift virtualization operator from the Operator Hub.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/047c5d115ce19f8f93a59568adb0b08e9973ec.jpg)
After installation, click“ Create HyperConverged ”Button. When the process is completed, the first virtual machine can be started.
The first thing you may notice is that a new“ Virtualization ”Area.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/46eb7a301be2b1eaac198400d042faeec2d9bf.jpg)
From here, you can overview the virtualization environment, browse the official template directory, create virtual machines, or view and create custom templates.
Click“ VirtualMachines ”You will find that the virtual machine has not been created.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/08b62f7403554d267a37148c1ad28653020ea7.jpg)
Click“ Create virtual machine ”Button to view the available templates in the directory and start the first virtual machine. In this example, we will create a new RHEL 8 instance by clicking the appropriate template.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/723687290daad5a60569975fb5063c791c222d.jpg)
On the next screen, you can rename the virtual machine and change some aspects of the virtualization hardware. In this example, we simply name it and click“ Quickly create virtual machines ”。
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/493219973304348927d232667aa30751b61bb7.jpg)
A few seconds after creating a virtual machine in OpenShift Virtualization, the new virtual machine is ready.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/c6d3c6496ef474bb18c595c53d96ecb00e0ef8.jpg)
Click the virtual machine name and select“ Console ”Tab, you can see that the virtual machine is running and ready to connect to the network.
![picture picture](https://s1.51ctocdn.cn/images/avater/202404/675ec500759ba5eacaf759f624c2a8eeccc8a4.jpg)
conclusion
We have been using the traditional hypervisor for many years, and may already be very familiar with the virtualization workload management tools we have mastered. However, with the continuous progress of technology and the evolution of the environment, as well as the company's increasing dependence on the container platform, the deployment of a virtualized operating system becomes as simple as installing an operator in an existing OpenShift cluster.
Red Hat OpenShift virtualization brings us the stability, self-healing, scalability, and resource management we expect from traditional hypervisors, and also makes full use of the tools that many of us are already using.
Content from: Migrating to OpenShift virtualization is so simple!