Debug School

Cover image for VMware to RedHat Virtualization Migration
Suyash Sambhare
Suyash Sambhare

Posted on

VMware to RedHat Virtualization Migration

Migration Toolkit for Virtualization

Cold and warm migration in MTV

  • Cold migration is when a powered off virtual machine (VM) is migrated to a separate host. The VM is powered off, and there is no need for common shared storage.
  • Warm migration is when a powered on VM is migrated to a separate host. A source host state is cloned to the destination host.

Stages:

  • Warm migration precopy stage
  • Warm migration cutover stage
  • Power off of virtual machines during cold migrations
  • Power on of virtual machines during warm migrations
  • Precopy stage
  • Cutover stage

Install MTV

  1. In the Red Hat OpenShift web console, click Operators → OperatorHub.
  2. Use the Filter by keyword field to search for mtv-operator.
  3. Click Migration Toolkit for Virtualization Operator and then click Install.
  4. Click Create ForkliftController when the button becomes active.
  5. Click Create. Your ForkliftController appears in the list that is displayed.
  6. Click Workloads → Pods to verify that the MTV pods are running.
  7. Click Operators → Installed Operators to verify that Migration Toolkit for Virtualization Operator appears in the openshift-mtv project with the status Succeeded.

When the plugin is ready you will be prompted to reload the page. The Migration menu item is automatically added to the navigation bar, displayed on the left of the Red Hat OpenShift web console.

Using CLI:

cat << EOF | oc apply -f -
apiVersion: project.openshift.io/v1
kind: Project
metadata:
  name: openshift-mtv
EOF
Enter fullscreen mode Exit fullscreen mode
cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: migration
  namespace: openshift-mtv
spec:
  targetNamespaces:
    - openshift-mtv
EOF
Enter fullscreen mode Exit fullscreen mode
cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: mtv-operator
  namespace: openshift-mtv
spec:
  channel: release-v2.9
  installPlanApproval: Automatic
  name: mtv-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
  startingCSV: "mtv-operator.v2.9.6"
EOF
Enter fullscreen mode Exit fullscreen mode
cat << EOF | oc apply -f -
apiVersion: forklift.konveyor.io/v1beta1
kind: ForkliftController
metadata:
  name: forklift-controller
  namespace: openshift-mtv
spec:
  olm_managed: true
EOF
Enter fullscreen mode Exit fullscreen mode
oc get pods -n openshift-mtv

NAME                                                    READY   STATUS    RESTARTS   AGE
forklift-api-bb45b8db4-cpzlg                            1/1     Running   0          6m34s
forklift-controller-7649db6845-zd25p                    2/2     Running   0          6m38s
forklift-must-gather-api-78fb4bcdf6-h2r4m               1/1     Running   0          6m28s
forklift-operator-59c87cfbdc-pmkfc                      1/1     Running   0          28m
forklift-ui-plugin-5c5564f6d6-zpd85                     1/1     Running   0          6m24s
forklift-validation-7d84c74c6f-fj9xg                    1/1     Running   0          6m30s
forklift-volume-populator-controller-85d5cb64b6-mrlmc   1/1     Running   0          6m36s
Enter fullscreen mode Exit fullscreen mode

Configure MTV

You can configure the following settings of the MTV Operator by modifying the ForkliftController custom resource (CR), or in the Settings section of the Overview page, unless otherwise indicated.

  • Maximum number of virtual machines (VMs) or disks per plan that Migration Toolkit for Virtualization (MTV) can migrate simultaneously.
  • How long must gather reports are retained before being automatically deleted (ForkliftController CR only).
  • CPU limit allocated to the main controller container.
  • Memory limit allocated to the main controller container.
  • Interval at which a new snapshot is requested before initiating a warm migration.
  • Frequency with which the system checks the status of snapshot creation or removal during a warm migration.
  • Percentage of space in persistent volumes allocated as file system overhead when the storageclass is filesystem (ForkliftController CR only).
  • Fixed amount of additional space allocated in persistent block volumes. This setting is applicable for any storageclass that is block-based (ForkliftController CR only).
  • Configuration map of operating systems to preferences for vSphere source providers (ForkliftController CR only).
  • Configuration map of operating systems to preferences for Red Hat Virtualization (RHV) source providers (ForkliftController CR only).
  • Whether to retain importer pods so that the Containerized Data Importer (CDI) does not delete them during migration (ForkliftController CR only).

MTV

Migration

To Migrate from VMware to RedHat OpenShift Virtualization

  1. Access the Create provider page for VMware by doing one of the following:

a. In the Red Hat OpenShift web console, click Migration for Virtualization > Providers.

i. Click Create Provider.
ii. Select a Project from the list. The default project shown depends on the active project of MTV. If the active project is All projects, then the default project is openshift-mtv. Otherwise, the default project is the same as the active project. If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.
iii. Click VMware.

b. If you have Administrator privileges, in the Red Hat OpenShift web console, click Migration for Virtualization > Overview.

i. In the Welcome pane, click VMware. If the Welcome pane is not visible, click Show the welcome card in the upper-right corner of the page, and click VMware when the Welcome pane opens.
ii. Select a Project from the list. The default project shown depends on the active project of MTV. If the active project is All projects, then the default project is openshift-mtv. Otherwise, the default project is the same as the active project. If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.

  1. Specify the following fields:

a. 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.
  • Select the Skip VMWare Virtual Disk Development Kit (VDDK) SDK acceleration (not recommended).
  • Enter the path in the VDDK init image text box. Format: /vddk:.
  • Upload a VDDK archive and build a VDDK init image from the archive by doing the following:
  • Click Browse next to the VDDK init image archive text box, select the desired file, and click Select.
  • Click Upload. The URL of the uploaded archive is displayed in the VDDK init image archive text box.

b. Provider credentials

  • 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:
  2. Use a custom CA certificate: Migrate after validating a custom CA certificate.
  3. Use the system CA certificate: Migrate after validating the system CA certificate.
  4. Skip certificate validation : Migrate without validating a CA certificate.
  5. 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.
  6. To use the system CA certificate, leave the Skip certificate validation switch toggled to the left, and leave the CA certificate text box empty.
  7. To skip certificate validation, toggle the Skip certificate validation switch to the right.

  8. Ask MTV to fetch a custom CA certificate from the provider’s API endpoint URL.

  9. Click Fetch certificate from URL. The Verify certificate window opens.

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

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

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

  13. The provider appears in the list of providers.

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

  1. Add access to the UI of the provider:
  2. On the Providers page, click the provider.
  3. The Provider details page opens.
  4. Click the Edit icon under External UI web link.
  5. Enter the link and click Save.

Ref: https://docs.redhat.com/en/documentation/migration_toolkit_for_virtualization/

Top comments (0)