Chapter 7. Migrating virtual machines from Red Hat Virtualization


7.1. Adding a Red Hat Virtualization source provider

You can add a Red Hat Virtualization source provider by using the Red Hat OpenShift web console.

Prerequisites

  • Manager CA certificate, unless it was replaced by a third-party certificate, in which case, specify the Manager Apache CA certificate

Procedure

  1. In the Red Hat OpenShift web console, click Migration Providers for virtualization.
  2. Click Create Provider.
  3. Click Red Hat Virtualization
  4. Specify the following fields:

    • Provider resource name: Name of the source provider.
    • URL: URL of the API endpoint of the Red Hat Virtualization Manager (RHVM) on which the source VM is mounted. Ensure that the URL includes the path leading to the RHVM API server, usually /ovirt-engine/api. For example, https://rhv-host-example.com/ovirt-engine/api.
    • Username: Username.
    • Password: Password.
  5. Choose one of the following options for validating CA certificates:

    • Use a custom CA certificate: Migrate after validating a custom CA certificate.
    • Use the system CA certificate: Migrate after validating the system CA certificate.
    • Skip certificate validation : Migrate without validating a CA certificate.

      1. To use a custom CA certificate, leave the Skip certificate validation switch toggled to left, and either drag the CA certificate to the text box or browse for it and click Select.
      2. To use the system CA certificate, leave the Skip certificate validation switch toggled to the left, and leave the CA certificate text box empty.
      3. To skip certificate validation, toggle the Skip certificate validation switch to the right.
  6. Optional: Ask MTV to fetch a custom CA certificate from the provider’s API endpoint URL.

    1. Click Fetch certificate from URL. The Verify certificate window opens.
    2. If the details are correct, select the I trust the authenticity of this certificate checkbox, and then, click Confirm. If not, click Cancel, and then, enter the correct certificate information manually.

      Once confirmed, the CA certificate will be used to validate subsequent communication with the API endpoint.

  7. Click Create provider to add and save the provider.

    The provider appears in the list of providers.

  8. Optional: Add access to the UI of the provider:

    1. On the Providers page, click the provider.

      The Provider details page opens.

    2. Click the Edit icon under External UI web link.
    3. Enter the link and click Save.

      Note

      If you do not enter a link, MTV attempts to calculate the correct link.

      • If MTV succeeds, the hyperlink of the field points to the calculated link.
      • If MTV does not succeed, the field remains empty.

7.2. Adding an OpenShift Virtualization destination provider

You can use a Red Hat OpenShift Virtualization provider as both a source provider and destination provider.

Specifically, the host cluster that is automatically added as a OpenShift Virtualization provider can be used as both a source provider and a destination provider.

You can also add another OpenShift Virtualization destination provider to the Red Hat OpenShift web console in addition to the default OpenShift Virtualization destination provider, which is the cluster where you installed MTV.

You can migrate VMs from the cluster that MTV is deployed on to another cluster, or from a remote cluster to the cluster that MTV is deployed on.

Prerequisites

Procedure

  1. In the Red Hat OpenShift web console, click Migration Providers for virtualization.
  2. Click Create Provider.
  3. Click OpenShift Virtualization.
  4. Specify the following fields:

    • Provider resource name: Name of the source provider
    • URL: URL of the endpoint of the API server
    • Service account bearer token: Token for a service account with cluster-admin privileges

      If both URL and Service account bearer token are left blank, the local OpenShift cluster is used.

  5. Choose one of the following options for validating CA certificates:

    • Use a custom CA certificate: Migrate after validating a custom CA certificate.
    • Use the system CA certificate: Migrate after validating the system CA certificate.
    • Skip certificate validation : Migrate without validating a CA certificate.

      1. To use a custom CA certificate, leave the Skip certificate validation switch toggled to left, and either drag the CA certificate to the text box or browse for it and click Select.
      2. To use the system CA certificate, leave the Skip certificate validation switch toggled to the left, and leave the CA certificate text box empty.
      3. To skip certificate validation, toggle the Skip certificate validation switch to the right.
  6. Optional: Ask MTV to fetch a custom CA certificate from the provider’s API endpoint URL.

    1. Click Fetch certificate from URL. The Verify certificate window opens.
    2. If the details are correct, select the I trust the authenticity of this certificate checkbox, and then, click Confirm. If not, click Cancel, and then, enter the correct certificate information manually.

      Once confirmed, the CA certificate will be used to validate subsequent communication with the API endpoint.

  7. Click Create provider to add and save the provider.

    The provider appears in the list of providers.

7.3. Selecting a migration network for an OpenShift Virtualization provider

You can select a default migration network for an OpenShift Virtualization provider in the Red Hat OpenShift web console to improve performance. The default migration network is used to transfer disks to the namespaces in which it is configured.

After you select a transfer network, associate its network attachment definition (NAD) with the gateway to be used by this network.

