In 2017, the KubeVirt team launched the project to manage virtual machines (VMS) in Kubernetes with containers. The intent of this open source project is to make virtual machines first-class citizens in this environment.

Since its launch at the 2018 Open Source Summit, KubeVirt has continued to mature and evolve. It has reached more than 200 stars on GitHub and even launched its own event, the KubeVirt Summit, in February 2021.

KubeVirt is the foundation of OpenShift virtualization, which helps developers bring virtual machines into containerized workflows.

Use virtual machines in Kubernetes

KubeVirt allows you to use Kubernetes native devices on virtual machines. This means they can connect to a POD network, including services, routes, pipes, and so on, accessed using the standard Kubernetes method. The network policy applies to the virtual machine pod in the same way that it applies to the application pod, providing a consistent model for managing communication from virtual machines to pods (and vice versa).

A real life example of this is the way an airline uses old simulator software. It infuses artificial intelligence and machine learning (AI/ML) models and then automatically deploys and tests them on a virtual-based emulator. This enables it to fully automate test results and new telemetry training data using Kubernetes and Kubeflow.

Konveyor. IO is an open source project to help transition existing workloads (development, test, and production) to Kubernetes. Its tools include Crane, which moves containers from one Kubernetes platform to another; Move2Kube, bringing workloads from Cloud Foundry to Kubernetes; And Tackle, which modernizes Java applications by analyzing them to make their runtimes more standard and portable for containerized platforms like Kubernetes.

These tools are useful in transition patterns, but many projects want to leverage Kubernetes in the early stages to become more agile and productive. In terms of infrastructure, these benefits might include blue/green load balancing, route management, declarative deployment, or (depending on how you deploy) easier upgrades due to immutable infrastructure. On the development side, they might include integrating continuous integration/continuous development (CI/CD) pipelines with platforms to bring applications into production faster, self-resourcing, or integrating health checks and monitoring.

KubeVirt can help you by running your workload as a virtual machine in the Kubernetes environment. It allows your workload to quickly board Kubernetes, enjoy its benefits, and steadily modernize your workload over time. However, you still have the problem of bringing your virtual machine from the traditional virtualization platform to the modern Kubernetes platform. This is where Konveyor’s Forklift project comes in.

About the Forklift

Forklift uses KubeVirt to migrate virtualized workloads from different sources to Kubernetes. It is designed to make tasks easy so that you can migrate anything from one or two machines to hundreds of machines.

Migration is a simple three-stage process.

  1. Connect to an existing virtualization platform (called the “source provider”) and a Kubernetes environment (the “target provider”).
  2. Map network and storage resources from the source provider to the target provider to find equivalent resources in both.
  3. Select VMS to be migrated, allocate network and storage mappings, and make a migration plan. And then run it.

How to start

To start using Forklift, first of all, you need a compatible source provider. You will also need a Kubernetes environment with KubeVirt 0.40 or later and bare-metal nodes (although you can use nested virtualization for testing purposes). Configure your storage classes with read-write-execute (RWX), and configure your network with Multus to match the network your virtual machine uses in the source provider. If you can’t do that, don’t worry; You can also choose to rearrange IP addressing.

Finally, use the operator provided to install Forklift on your Kubernetes and enter the user interface to start running your first test migration.

Forklift is an upstream version of Red Hat’s virtualization Migration toolkit. Therefore, if you want to use it in a production environment, you may want to consider using a supported version of the tool.

The migration time