VM Migration with the Migration Toolkit for Virtualization

OpenShift Virtualization includes a simple way to migrate your existing virtual machines from other hypervisors with the included Migration Toolkit for Virtualization (MTV).

This demo highlights the migration of virtual machines from VMware vSphere to OpenShift.

We will use the Migration Toolkit for Virtualization to migrate virtual machines from VMware vSphere to OpenShift Virtualization.

Review the VMware Environment and Sample Application

SAY:

A three-tier application has been deployed on VMware for us to migrate to OpenShift.

The application is accessible from the following link: WebApp. The application will display a visitor counter, and the hostname of the webserver that returned your request.

This simple application consists of four virtual machines:

  • One HAproxy system that redirects traffic to the web servers.

  • One Linux system running a MariaDB database.

  • Two Microsoft Windows servers with IIS hosting a PHP application connecting to the database.

One benefit of migrating to OpenShift is that, if you have a simple loadbalancer configuration, you do not need to migrate the HAproxy VM (which acts as a load balancer). OpenShift already handles network traffic and load balancing natively, if desired.

Now, we will navigate to the VMware vCenter and take note of the names of the virtual machines we want to migrate.

  • database

  • winweb01

Only migrate the database and ONE of the webservers, so we’ll have one free to migrate automatically with Ansible in the next module. We cannot migrate a virtual machine twice; mac addresses are not unique.

DO:

  1. Navigate to the vCenter Console

    NN Launch vSphere
  2. If necesary, click LAUNCH VSPHERE CLIENT

  3. Login with the following credentials:

    • User: placeholder_vcenter_user

    • Password: placehoder_vcenter_password

      NN vSphere Login
  4. By default, you’ll land in the Inventory view at the top of the navigation tree. Click the Workloads icon and expand the navigation tree until you see the folder that matches your username and the four VMs under it. Click the VMs tab at the top of the screen to view the VM details.

    00 Workload VM List

SAY:

For the purposes of this demo, we have Windows and CentOS VMs to migrate. Check the operating system details by looking at the virtual machines.

DO:

  1. Click winweb01 in the list of virtual machines.

    NN vSphere VM Details
Do not start these VMware VMs. We are not supporting "warm" migrations in this demo. If your customer wants you to start and investigate these VMS, you may do so but must stop the VMs before beginning migration.

Migration Toolkit for Virtualization

SAY:

Let’s now look at how we’re going to migrate the virtual machines.

The Migration Toolkit for Virtualization has Providers that support various virtualization platforms.

We’ll be using the VMware Provider as our migration source and the Host Provider as our migration target.

Let’s have a look at them now.

DO:

  1. Navigate to the OpenShift Console and click MigrationProviders for virtualization

NN Migration Providers

If you do not see the Providers, select the openshift-mtv Project by:

  1. Click the Projects dropdown menu

  2. Enter mtv into the search box

  3. Enable Show default projects

select project openshift mtv

SAY:

Our list of providers contains two providers: Host and VMware.

VMware will be the source provider, and Host is of type OpenShift, which will be the target provider.

Create a Migration Plan

SAY:

Now that we have reviewed our environment, it is time for us to create a Migration Plan.

The Migration Plan selects which VMs to migrate from VMware vSphere to Red Hat OpenShift Virtualization and specifies how to execute the migration.

First, we’ll create a plan that indicates the source provider, VMware and the VMs we want to migrate.

DO:

  1. Navigate in the left menu to MigrationPlans for virtualization and press Create plan.

    NN Create VMware Plan
  2. You will be asked to select the source provider that you intend to migrate from. Click on the VMware tile, and the next page will open immediately.

    NN VMware Source Provider

SAY:

Next, we’ll select the VMs that we want to migrate.

As an aside: The VMs are auto-discovered by Migration Toolkit for Virtualization, and are organized into "Concerns." Concerns are an advanced feature, which is part of the Validation service that uses policy rules to check the suitability of each virtual machine (VM) for migration. The Validation service generates a list of concerns for each VM, which are stored in the Provider Inventory service as VM attributes. The web console displays the concerns for each VM in the provider inventory.

DO:

  1. On the next page select the two VMs you would like to move:

    • database

    • winweb01

The VMs are far too large to migrate in this short demo. But that’s OK, we have VMs that are already migrated to show after we’ve kicked off this migration process.
  1. Click Next.

    NN Create Migration Plan 2

SAY:

On this screen we provide details for of the migration plan.

We will give our plan a name, and make sure we’re using the proper network maps and storage maps.

