Search

Chapter 4. Migrating virtual machines by using the Red Hat OpenShift web console

download PDF

You can migrate virtual machines (VMs) by using the Red Hat OpenShift web console to:

Important

You must ensure that all prerequisites are met.

VMware only: You must have the minimal set of VMware privileges.

VMware only: Creating a VMware Virtual Disk Development Kit (VDDK) image will increase migration speed.

4.1. The MTV user interface

The Migration Toolkit for Virtualization (MTV) user interface is integrated into the OpenShift web console.

In the left-hand panel, you can choose a page related to a component of the migration progress, for example, Providers for Migration, or, if you are an administrator, you can choose Overview, which contains information about migrations and lets you configure MTV settings.

Figure 4.1. MTV extension interface

MTV user interface

In pages related to components, you can click on the Projects list, which is in the upper-left portion of the page, and see which projects (namespaces) you are allowed to work with.

  • If you are an administrator, you can see all projects.
  • If you are a non-administrator, you can see only the projects that you have permissions to work with.

4.2. The MTV Overview page

The Migration Toolkit for Virtualization (MTV) Overview page displays system-wide information about migrations and a list of Settings you can change.

If you have Administrator privileges, you can access the Overview page by clicking Migration Overview in the Red Hat OpenShift web console.

The Overview page has 3 tabs:

  • Overview
  • YAML
  • Metrics

4.2.1. Overview tab

The Overview tab lets you see:

  • Operator: The namespace on which the MTV Operator is deployed and the status of the Operator
  • Pods: The name, status, and creation time of each pod that was deployed by the MTV Operator
  • Conditions: Status of the MTV Operator:

    • Failure: Last failure. False indicates no failure since deployment.
    • Running: Whether the Operator is currently running and waiting for the next reconciliation.
    • Successful: Last successful reconciliation.

4.2.2. YAML tab

The custom resource ForkliftController that defines the operation of the MTV Operator. You can modify the custom resource from this tab.

4.2.3. Metrics tab

The Metrics tab lets you see:

  • Migrations: The number of migrations performed using MTV:

    • Total
    • Running
    • Failed
    • Succeeded
    • Canceled
  • Virtual Machine Migrations: The number of VMs migrated using MTV:

    • Total
    • Running
    • Failed
    • Succeeded
    • Canceled
Note

Since a single migration might involve many virtual machines, the number of migrations performed using MTV might vary significantly from the number of virtual machines that have been migrated using MTV.

  • Chart showing the number of running, failed, and succeeded migrations performed using MTV for each of the last 7 days
  • Chart showing the number of running, failed, and succeeded virtual machine migrations performed using MTV for each of the last 7 days

4.3. Configuring MTV settings

If you have Administrator privileges, you can access the Overview page and change the following settings in it:

Table 4.1. MTV settings
SettingDescriptionDefault value

Max concurrent virtual machine migrations

The maximum number of VMs per plan that can be migrated simultaneously

20

Must gather cleanup after (hours)

The duration for retaining must gather reports before they are automatically deleted

Disabled

Controller main container CPU limit

The CPU limit allocated to the main controller container

500 m

Controller main container Memory limit

The memory limit allocated to the main controller container

800 Mi

Precopy internal (minutes)

The interval at which a new snapshot is requested before initiating a warm migration

60

Snapshot polling interval (seconds)

The frequency with which the system checks the status of snapshot creation or removal during a warm migration

10

Procedure

  1. In the Red Hat OpenShift web console, click Migration Overview. The Settings list is on the right-hand side of the page.
  2. In the Settings list, click the Edit icon of the setting you want to change.
  3. Choose a setting from the list.
  4. Click Save.

4.4. Adding providers

You can add source providers and destination providers for a virtual machine migration by using the Red Hat OpenShift web console.

4.4.1. Adding source providers

You can use MTV to migrate VMs from the following source providers:

  • VMware vSphere
  • Red Hat Virtualization
  • OpenStack
  • Open Virtual Appliances (OVAs) that were created by VMware vSphere
  • OpenShift Virtualization

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

4.4.1.1. Adding a VMware vSphere source provider

