Import the OVA File and Creating a Migration Plan
This topic provides step-by-step process to import an OVA file into OpenShift using a shared NFS directory and set up a virtual machine migration plan through the OpenShift Virtualization Migration Toolkit (MTV). It includes configuring the NFS server, copying the OVA file, setting up the ovaopenshift provider, and creating and executing a migration plan from the OpenShift web console.
To import the OVA File and Creating a Migration Plan:
-
Import the OVA File:
Refer to Step 1 from the Red Hat Developer blog, Migrate your virtual application in 3 steps.
-
Set up NFS on the Host.
-
Install the necessary NFS packages
sudo dnf install nfs-utils -y -
Create the NFS share directory
sudo mkdir -p /srv/nfs_sharesudo chmod -R 777 /srv/nfs_share -
Edit the exports file:
vi /etc/exports/srv/nfs_share *(rw,sync,no_subtree_check,no_root_squash,insecure) -
Start and enable the NFS server
sudo systemctl enable --now nfs-server rpcbindsudo systemctl restart nfs-serversudo systemctl status nfs-server -
Copy the OVA file to NFS share path
Use the
oc cpcommand to copy the OVA file into the mounted NFS path:oc cp <local-path-to-ova-file> default/nfs-pod:/mnt/.Example:
oc cp svm-appliance-7.6.1.30-570f28b.ova default/nfs-pod:/mnt/svm-appliance-7.6.1.30-570f28b.ova -
After the copy is completed, make sure that the ova file is available in the nfs_path.
-
-
Create a Migration Plan
Prerequisite: Create the ovaopenshift provider in the openshift-mtv namespace.
-
Log in to the OpenShift Web Console. Make sure that you are in the openshift-mtv namespace.
-
Open Migration > Plan for Virtualizations.
-
Create a new Migration Plan.
-
Provide a name for your migration plan.
-
Select ovaopenshift as the source provider.
-
In the Virtual Machines section, select the virtual machine to migrate (e.g., svm-appliance-ol).
-
On the next page, keep the default options.
-
The target provider will default to host, representing the OpenShift cluster where MTV is installed.
-
Click Create migration plan.
-
To start the migration, go to the created plan and click Start.
-
-
Monitor Migration via CLI
To monitor the migration progress:
oc get migration -n openshift-mtv