Bookmark this page

Chapter 11. Introducing the Infrastructure Migration Solution

Abstract

Goal Describe the Infrastructure Migration Solution for migrating production virtual machines and networks from a VMware vSphere environment to Red Hat Virtualization.
Objectives
  • Describe how virtual machines and network are migrated from a VMware ESX environment to KVM hypervisors and RHV Manager.

Sections
  • Converting Instances with the Infrastructure Migration Solution (and Quiz)

Converting Instances with the Infrastructure Migration Solution

Objectives

After completing this section, you should be able to describe how virtual machines and networking are migrated from a VMware ESX environment to KVM hypervisors and RHV Manager.

Introducing the Infrastructure Migration Solution

Over the last decade, cloud migration rates have increased as organizations recognize the value of re-engineered applications and advanced hybrid cloud architectures. Red Hat customers working toward an infrastructure where workloads and resources span physical, virtual, and cloud-based environments, must migrate away from legacy virtualization solutions.

To help address this need, Red Hat created the Red Hat infrastructure migration solution (IMS), an enterprise-ready utility for migrating VMware ESX-based enterprise workloads to advanced Red Hat technology destinations, including Red Hat Virtualization, Red Hat OpenStack Platform, Red Hat Hyperconverged Infrastructure for Virtualization, and Red Hat Virtualization for Cloud. Workload migration provides the pathway to cloud-native application development via Linux containers, Kubernetes, automation, and other open source technologies.

The Phases of Migration

IMS is designed to safely manage and migrate VMware ESX-based workloads to an open source infrastructure platform. A standard migration consists of three phases:

Discovery Session

A complementary Discovery Session is scheduled to better understand and document the scope of the migration.

Migration pilot

One or more chosen open source platforms are deployed and made operational using Red Hat Hybrid Cloud Management infrastructure tooling. Pilot and practice migrations demonstrate typical approaches, establish initial migration capability, and define the resource requirements for a larger scale migration.

Migration at scale

IT teams perform workload migration at scale. Red Hat Consulting offers design and implementation assistance to build and optimize production infrastructure, unify and streamline operations across virtualization pools, and navigate complex migration cases.

Open Source Platform Destinations

After the Discovery Session, recommendations are provided for a more flexible open source virtualization platform based on Red Hat technologies, including:

Red Hat Virtualization (RHV)

A software-defined infrastructure and centralized management platform for traditional virtualized Linux and Windows workloads. RHV is also the platform for integrating future cloud-native and container-based applications.

Red Hat OpenStack Platform (RHOSP)

RHOSP builds an on-premise cloud architecture that provides resource elasticity, scalability, and efficient user self-service and management.

Red Hat Hyperconverged Infrastructure (RHHI)

There are two choices: RHHI-V using RHV and Red Hat Gluster Storage, and RHHI-C for cloud using RHOSP and Red Hat Ceph Storage. Each provides consolidated compute, network, and storage resources in a form-factor designed for back office, remote office, and edge computing.

IMS is based on Red Hat management technologies, including Red Hat Ansible Automation and the Red Hat CloudForms management platform, built on top of Red Hat Enterprise Linux and Kernel-based Virtual Machine (KVM) technology. Existing workloads are analyzed and migrated in a controlled manner designed to successfully preserve workload-specific business requirements.

Container Native Virtualization (CNV)

During an infrastructure migration, some applications may run more efficiently in containers, which in some cases can help to eliminate the need for legacy virtual machines. For these scenarios, the Red Hat infrastructure migration solution provides the path to adopt Linux containers and Kubernetes orchestration via Red Hat OpenShift Container Platform as the common hybrid cloud platform. Red Hat OpenShift simplifies the migration of existing applications to Linux containers, enabling organizations to benefit from cloud-native workloads as a final migration destination.

Important