DO:

  1. Several details will already be filled in for you, but you will have to make a few minor modifications to ensure that the VMs land in the correct namespace, and that the networks and storage options map correctly.

    Please fill in your migration plan with the following values:

    • Plan name: move-webapp-vmware

    • Target Provider: Host

    • Network map: Pod Networking

    • Storage map: ocs-storagecluster-ceph-rbd-virtualization

      The Storage Map name is very similar to the default.
      Storage and network mappings should be automatically detected from the discovered virtual machines, but make sure to double-check that the correct values are set as described in this guide. Make sure to change it to ocs-storagecluster-ceph-rbd-virtualization.
  2. Click Create migration plan.

    NN Create Migration Plan 3

SAY:

Now we wait a moment for our Migration Plan to be analysed by the system and ready to start the migration.

Sometimes it takes a few minutes to create the plan. Things to show while waiting for "Ready"

  1. Scroll down to the bottom of the page to show the Conditions and progress of plan preparation.

  2. Click through the tab bar on the top to show details about the required Resources for the migration have been computed.

  3. Consider ESXi performance during migration:

    1. Click "Storage Maps for virtualization," select the map, and indicate how the workload_share…​ mapping is what matches in VMware.

    2. Click the "VMware provider" and show how easy it is to refer back to your vCenter

    3. Click the "Virtual Machines" tab in the Provider Details page and show how migrations need to be planned for ESXi host capabilities, noting that most often, ESXi hosts are not configured to allow more than one virtual machine to be migrated simultaneously per host. Migrating multiple VMs simultaneously from a single ESXi host are quite likely to cause severe performance degradation for the rest of the hosts on that ESXi host.

Let’s start our migration!

DO:

  1. You will be taken to a new screen where you will see that the plan for migration is being made ready.

    NN Await Migration Plan Ready
  2. After a few moments the plan will become Ready, click on the green "Play" button in the center of the window to start the migration process.

    NN Migration Plan Ready
  3. You will be presented with a confirmation box to begin the migration, click on the Start button.

    NN Start Migration Modal
  4. A progress bar will appear in the center of the screen along with the status of 0 of 2 VMs migrated.

    NN Migration Plan Running

SAY:

We’ll want to see the progress of our migration. So let’s click on the progress bar to see the status of our migration.

DO:

  1. Click on the 0 of 2 VMs migrated link and you will be presented with a page with more details about the migration process.

    NN VMs Migrating Details

SAY:

We can see here that the migration has started.

Now let’s find out even more details about the specific stage of the migration process.

You can see the several stages of the migration process in the details panel.

Let’s watch it for a moment before moving on.

DO:

  1. You can click the drop-down arrow next to the name of each VM being migrated to get additional details about the stages of the migration process.

    NN VM Migration Stages
  2. The migration process is quite long, so display the changes for a few moments, and then move on.

  3. You can also show the logs of the migration process by clicking in Plan Details the tab Virtual Machines. From there you can see the logs of each VM being migrated.

    NN VM Migration Logs
    NN VM Migration Logs View

Validate the Migrated Windows VMs and Application

SAY:

OK, so we don’t have to sit here and watch 60GB traveling through the network. Let’s continue with an environment that we have already migrated.

OpenShift separates work into different projects, and each project can have its own set of virtual machines.

Let’s look at one of the Windows VMs and connect to it to take a closer look.

First, we need to switch to the project that contains our pre-migrated VMs.

DO:

  1. Click on Virtualization in the left menu, and then on Virtual Machines.

  2. Go to the Project: vmimported.

  3. Click on the winweb01 VM that is running and click on its name to see the VM details page.

    NN VM Name

SAY:

On this page we can see many details about the VMs that have been migrated to OpenShift Virtualization, especially the Windows desktop.

NN VM Details
This Windows Server is "Windows Core". More Info about Windows Core." There is no desktop, by default. You don’t need to log in, but if you need to, the password is 1qazXSW@

What are applications good for if you can’t connect to them?

So let’s look at the application that has been migrated and exposed to our organization.

For that, we have already created a "route". You can think of this as similar to a DNS name or a load balancer.

DO:

  1. Click Networking in the left menu, and then click on Routes.

  2. There should only be one route, route-webapp

  3. Click the Location link and your browser will open with the web application, showing the visitor counter and the web server hostname.

    NN VM Networking Routes
  4. The application should look something like this

    OpenShift Route is providing load balancing between the winweb01 and winweb02 hosts, so you might see either hostname reported.
    NN VM Migrated Application

Summary

SAY:

In this segment of the demo, we used the Migration Toolkit for Virtualization to assist with the migration of existing virtual machines from a VMware vSphere environment to OpenShift Virtualization.