You can migrate VMware vSphere VMs from VMware vCenter or from a VMWare ESX/ESXi server. In MTV versions 2.6 and later, you can migrate directly from an ESX/ESXi server, without going through vCenter, by specifying the SDK endpoint to that of an ESX/ESXi server.

Important

EMS enforcement is disabled for migrations with VMware vSphere source providers in order to enable migrations from versions of vSphere that are supported by Migration Toolkit for Virtualization but do not comply with the 2023 FIPS requirements. Therefore, users should consider whether migrations from vSphere source providers risk their compliance with FIPS. Supported versions of vSphere are specified in Software compatibility guidelines.

Prerequisites

  • It is strongly recommended to create a VMware Virtual Disk Development Kit (VDDK) image in a secure registry that is accessible to all clusters. A VDDK image accelerates migration. For more information, see Creating a VDDK image.

Procedure

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

Provider Details

  • Provider resource name: Name of the source provider.
  • Endpoint type: Select the vSphere provider endpoint type. Options: vCenter or ESXi. You can migrate virtual machines from vCenter, an ESX/ESXi server that is not managed by vCenter, or from an ESX/ESXi server that is managed by vCenter but does not go through vCenter.
  • URL: URL of the SDK endpoint of the vCenter on which the source VM is mounted. Ensure that the URL includes the sdk path, usually /sdk. For example, https://vCenter-host-example.com/sdk. If a certificate for FQDN is specified, the value of this field needs to match the FQDN in the certificate.
  • VDDK init image: VDDKInitImage path. It is strongly recommended to create a VDDK init image to accelerate migrations. For more information, see Creating a VDDK image.

Provider details

  • Username: vCenter user or ESXi user. For example, user@vsphere.local.
  • Password: vCenter user password or ESXi user password.

    1. 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.
    2. 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.

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

      The provider appears in the list of providers.

    Note

    It might take a few minutes for the provider to have the status Ready.

4.4.1.1.1. Selecting a migration network for a VMware source provider

You can select a migration network in the Red Hat OpenShift web console for a source provider to reduce risk to the source environment and to improve performance.

Using the default network for migration can result in poor performance because the network might not have sufficient bandwidth. This situation can have a negative effect on the source platform because the disk transfer operation might saturate the network.

Prerequisites

  • The migration network must have sufficient throughput, minimum speed of 10 Gbps, for disk transfer.
  • The migration network must be accessible to the OpenShift Virtualization nodes through the default gateway.

    Note

    The source virtual disks are copied by a pod that is connected to the pod network of the target namespace.

  • The migration network must have jumbo frames enabled.

Procedure

  1. In the Red Hat OpenShift web console, click Migration Providers for virtualization.
  2. Click the host number in the Hosts column beside a provider to view a list of hosts.
  3. Select one or more hosts and click Select migration network.
  4. Specify the following fields:

    • Network: Network name
    • ESXi host admin username: For example, root
    • ESXi host admin password: Password
  5. Click Save.
  6. Verify that the status of each host is Ready.

    If a host status is not Ready, the host might be unreachable on the migration network or the credentials might be incorrect. You can modify the host configuration and save the changes.

4.4.1.2. 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.

4.4.1.3. Adding an OpenStack source provider

You can add an OpenStack source provider by using the Red Hat OpenShift web console.

Important

When you migrate an image-based VM from an OpenStack provider, a snapshot is created for the image that is attached to the source VM and the data from the snapshot is copied over to the target VM. This means that the target VM will have the same state as that of the source VM at the time the snapshot was created.

Procedure

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

    • Provider resource name: Name of the source provider.
    • URL: URL of the OpenStack Identity (Keystone) endpoint. For example, http://controller:5000/v3.
    • Authentication type: Choose one of the following methods of authentication and supply the information related to your choice. For example, if you choose Application credential ID as the authentication type, the Application credential ID and the Application credential secret fields become active, and you need to supply the ID and the secret.

      • Application credential ID

      • Application credential name

        • Application credential name: OpenStack application credential name
        • Application credential secret: : OpenStack application credential Secret
        • Username: OpenStack username
        • Domain: OpenStack domain name
      • Token with user ID

        • Token: OpenStack token
        • User ID: OpenStack user ID
        • Project ID: OpenStack project ID
      • Token with user Name

        • Token: OpenStack token
        • Username: OpenStack username
        • Project: OpenStack project
        • Domain name: OpenStack domain name
      • Password

        • Username: OpenStack username
        • Password: OpenStack password
        • Project: OpenStack project
        • Domain: OpenStack domain name
  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.