Container-native Virtualization (CNV) allows legacy virtual workloads to run in container environments, further enabling migration directly from legacy workloads to cloud-native platforms. Learn about CNV and hybrid cloud developments by viewing technical breakout sessions recorded at Red Hat Summit 2019 in Boston.

Red Hat is developing platforms to merge distinctions between virtual machines and containers. Red Hat CNV, based on the open source KubeVirt community project, enables developers to work with VMs in the same way that they work with Linux container-based applications, thus eliminating the current legacy and microservice application development silos.

Preparing For Infrastructure Migration

This section overviews an IMS deployment and virtual machine migration steps. It is not intended to cover all use cases. Typical large migrations require preparation, such as mapping networks and resources in the source environment to the RHV destination. Only a migration to Red Hat Virtualization is discussed, as is appropriate for this course.

The minimum product versions required to run the solution are the following:

  • CloudForms 4.7.0+

  • Red Hat Virtualization 4.2.7+

  • Red Hat Enterprise Linux (Hypervisor) 7.6+

  • Red Hat OpenStack Platform 13+

  • VMware vSphere 5.5+

The software to install on the machines is obtained from the following Red Hat repositories:

  • rhel-7-server-rpms (RHEL 7.6 virt-v2v updates needed)

  • jb-eap-7-for-rhel-7-server-rpms (JBoss EAP 7 rpm packages for RHV and for JBoss VMs)

  • rhel-7-server-optional-rpms (RHEL 7.6 optional packages)

  • rhel-7-server-extras-rpms (RHEL 7.6 extras packages)

  • rhel-7-server-supplementary-rpms (RHEL 7.6 supplementary packages)

  • rhel-7-server-rhv-4.2-manager-rpms (RHV Manager 4.2 packages)

  • rhel-7-server-rhv-4-manager-tools-rpms (RHV Manager 4.2 tools packages)

  • rhel-7-server-rhv-4-mgmt-agent-rpms (RHV 4 agents for RHEL)

  • rhel-7-server-ansible-2-rpms (Ansible 2.x packages)

  • rhel-7-server-rh-common-rpms (RH common packages agents)

Enabling Red Hat Virtualization as a Migration Target

Figure 11.0: Red Hat Virtualization VM migration workflow

1

The Infrastructure Admin creates an infrastructure mapping and a virtual machine migration plan in CloudForms, and runs the migration plan.

2

CloudForms locates the virtual machines to be migrated, based on the infrastructure mapping.

3

The ESXi host fingerprint is captured for authentication during the conversion process if the VDDK transport method is used. If SSH is used, then a shared SSH key is used to connect to the ESX host on which the virtual machine resides.

4

Using the RHV attributes for the target environment, CloudForms initiates communication with the RHV conversion host.

5

The RHV conversion host connects to the source data store through the ESX host, using virt-v2v-wrapper.py, and streams the disk to be converted to the target data domain that was selected in the infrastructure mapping usingvirt-v2v.

6

After the disk is converted, the target virtual machine is created in RHV. During creation, the target virtual machine uses the source metadata from the virtual machine to maintain virtual machine attributes, such as tags, power state, MAC address, CPU count, memory, disks, and virtual machine name, after migration.

7

After the virtual machine is created, the disk is attached to the target virtual machine. The VM migration is complete. The status is displayed in CloudForms throughout the process.

RHV Conversion Host Requirements

To perform the VM conversion tasks during migration, a conversion host is required. For Red Hat Virtualization, the architectural choice is to use RHEL Hypervisors as conversion hosts.

VDDK SDK

VMware-vix-disklib-6.5.2-6195444.x86_64.tar.gz (Virtual Disk Development Kit)

nbdkit SRPMS

rhel-7-server-rhv-4-mgmt-agent-source-rpms (nbdkit Source RPMS)

Add a vSphere Virtualization Provider

In CloudForms, locate the infrastructure providers window to add a new provider. The provider type is VMware vCenter, and requires you to enter the vCenter host name and an administrators username and password. Before completing the addition, use the Validate button to check for successful access. Once validated, the Credential validation was successful message displays. Finally, click the Add button finish the addition.

