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:

1. Import the OVA File:

Refer to Step 1 from the Red Hat Developer blog, Migrate your virtual application in 3 steps.

2. Set up NFS on the Host
a. Install the necessary NFS packages

sudo dnf install nfs-utils -y

b. Create the NFS share directory

sudo mkdir -p /srv/nfs_share

sudo chmod -R 777 /srv/nfs_share

c. Edit the exports file:

vi /etc/exports

 

/srv/nfs_share *(rw,sync,no_subtree_check,no_root_squash,insecure)

d. Start and enable the NFS server

sudo systemctl enable --now nfs-server rpcbind

sudo systemctl restart nfs-server

sudo systemctl status nfs-server

e. Copy the OVA file to NFS share path

Use the oc cp command 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

f. After the copy is completed, make sure that the ova file is available in the nfs_path.
3. Create a Migration Plan

Prerequisite:

Create the ovaopenshift provider in the openshift-mtv namespace.

a. Log in to the OpenShift Web Console. Make sure that the you are in the openshift-mtv namespace.
b. Open Migration > Plan for Virtualizations.
c. Create a new Migration Plan.
d. Provide a name for your migration plan.
e. Select ovaopenshift as the source provider.
f. In the Virtual Machines section, select the virtual machine to migrate (e.g., svm-appliance-ol).
g. On the next page, keep the default options.
h. The target provider will default to host, representing the OpenShift cluster where MTV is installed.
i. Click Create migration plan.
j. To start the migration, go to the created plan and click Start.
4. Monitor Migration via CLI
a. To monitor the migration progress:

oc get migration -n openshift-mtv