4.4.1.4. Adding an Open Virtual Appliance (OVA) source provider

You can add Open Virtual Appliance (OVA) files that were created by VMware vSphere as a source provider by using the Red Hat OpenShift web console.

Procedure

  1. In the Red Hat OpenShift web console, click Migration Providers for virtualization.
  2. Click Create Provider.
  3. Click Open Virtual Appliance (OVA).
  4. Specify the following fields:

    • Provider resource name: Name of the source provider
    • URL: URL of the NFS file share that serves the OVA
  5. Click Create provider to add and save the provider.

    The provider appears in the list of providers.

    Note

    An error message might appear that states that an error has occurred. You can ignore this message.

4.4.1.5. Adding a Red Hat OpenShift Virtualization source 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 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.

Note

The Red Hat OpenShift cluster version of the source provider must be 4.13 or later.

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.

4.4.2. Adding destination providers

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

4.4.2.1. 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.

4.4.2.2. 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.

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. On the right side of the provider, select Select migration network from the Options menu kebab .
  3. Select a network from the list of available networks and click Select.

4.5. Creating migration plans

You can create a migration plan by using the Red Hat OpenShift web console to specify a source provider, the virtual machines (VMs) you want to migrate, and other plan details.

For your convenience, there are two procedures to create migration plans based on source provider and VMs, one begins on the Providers for virtualization page and the other begins on the Plans for virtualization page.

4.5.1. Creating and running a migration plan starting on Providers for virtualization

Procedure

  1. In the Red Hat OpenShift web console, click Providers for virtualization.
  2. In the row of the appropriate source provider, click VMs. +. The Virtual Machines tab opens.
  3. Select the VMs you want to migrate and click Create migration plan.

    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. Make any desired changes to the editable items.
  6. Click Add mapping to edit a suggested network mapping or a storage mapping, or to add one or more additional mappings.
  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. In all cases, 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 again validates the plan.

  8. If the plan is valid,

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

4.5.2. Creating and running a migration plan starting on Plans for virtualization

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. Make any desired changes to the editable items.
  6. Click Add mapping to edit a suggested network mapping or a storage mapping, or to add one or more additional mappings.
  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. In all cases, 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 again validates the plan.

  8. If the plan is valid,

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

4.6. 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, 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 Migration details by VM screen opens, displaying the migration’s progress

    Warm migration only:

    • The precopy stage starts.
    • Click Cutover to complete the migration.
  4. If the migration fails:

    1. Click Get logs to retrieve the migration logs.
    2. Click Get logs in the confirmation window that opens.
    3. Wait until Get logs changes to Download logs and then click the button to download the logs.
  5. Click a migration’s Status, whether it failed or succeeded or is still ongoing, to view the details of the migration.

    The Migration details by VM screen opens, displaying the start and end times of the migration, the amount of data copied, and a progress pipeline for each VM being migrated.

  6. Expand an individual VM to view its steps and the elapsed time and state of each step.

4.7. 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:

  • Get logs: Retrieves the logs of a migration. When you click Get logs, a confirmation window opens. After you click Get logs in the window, wait until Get logs changes to Download logs and then click the button to download the logs.
  • Edit: Edit the details of a migration plan. You cannot edit a migration plan while it is running or after it has completed successfully.
  • Duplicate: 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: Delete the logs, history, and metadata of a migration plan. The plan cannot be edited or restarted. It can only be viewed.

    Note

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

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

    Note

    The Delete option is irreversible.

    Deleting a migration plan does not remove temporary resources such as importer pods, conversion pods, config maps, secrets, failed VMs, and data volumes. (BZ#2018974) You must archive a migration plan before deleting it in order to clean up the temporary resources.

  • View details: Display the details of a migration plan.
  • Restart: Restart a failed or canceled migration plan.
  • Cancel scheduled cutover: Cancel a scheduled cutover migration for a warm migration plan.

4.8. 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.

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.

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.

© 2024 Red Hat, Inc.