Figure 11.1: Add vSphere to CloudForms

Add an RHV Virtualization Provider

Add a the RHV environment as an infrastructure provider. The provider type is Red Hat Virtualization, and requires you to enter the RHV-M host name, and an administrators username and password. Additionally, deactivate the Verify TLS Certificates and use the Validate button to check for successful access. Once validated, the Credential validation was successful message displays. Finally, click the Add button to complete the addition.

Figure 11.2: Add RHV to CloudForms

Adding Credentials to a Conversion Host in RHV

In CloudForms, existing RHV hosts were discovered by adding the provider. Selected hosts have significant physical resources to perform migration disk conversions. Locate the Hosts window, and supply a privileged username and password. Validate successful access, and then save the configuration. Perform this step for each RHV host and ESX host that is involved in the migration.

Figure 11.3: Adding credentials to conversion host in RHV

Installing Tools in Conversion Host in RHV

The conversion hosts require additional software installations. An Ansible playbook is provided, which requires an inventory file, similar to the following:

[root@workstation ~]# ssh rhvm
[root@rhvm ~]# cd /usr/share/ovirt-ansible-v2v-conversion-host/playbooks
[root@rhvm ~]# cat conversion_hosts_inventory.yml
all:
  vars:
    ansible_ssh_private_key_file: /etc/pki/ovirt-engine/keys/engine_id_rsa
    v2v_repo_rpms_name: "rhel-7-server-rhv-4-mgmt-agent-rpms"
    v2v_repo_rpms_url: "http://storage.example.com/repos/rhel-7-server-rhv-4-mgmt-agent-rpms"
    v2v_repo_srpms_name: "rhel-7-server-rhv-4-mgmt-agent-source-rpms"
    v2v_repo_srpms_url: "http://storage.example.com/repos/rhel-7-server-rhv-4-mgmt-agent-source-rpms"
    v2v_vddk_package_name: "VMware-vix-disklib-6.5.2-6195444.x86_64.tar.gz"
    v2v_vddk_package_url: "http://storage.example.com/repos/VMware-vix-disklib-6.5.2-6195444.x86_64.tar.gz"
    manageiq_url: "https://cf.example.com"
    manageiq_username: "admin"
    manageiq_password: "redhat"
    manageiq_zone_id: "1"
    manageiq_providers:
      - name: "RHV"
        connection_configurations:
          - endpoint:
              role: "default"
              verify_ssl: false
  hosts:
    kvm1.example.com:
    kvm2.example.com:
      v2v_host_type: rhv
      v2v_transport_methods:
        - vddk
      manageiq_provider_name: "RHV"

A conversion_host_check.yml playbook is provided to verify proper installation. Use the conversion_host_enable.yml playbook to install the necessary tools, and then use the host check playbook to verify the installation.

[root@rhvm ~]# cd /usr/share/ovirt-ansible-v2v-conversion-host/playbooks
[root@rhvm ~]# ansible-playbook --inventory-file=conversion_hosts_inventory.yml conversion_host_enable.yml
[root@rhvm ~]# ansible-playbook --inventory-file=conversion_hosts_inventory.yml conversion_host_check.yml

When the conversion host software is properly installed, the conversion host is found in the vmdb on the CloudForms host. SSH into the CloudForms host and query the database.

[root@cf ~]# vmdb
[root@cf vmdb]# rails c
** CFME 5.10.0.29, codename: Hammer
Loading production environment (Rails 5.0.7.1)
irb(main):002:0> pp ConversionHost.all
[#<ConversionHost:0x0000000000a23e88
  id: 1,
  name: "kvm2.example.com",
  address: nil,
  type: nil,
  resource_type: "Host",
  resource_id: 4,
  version: nil,
  max_concurrent_tasks: nil,
  vddk_transport_supported: true,
  ssh_transport_supported: false,
  created_at: Tue, 15 Jan 2019 14:44:53 UTC +00:00,
  updated_at: Tue, 15 Jan 2019 14:44:53 UTC +00:00,
  concurrent_transformation_limit: nil,
  cpu_limit: nil,
  memory_limit: nil,
  network_limit: nil,
  blockio_limit: nil>]