If you do not select a migration network, the default migration network is the pod network, which might not be optimal for disk transfer.

Note

You can override the default migration network of the provider by selecting a different network when you create a migration plan.

Procedure

  1. In the Red Hat OpenShift web console, click Migration > Providers for virtualization.
  2. Click the OpenShift Virtualization provider whose migration network you want to change.

    When the Providers detail page opens:

  3. Click the Networks tab.
  4. Click Set default transfer network.
  5. Select a default transfer network from the list and click Save.
  6. Configure a gateway in the network used for MTV migrations by completing the following steps:

    1. In the Red Hat OpenShift web console, click Networking > NetworkAttachmentDefinitions.
    2. Select the appropriate default transfer network NAD.
    3. Click the YAML tab.
    4. Add forklift.konveyor.io/route to the metadata:annotations section of the YAML, as in the following example:

      apiVersion: k8s.cni.cncf.io/v1
      kind: NetworkAttachmentDefinition
      metadata:
        name: localnet-network
        namespace: mtv-test
        annotations:
          forklift.konveyor.io/route: <IP address> 1
      1
      The NetworkAttachmentDefinition parameter is needed to configure an IP address for the interface, either from the Dynamic Host Configuration Protocol (DHCP) or statically. Configuring the IP address enables the interface to reach the configured gateway.
    5. Click Save.

7.4. Creating a migration plan

Use the Red Hat OpenShift web console to create a migration plan. Specify the source provider, the virtual machines (VMs) you want to migrate, and other plan details.

Warning

Do not include virtual machines with guest-initiated storage connections, such as Internet Small Computer Systems Interface (iSCSI) connections or Network File System (NFS) mounts. These require either additional planning before migration or reconfiguration after migration.

This prevents concurrent disk access to the storage the guest points to.

Important

A plan cannot contain more than 500 VMs or 500 disks.

Procedure

  1. In the Red Hat OpenShift web console, click Plans for virtualization and then click Create Plan.

    The Create migration plan wizard opens to the Select source provider interface.

  2. Select the source provider of the VMs you want to migrate.

    The Select virtual machines interface opens.

  3. Select the VMs you want to migrate and click Next.

    The Create migration plan pane opens. It displays the source provider’s name and suggestions for a target provider and namespace, a network map, and a storage map.

  4. Enter the Plan name.
  5. To change the Target provider, the Target namespace, or elements of the Network map or the Storage map, select an item from the relevant list.
  6. To add either a Network map or a Storage map, click the + sign and add a mapping.
  7. Click Create migration plan.

    MTV validates the migration plan, and the Plan details page opens, indicating whether the plan is ready for use or contains an error.

    The details of the plan are listed, and you can edit the items you filled in on the previous page. If you make any changes, MTV validates the plan again.

  8. Check the following items in the Settings section of the page:

    • Migration type: Type of migration. By default, MTV sets the migration type to cold.

      • For a warm migration, do the following:

        • Click the Edit icon.
        • Toggle the Whether this is a warm migration switch.
        • Click Save.
    • Transfer Network: The network used to transfer the VMs to OpenShift Virtualization. This is the default transfer network of the provider. Verify that the transfer network is in the selected target namespace.

      • To edit the transfer network, do the following:

        • Click the Edit icon.
        • Select a different transfer network from the list.
        • Click Save.
      • Optional: To configure an OpenShift network in the OpenShift web console, click Networking > NetworkAttachmentDefinitions.

        To learn more about the different types of networks OpenShift supports, see Additional Networks in OpenShift Container Platform.

      • Optional: To adjust the maximum transmission unit (MTU) of the OpenShift transfer network, you must also change the MTU of the VMware migration network. For more information, see Selecting a migration network for a VMware source provider.
    • Target namespace: Destination namespace for all the migrated VMs. By default, the destination namespace is the current or active namespace.

      • To edit the namespace, do the following:

        • Click the Edit icon.
        • Select a different target namespace from the list in the window that opens.
        • Click Save.
    • Preserving the CPU model of VMs that are migrated from RHV: Generally, the CPU model (type) for RHV VMs is set at the cluster level. However, the CPU model can be set at the VM level, which is called a custom CPU model.

      By default, MTV sets the CPU model on the destination cluster as follows: MTV preserves custom CPU settings for VMs that have them. For VMs without custom CPU settings, MTV does not set the CPU model. Instead, the CPU model is later set by OpenShift Virtualization.

      • To preserve the cluster-level CPU model of your RHV VMs, do the following:

        • Click the Edit icon.
        • Toggle the Whether to preserve the CPU model switch.
        • Click Save.
  9. If your plan is valid, you can do one of the following:

    1. Run the plan now by clicking Start migration.
    2. Run the plan later by selecting it on the Plans for virtualization page and following the procedure in Running a migration plan.
Warning

