Welcome to the Red Hat OpenShift Virtualization Roadshow

This roadshow event is organized to allow you to have a hands-on experience with Red Hat® OpenShift® Virtualization. It explores many common management activities that virtualization administrators often encounter in their day to day workflows.

This roadshow event is organized to allow you to have a hands-on experience with Red Hat® OpenShift® Virtualization. It explores many common management activities that virtualization administrators often encounter in their day to day workflows.

Migrating existing virtual machines

15 mins

This portion of our lab uses the Migration Toolkit for Virtualization (MTV) to import virtual machines from VMware vSphere to Red Hat OpenShift. The migration toolkit supports two "modes" of import:

  • Cold migration turns off the source virtual machine before starting the migration. This is the default migration type.

  • Warm migration copies data while the source virtual machine continues to run. Once the bulk of data has been migrated, the VM is shutdown and the final data is copied to the destination. The new VM can then be started, resulting in a much shorter period of downtime for the VM-hosted application.

Note: The migration toolkit has already been deployed to your cluster using the Operator available in OperatorHub.

Documentation for how to install and configure the Operator can be found here.

If you would like to learn more about how to configure the Migration Toolkit for Virtualization for your own needs, please see the documentation at the following links for:

 

What will you learn?

  • How to use the Migration Toolkit for Virtualization (MTV) to migrate a VM from an existing VMware vSphere environment to OpenShift Virtualization.

What do you need before starting?

The following prerequisites apply to all migrations:

  • ISO/CD-ROM disks must be unmounted.

  • Each NIC must contain one IPv4 and/or one IPv6 address.

  • The VM operating system must be certified and supported for use as a guest operating system for Red Hat OpenShift Virtualization.

  • VM names must contain only lowercase letters (a-z), numbers (0-9), or hyphens (-), up to a maximum of 253 characters. The first and last characters must be alphanumeric. The name must not contain uppercase letters, spaces, periods (.), or special characters.

  • VM names must not duplicate the name of an existing VM in the OpenShift Virtualization environment.

Note: The Migration Toolkit for Virtualization will automatically assign a new name to a VM that does not comply with the rules, doing so allows the migration to proceed smoothly.

Migrating virtual machines from VMware

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

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

The application consists of the following 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

For this lab, you will be tasked with migrating three of the four virtual machines using cold migration.

 

Note: You will not need to migrate the HAproxy (load balancer) VM because OpenShift handles network traffic and load balancing natively for VMs connected to the SDN using a Service.

Review the VMware environment

To help understand the process of mapping resources, such as datastores and port groups, from vSphere into OpenShift’s equivalents, storage classes and network attachment definitions, let’s begin by reviewing the source environment for the migrations.

  1. Navigate to VMware vCenter: vCenter Console

  2. Login with the following credentials:

    1. User: {vcenter_user}

    2. Password: {vcenter_password}

  3. 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 4 VMs under it. Click the VMs tab at the top of the screen to view the VM details (Figure 1).

    00 Workload VM List
    Figure 1

     

  4. Change to the Networks view, then expand the tree to view the port group used by the virtual machines (Figure 2). Note that the name is segment-migrating-to-ocpvirt.

    01 vSphere Network
    Figure 2

     

  5. Finally, review the datastores in use by browsing to the Datastores view. Expand the tree to see the datastores that are attached to the SDDC-Datacenter, and optionally browse to the VMs sub-tab to view the capacity used by each virtual machine.

    02 vSphere Datastore
    Figure 3

Review the VMware provider to the migration toolkit

The Migration Toolkit for Virtualization (MTV) uses the VMware Virtual Disk Development Kit (VDDK) SDK to transfer virtual disks from VMware vSphere. The VDDK has already been configured for you in this environment.

  1. Navigate in the left menu to MigrationProviders for virtualization

  2. Select project openshift-mtv (You may need to toggle the Show default projects slider (Figure 4).

    03 MTV Providers
    Figure 4

     

    Tip: MTV 2.4 and later are project/namespace aware and do not require administrator privileges. You can delegate VM imports to application teams and VM users so that they can self-serve and migrate at their own pace!

  3. By default, there is a provider called host which represents OpenShift Virtualization as a target platform (Figure 5).

    04 MTV Provider List
    Figure 5

     

  4. The lab is already configured with the VMWare provider named vmware and it is marked as a migration source.

Create a migration plan

Now that we have reviewed our environment, and have our providers created, it is time for us to create a Migration Plan. This plan selects which VMs to migrate from VMware vSphere to Red Hat OpenShift Virtualization and specifics about how to execute the migration.

  1. Navigate in the left menu to MigrationPlans for virtualization and press Create plan (Figure 6).

    14 Create VMWARE Plan
    Figure 6

     

  2. You will be asked to select the source provider that you intend to migrate from. Click on the VMware tile (Figure 7).

    16 VMware Source Provider
    Figure 7

     

  3. On the next page select the three VMs you would like to move:
    1. database
    2. winweb01
    3. winweb02
  4. Click Next (Figure 8).

    17 VM Select VMWARE Plan
    Figure 8

     

  5. On the next screen you will be tasked with providing details for your migration plan. 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:

    1. Plan name: move-webapp-vmware
    2. Target namespace: vmexamples
    3. Network map: Pod Networking
    4. Storage map: ocs-storagecluster-ceph-rbd-virtualization

      Note: Both the Network and Storage map will automatically detect the Network and Datastore that the discovered virtual machines currently make use of on the source provider. You will just need to make sure that their respective values are set correctly on the OpenShift side.

  6. Click Create migration plan (Figure 9).

    18 Create Migration Plan
    Figure 9

     

  7. You will be taken to a new screen where you will see that the plan for migration is being made ready (Figure 10).

    19 Migration Plan Unready
    Figure 10

     

  8. 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 (Figure 11).

    20 Migration Plan Ready
    Figure 11

     

  9. You will be presented with a confirmation box to begin the migration, click on the Start button (Figure 12).

    21 Confirm Migrate Start
    Figure 12

     

  10. A progress bar will appear in the center of the screen along with the status of 0 of 3 VMs migrated (Figure 13).

    22 VMs Migrating
    Figure 13

     

  11. Click on the 0 of 3 VMs migrated link and you will be presented with a page with more details about the migration process (Figure 14).

    23 VMs Migrating Details
    Figure 14

     

  12. 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 (Figure 15).

    24 VM Migration Stages
    Figure 15

     

    Important: Having many participants performing the same task in parallel in a simulated lab environment can cause this task to perform much slower than in a real environment. For this lab instance we have limited the number of in-flight VMs to 1 at a time. Please be patient with this process as it completes. You may continue with other sections in the roadshow as the migrations complete.

  13. After several minutes the migration has completed (Figure 16).

    25 Completed VMWARE Plan
    Figure 16

     

  14. The selected VMs have now been migrated and can be started on OpenShift Virtualization.

Summary

In this section, we explored the Migration Toolkit for Virtualization, and used it to assist with the migration of existing virtual machines from a VMware vSphere environment to OpenShift Virtualization. In addition to the Migration Toolkit for Virtualization, there are three other migration toolkits. The combination of these can be used to move many types of workloads into and within OpenShift clusters depending on your organization’s needs.

For more information about these other migration toolkits, please reach out to your Red Hat account team.

Previous resource
Virtual machine management
Next resource
Bare metal infrastructure management

This learning path is for operations teams or system administrators

Developers may want to check out Foundations of OpenShift on developers.redhat.com. 

Get started on developers.redhat.com

Hybrid Cloud Logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy, sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.