=> #<ActiveRecord::Relation [#<ConversionHost id: 1, name: "kvm2.example.com", address: nil, type: nil, resource_type: "Host", resource_id: 4, version: nil, max_concurrent_tasks: nil, vddk_transport_supported: true, ssh_transport_supported: false, created_at: "2019-01-15 14:44:53", updated_at: "2019-01-15 14:44:53", concurrent_transformation_limit: nil, cpu_limit: nil, memory_limit: nil, network_limit: nil, blockio_limit: nil>]>

Notice the transport methods and concurrent task settings at the bottom of the output. There are two choices for supported transport methods:

VDDK

VMware Virtual Disk Development Kit is recommended, and uses the ESXi server Network File Copy (NFC) service for the transformation.

SSH

SSH transformation is the fallback option. Configure the VMware hypervisors for passwordless access by sharing a public SSH key for the conversion hosts with the hypervisors.

Adding Ansible Playbooks

The final preparation step is to install the IMS migration and conversion Ansible playbooks onto the CloudForms system. The CloudForms system must be configured to enable the Embedded Ansible role on the EVM Configuration screen. It may take up to ten minutes to enable this role, configure the feature, and start the Embedded Ansible Worker service.

The Ansible playbooks perform the migration tasks by copying virtual machine disks for processing. Configure the credential username and password used by the Ansible playbooks.

Configure CloudForms to have access to the Ansible repository for the playbooks. The repository should be set to update playbooks to the latest stored version each time one is launched. If the repository is correctly configured, then the Ansible Playbooks screen will list the available playbooks.

To make the playbooks available in CloudForms, add a catalog item for the Ansible playbooks. Configure the provisioning by selecting the repository, the playbook, and the machine credentials of the systems to be migrated. The environment is now ready to perform a migration.

Performing an Infrastructure Migration

Infrastructure Mapping

A migration requires a mapping between the source infrastructure resources and the RHV destination. CloudForms provides a wizard to walk through each resource to map. The first resource is the compute hosts, where source and destination clusters are mapped to each other.

Figure 11.4: Mapping compute hosts by selecting clusters

The next resource is storage, for mapping data stores to RHV data domains.

Figure 11.5: Mapping storage by selecting data stores

There will be a map for each network, including VM networks, storage networks, the management network, and any others required by VMs being migrated.

Figure 11.6: Mapping networks by selecting logical networks

Migration Plan

A migration plan is used to select the virtual machines to be migrated. CloudForms provides a selector wizard in the Migration Plans screen, with manual section and filters available for locating the correct VMs. Larger lists can be uploaded using a CSV file.

Figure 11.7: Selecting virtual machines

Selected virtual machines can be assigned Ansible playbooks for pre- and post-processing tasks.

Figure 11.8: Configuring migration options

The migration plan can be run immediately, or saved to launch later. When initiated, the plan gathers data and performs pre-migration checks. Once approved, the migration starts.

Figure 11.9: Observing the virtual machines in CloudForms

The CloudForms logs contain a record of the orchestration process. See /var/www/miq/vmdb/log/automation.log on the CloudForms server.

The conversion process for each VM can be tracked in the conversion host logs. See /var/log/vdsm/import/v2v-import-* on each conversion host.

Figure 11.10: Observing the virtual machines in RHV

Progress can also be monitored on the Migration Plan screen. Each VM to migrate will be powered off in vSphere, migrated, and then powered on in RHV. As they arrive, VMs can be observed from the RHV Virtual Machines screen. When all VMs have been converted, the migration is complete.

Revision: rh318-4.3-c05018e