Migrate VMs

You can use the Red Hat OpenStack VMware Migration toolkit to help you move cloud workloads from a VMware environment to a Red Hat OpenStack Services on OpenShift (RHOSO) environment.

Prerequisites

  • Source and destination cloud deployments.
  • An instance of Red Hat Ansible Automation Environment 2.5 or later.
  • Red Hat Enterprise Linux (RHEL) 9.6 or later QCOW image onboarded on the destination cloud for the conversion host.
  • A host to run Ansible Builder.
  • Network access for outbound HTTPS and inbound SSH.
  • RHOSO permissions that allow you to perform the following operations:
    • Instance creation and deletion.
    • Network resource management.
    • Security group management.
    • Key pair management.
    • Floating IP allocation.

Migration features

You can use the following features when migrating:

  • Discovery mode.
  • Network mapping.
  • Port creation and MAC addresses mapping.
  • Openstack flavor mapping and creation.
  • Migration with nbdkit server with change block tracking (CBT) feature.
  • Multi-disk migration.
  • Multiple NICs.
  • Parallel migration on the same conversion host.
  • Ansible Automation Platform (AAP)

Migration tools and workflows

Use the Red Hat OpenStack VMware Migration toolkit Ansible collection to deploy an OpenStack instance in the destination cloud as a conversion host and configure the prerequisites in the destination cloud. You can gather information about the source cloud by using the VMware community collection.

The following are the different phases of migration:

  • The discovery phase when you analyze the VMware source environment and collect data for the migration.
  • The pre-migration phase when you make the destination cloud ready to accept the migration. You can configure your conversion host, the required network, and other configurations, as necessary.
  • The migration phase.

To migrate your VMs, you can use the nbdkit server with a conversion host. You can configure the workflows with Ansible boolean variables. You can run the migration in a single cycle with minimal downtime if you use VMware’s change block tracking (CBT) option.

Figure 1. Migration of a VM from VMware to RHOSO with CBT

Migration with CBT

Figure 2. Migration of a VM from VMware to RHOSO with CBT continued

Migration with CBT continued

Supported guest operating systems for migration

The VMware Migration Toolkit uses virt-v2v for conversion. For a list of supported guest operating systems for virt-v2v, see the Red Hat Knowledgebase article: Converting virtual machines from other hypervisors to KVM with virt-v2v in RHEL 7, RHEL 8, RHEL 9, and RHEL 10.

RHOSO uses Kernel-based Virtual Machine (KVM) for hypervisors. For a list of certified guest operating systems for KVM, see the Red Hat Knowledgebase article: Certified Guest Operating Systems in Red Hat OpenStack Platform, Red Hat Virtualization, Red Hat OpenShift Virtualization and Red Hat Enterprise Linux with KVM.

Migration prerequisites

Before you migrate VMware workloads to Red Hat OpenStack Services on OpenShift (RHOSO), perform the following checks and validations:

  • Ensure that all virtual machine (VM) disks are consolidated.
  • Check the snapshot hierarchy depth and remove or consolidate unnecessary snapshots.
  • If you use large disks, enable Change Block Tracking (CBT) on the VMs. CBT is a VMware vSphere feature that tracks which disk blocks of a virtual machine (VM) have changed since the last backup or snapshot. You can enable CBT in VMware vSphere.
  • If you use CBT, ensure that VMware Tools is installed.
  • Ensure that you apply the following network configurations:
    Expand
    Table 1. Network requirements
    Port / Protocol Direction Source / Destination

    443 / TCP

    Egress

    VMware vCenter

    902 / TCP

    Egress

    VMware ESXi hosts

    22 / TCP

    Ingress

    Ansible Controller / Admin

    10809 / TCP

    Internal on host

    Conversion host

  • Configure the appropriate VMware user Access Control Lists (ACL)s:
    Expand
    Table 2. VMware user Access Control Lists (ACL)s
    Category Privilege Group Privileges

    Datastore

    Browse Datastore

    Virtual Machine

    Guest operations

    All

    Provisioning

    Allow disk access

    Allow file access

    Allow read-only disk access

    Allow virtual machine download

    Service configuration

    Allow notifications

    Allow polling of global event notifications

    Read service configuration

    Snapshot management

    Create snapshot

    Remove snapshot

    Rename snapshot

    Revert to snapshot

VM seeding

To optimize migrating large disks, you can use VM seeding and Change Block Tracking (CBT). CBT tracks the recent VM disk block changes. With VM seeding, you seed most of the VM data incrementally while the VM is live before the final cut-over, when you only need to migrate the VM delta.

The VM in the VMware environment must have the following specifications:

  • Virtual hardware version 7 or newer.
  • Flat VMDK disks that are not independent.
  • The VM must be on VMFS or NFS datastores that are supported by vSphere.

The VM seeding workflow consists of the following steps:

  1. Perform an initial full copy of the VM disks from VMware to the target RHOSO volume.
  2. Perform subsequent incremental copies that transfer only the blocks that have changed since the previous sync.
  3. Repeat these incremental synchronizations as many times as you need while the VM continues running.
  4. When the maintenance window arrives, stop the VM and perform a final incremental sync to capture the last changes before the cut-over.

You can transform migration from a risky single event into a safer multi-stage process. You control seeding and cut-over with 2 flags:

  • cbt_sync
  • cutover

When you are seeding, use the following values:

cbt_sync: true
cutover: false

When you perform the cut-over, use the following values:

cbt_sync: true
cutover: true

Enable Change Block Tracking for incremental migration

If you use large disks, enable Change Block Tracking (CBT) on the VMs to minimize downtime. CBT is a VMware vSphere feature that tracks which disk blocks of a virtual machine (VM) have changed since the last backup or snapshot.

Before you begin

  • VMware Tools must be installed on the VM.
  • You must power off the VM or take a snapshot to apply the changes.
  • vSphere 4.0 or later.

Procedure

  1. Check VMware Tools status:
    1. On the vSphere Client, select the VM and click the Summary tab.
    2. Verify if the status of VMware Tools is Running or OK.
    3. (Optional) If the status of VMware Tools is Not installed or Not running, right click the VM, select Guest OS, Install VMware Tools, and follow the VMware Tools installation process for the guest operating system.
  2. Power off the VM.
  3. Edit the VM settings and set the stkEnabled parameter to TRUE:
    ctkEnabled = TRUE
  4. Set ctkEnabled = TRUE for each disk on the VM:
    scsi0:0.ctkEnabled = TRUE
    scsi0:1.ctkEnabled = TRUE
    scsi0:2.ctkEnabled = TRUE
    ...
    ...
  5. Power on the VM.

Results

  • In the vSphere Client, check the VM configuration for the changeTrackingEnabled parameter.