Openshift Virtualization: MTV Operator

No, this doesn't have anything to do with the music channel. But I will promise you one thing. You will become a certified Forklift operator at the end of this article 😄

Migration Toolkit for Virtualization Operator is an operator that facilitates the movement of VM workloads over to Openshift Virtualization.

Throughout this blog, I will be using the documentation that is available at:

Installing and using the Migration Toolkit for Virtualization | Red Hat Product Documentation
Installing and using the Migration Toolkit for Virtualization | Red Hat Documentation

Currently, four types of virtual machines are supported.

VMWare Vsphere
Red Hat Virtualization/RHV
Openstack
OVAs Created by VMWare Vsphere
Other Openshift Virtualization Clusters

Cold and warm migrations are available for all of these types of VMs but warm migration is only supported from Vsphere and RHV.

My test environment is using Openshift 4.17 with Openshift Data Foundation installed with the default options. Nothing special in that regard. The Vcenter cluster that I will be importing the VM from is based on VCenter 8.

This article will show the installation of the MTV operator along with an example of a cold and warm migration of a Fedora-based VM.

Installation of MTV Operator

  1. In the Openshift Web Console, go to Operators --> OperatorHub and search for "MTV".


  1. Accept the default install options. As of this writing, the MTV operator is at version 2.7.2. Click "Install"
  1. On the next screen, accept all of the defaults as well. Click "Install".

As with all Openshift operators, the list of custom-resources/CRs will be displayed. A brief overview is shown in this screenshot (from the installer).

  1. After clicking "Install", wait for the install to complete.
  1. A project/namespace called openshift-mtv will be created. The next step will be creating the Forklift controller which is the controller that handles these migrations.

Click "Create ForkliftController"

kind: ForkliftController
apiVersion: forklift.konveyor.io/v1beta1
metadata:
  name: forklift-controller
  namespace: openshift-mtv
spec:
  feature_ui_plugin: 'true'
  feature_validation: 'true'
  feature_volume_populator: 'true'
  1. On the follow-on screen will be the status of the operator. It should go to a running state fairly quickly.

You will see some new workloads running in the openshift-mtv project/namespace at this point.

Also a pop-up window will appears on the right-side of console indicating that an update is available for the Openshift Web Console. A new Migration menu will appear on the left-hand menu bar.

Description of Menus

Overview: This page shows a high-level overview of the running pods in the openshift-mtv project/namespace. There is also some status information and metrics available. Lastly, there are some configuration parameters that can be modified on this page as shown in the screenshot below.

Providers: For each unique provider-type and instance of that type, a provider will need to be created. In the example that follows, we will be using a Vcenter instance.


Plans: For plans, a source provider will need to be defined. Once a provider is added, you will have the ability to auto-discover the VMs that are running inside of those providers. For example, a default one that is configured is called host and this consists of the Openshift-Virtualization VMs that currently running this cluster. On the last page of this configuration the mapping will be specificed with takes the source networking and storage configurations and associates this with the equivalent resources on the destination cluster.

StorageMaps for Virtualization: This menu allows you to automatically associate a given source storage device with a destination storage device automatically.

NetworkMaps for Virtualization: This menu allows you to automatically associate a given source storage with a destination network automatically.

Migrating a VM

For this example, a VM will be running in a Vcenter cluster that I have. The VM is a simple Fedora-based VM. The intention here is to walk you through the configuration that is necessary and showing this process through to completion.

  1. On the Openshift Web Console, go to Migration -->Providers for virtualization menu.
  2. The following screenshot shows the default host provider that is setup. Notice the list of VMs and networks that are associated with this openshift-virtualization instance running on the current cluster.

    Click "Create Provider"

  1. On the resulting screen, you can choose the provider to add.

I will select VM/Vsphere. Once this box is highlighted, the "Create Provider" button will illuminate. Click "Create Provider".

  1. On the resulting screen, will be options to configure:

    Provider Resource Name: Provide a meaningful name for this instance of the provider.

    Endpoint Type: Standalone ESXi Host or Vcenter

    URL: The endpoint of the Vcenter API. An example of https://host.example.com/sdk is given. Change based on your environment.

    VDDK Init Image: For now, we will take it a little slow and skip the VDDK acceleration. A future article will show how to build this image.

    Username: Username for Vcenter (administrator user typically)

    Password: Password for this user

    I will skip certificate verification in my test environment.

Click "Create Provider" at the bottom of this screen.

  1. On the resulting page, more information on this cluster will eventually appear.

Here is an example of the inventory that appears related to the virtual machines that are running in this Vcenter instance.

  1. Let's create a migration plan and move the machine called fedora-mtv.
  2. On the Openshift Console, go to Plans for virtualization sub-menu.

    Click "Create Plan"
  1. On the resulting page, two options will be available for source provider. The original one called "host" and the Vcenter one we just added.

Select Vcenter

  1. Next, I will select the virtual machine in my environment called fedora-mtv.

Click "Create"

  1. On the next page, provide a name for the VM. It is called "fedora-mtv" in this example. The source provider is vcenter and it is going to the host provider (which is openshift virtualization on this cluster). All of the other defaults will be used for this simple example.

Click "Create Migration Plan"

  1. On the next screen, you will select "Start Migration"

Click "Start" to confirm

On the details screen will show an overall progress (out of 100%)

On the Virtual Machine tab, more details can be viewed such as the step in the migration pipeline that is currently running

Click on one of the status dots, will provide the specific step. In this case, ImageConversion is the step 3 of the pipeline.

Also, by clicking the arrow next to the fedora-mtv object on the Virtual Machine menu will show you the associated pod that is performing the migration (fedora-mtv-vm-21-k8djh) and the associate persistent volumes, etc.

  1. Let's look at the details of the migration pod.

    By looking at logs, you can see more progress information from this v2v pod.
  1. After some time, it will complete

The VM is now available