Do not take a snapshot of a VM after you start a migration. Taking a snaphot after a migration starts might cause the migration to fail.

7.5. Running a migration plan

You can run a migration plan and view its progress in the Red Hat OpenShift web console.

Prerequisites

  • Valid migration plan.

Procedure

  1. In the Red Hat OpenShift web console, click Migration > Plans for virtualization.

    The Plans list displays the source and target providers, the number of virtual machines (VMs) being migrated, the status, the date that the migration started, and the description of each plan.

  2. Click Start beside a migration plan to start the migration.
  3. Click Start in the confirmation window that opens.

    The plan’s Status changes to Running, and the migration’s progress is displayed.

    Warm migration only:

    • The precopy stage starts.
    • Click Cutover to complete the migration.

      Warning

      Do not take a snapshot of a VM after you start a migration. Taking a snaphot after a migration starts might cause the migration to fail.

  4. Optional: Click the links in the migration’s Status to see its overall status and the status of each VM:

    • The link on the left indicates whether the migration failed, succeeded, or is ongoing. It also reports the number of VMs whose migration succeeded, failed, or was canceled.
    • The link on the right opens the Virtual Machines tab of the Plan Details page. For each VM, the tab displays the following data:

      • The name of the VM
      • The start and end times of the migration
      • The amount of data copied
      • A progress pipeline for the VM’s migration

        Warning

        vMotion, including svMotion, and relocation must be disabled for VMs that are being imported to avoid data corruption.

  5. Optional: To view your migration’s logs, either as it is running or after it is completed, perform the following actions:

    1. Click the Virtual Machines tab.
    2. Click the arrow (>) to the left of the virtual machine whose migration progress you want to check.

      The VM’s details are displayed.

    3. In the Pods section, in the Pod links column, click the Logs link.

      The Logs tab opens.

      Note

      Logs are not always available. The following are common reasons for logs not being available:

      • The migration is from OpenShift Virtualization to OpenShift Virtualization. In this case, virt-v2v is not involved, so no pod is required.
      • No pod was created.
      • The pod was deleted.
      • The migration failed before running the pod.
    4. To see the raw logs, click the Raw link.
    5. To download the logs, click the Download link.

7.6. Migration plan options

On the Plans for virtualization page of the Red Hat OpenShift web console, you can click the Options menu kebab beside a migration plan to access the following options:

  • Edit Plan: Edit the details of a migration plan. If the plan is running or has completed successfully, you cannot edit the following options:

    • All properties on the Settings section of the Plan details page. For example, warm or cold migration, target namespace, and preserved static IPs.
    • The plan’s mapping on the Mappings tab.
    • The hooks listed on the Hooks tab.
  • Start migration: Active only if relevant.
  • Restart migration: Restart a migration that was interrupted. Before choosing this option, make sure there are no error messages. If there are, you need to edit the plan.
  • Cutover: Warm migrations only. Active only if relevant. Clicking Cutover opens the Cutover window, which supports the following options:

    • Set cutover: Set the date and time for a cutover.
    • Remove cutover: Cancel a scheduled cutover. Active only if relevant.
  • Duplicate Plan: Create a new migration plan with the same virtual machines (VMs), parameters, mappings, and hooks as an existing plan. You can use this feature for the following tasks:

    • Migrate VMs to a different namespace.
    • Edit an archived migration plan.
    • Edit a migration plan with a different status, for example, failed, canceled, running, critical, or ready.
  • Archive Plan: Delete the logs, history, and metadata of a migration plan. The plan cannot be edited or restarted. It can only be viewed, duplicated, or deleted.

    Note

    Archive Plan is irreversible. However, you can duplicate an archived plan.

  • Delete Plan: Permanently remove a migration plan. You cannot delete a running migration plan.

    Note

    Delete Plan is irreversible.

    Deleting a migration plan does not remove temporary resources. To remove temporary resources, archive the plan first before deleting it.

    Note

    The results of archiving and then deleting a migration plan vary by whether you created the plan and its storage and network mappings using the CLI or the UI.

    • If you created them using the UI, then the migration plan and its mappings no longer appear in the UI.
    • If you created them using the CLI, then the mappings might still appear in the UI. This is because mappings in the CLI can be used by more than one migration plan, but mappings created in the UI can only be used in one migration plan.

7.7. Canceling a migration

You can cancel the migration of some or all virtual machines (VMs) while a migration plan is in progress by using the Red Hat OpenShift web console.

Procedure

  1. In the Red Hat OpenShift web console, click Plans for virtualization.
  2. Click the name of a running migration plan to view the migration details.
  3. Select one or more VMs and click Cancel.
  4. Click Yes, cancel to confirm the cancellation.

    In the Migration details by VM list, the status of the canceled VMs is Canceled. The unmigrated and the migrated virtual machines are not affected.

You can restart a canceled migration by clicking Restart beside the migration plan on the Migration plans page.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.