You can refer to my earlier post on how to deploy and configure a secondary network for VMs.
Before beginning the migration process, you must verify that your OpenShift cluster is healthy, has sufficient capacity, and is running the required version. The cluster should have at least 3 control plane nodes and sufficient worker nodes for your workloads.
Execute the following command to verify all nodes are in Ready state:
oc get nodes
You should see all nodes in “Ready” status with appropriate roles (control-plane, worker). In this example, we have 3 control plane nodes (master0, master1, master2).
The Migration Toolkit for Virtualization comes bundled with several operators that must be installed from the OpenShift OperatorHub. These operators handle networking, storage, logging, and virtualization features required for VM migration.
All operators should show “Succeeded” status in the operator list. They are pre-configured with all necessary settings and handle migration-related tasks automatically.
⚠️ WARNING: This is the most critical step. VDDK configuration must be completed BEFORE creating providers or migration plans. Failure to properly configure VDDK will result in failed migrations and data transfer errors.
The VMware Virtual Disk Development Kit (VDDK) is the library that enables direct, efficient access to VM disk data at the block level. Without VDDK, the MTV toolkit cannot efficiently transfer VM disks from vSphere to OpenShift. VDDK provides:
First, download the VDDK tar file from VMware. The version must match your vSphere version.
The file shown is vmware-vix-disklib-8.0.3, which is the VDDK library for vSphere 8.0. This must be extracted and made available to the MTV toolkit.
The VDDK tar file must be converted into a container image and pushed to your container registry. The register.sh script automates this process:
You can download the script using the link below and run it. It automatically builds and pushes the image to the registry.
https://github.com/Dineshk1205/vsphere-to-Openshift.git
Now create the VMware provider. This provider connection allows MTV to communicate with your vSphere environment and inventory your VMs.
The provider requires the following information:
The certificate dialog shows the vSphere certificate details. You must verify and trust this certificate for secure communication.
Click the create provider option. After successful creation, your provider will appear in the Providers list:
Similarly, you can add OpenShift Virtualization as a provider.
Make sure that the required network is created in OpenShift before creating a migration plan.
Following is the VM I am planning to migrate from vSphere to OpenShift.
In the OpenShift UI, select Migration Plan option and click on Create Plan option.
Enter plan name and select project. Select source as vSphere provider and target as OpenShift provider and click on next.
Select VM which you want to migrate.
I am migrating linuxtest2 VM, so selected linuxtest2 VM. Based on your requirements, you can select multiple VMs or a single VM.
You can pre-configure network map and use it, or you can create a new mapping. I am creating a new mapping.
Source network: linuxtest2 VM connects to VLAN 30. Target network: In OpenShift, I created the same network. I select VLAN 30 as the target network.
Click on next.
Similar to network, you can configure storage mapping. Click on next.
Choose migration type. I am doing cold migration. For cold migration, the VM is in shutdown state. For warm migration, the VM is in powered-on mode, and you need to enable CBT on the disk.
Aspect | Cold Migration | Warm Migration |
|---|---|---|
VM Power State |
|
|
Approx. User Downtime |
|
|
Total Migration Time |
|
|
Prerequisites |
|
|
Advantages |
|
|
Click on next.
Optional settings: I am going with default settings and not passing any optional settings.
Review all the options and click on Create Plan.
Click on Migrations Start option to start VM migration.
Click on Start.
Migration started.
Migration completed successfully.
Go to the Virtualization section and check the VM and start the VM.
VM static IP preserved and able to ping gateway.
Shipping a new version of an application is always a small act of faith. Even…
The following steps demonstrate how to back up and restore an OpenShift virtual machine using…
OpenShift Virtualization allows virtual machines (VMs) to run natively on Kubernetes alongside container workloads. Using…
Red Hat OpenStack Services on OpenShift (RHOSO) provides the foundation to build a private or public…
Kubernetes (often shortened to “K8s”) is an open-source system for automating the deployment, scaling, and…
Ceph is an open-source, distributed storage platform that provides object, block, and file storage in…