Chapter 10. Upgrading or uninstalling the Migration Toolkit for Virtualization
You can upgrade or uninstall the Migration Toolkit for Virtualization (MTV) by using the Red Hat OpenShift web console or the command-line interface (CLI).
10.1. Upgrading the Migration Toolkit for Virtualization Copy linkLink copied to clipboard!
You can upgrade the MTV Operator by using the Red Hat OpenShift web console to install the new version.
Procedure
-
In the Red Hat OpenShift web console, click Operators
Installed Operators Migration Toolkit for Virtualization Operator Subscription. Change the update channel to the correct release.
See Changing the update channel for an Operator in the Red Hat OpenShift documentation.
Confirm that Upgrade status changes from Up to date to Upgrade available. If it does not, restart the
CatalogSourcepod:-
Note the catalog source, for example,
redhat-operators. From the command line, retrieve the catalog source pod:
$ oc get pod -n openshift-marketplace | grep <catalog_source>Delete the pod:
$ oc delete pod -n openshift-marketplace <catalog_source_pod>Upgrade status changes from Up to date to Upgrade available.
If you set Update approval on the Subscriptions tab to Automatic, the upgrade starts automatically.
-
Note the catalog source, for example,
If you set Update approval on the Subscriptions tab to Manual, approve the upgrade.
See Manually approving a pending Operator upgrade in the Red Hat OpenShift documentation.
-
If you are upgrading from MTV 2.2 and have defined VMware source providers, edit the VMware provider by adding a VDDK
initimage. Otherwise, the update will change the state of any VMware providers toCritical. For more information, see Adding a VMware source provider. -
If you mapped to NFS on the Red Hat OpenShift destination provider in MTV 2.2, edit the
AccessModesandVolumeModeparameters in the NFS storage profile. Otherwise, the upgrade will invalidate the NFS mapping. For more information, see Customizing storage profiles.
10.2. Uninstalling MTV by using the Red Hat OpenShift web console Copy linkLink copied to clipboard!
You can uninstall Migration Toolkit for Virtualization (MTV) by using the Red Hat OpenShift web console.
Prerequisites
-
You must be logged in as a user with
cluster-adminprivileges.
Procedure
- In the Red Hat OpenShift web console, click Operators > Installed Operators.
Click Migration Toolkit for Virtualization Operator.
The Operator Details page opens in the Details tab.
- Click the ForkliftController tab.
Click Actions and select Delete ForkLiftController.
A confirmation window opens.
Click Delete.
The controller is removed.
Open the Details tab.
The Create ForkliftController button appears instead of the controller you deleted. There is no need to click it.
On the upper-right side of the page, click Actions and select Uninstall Operator.
A confirmation window opens, displaying any operand instances.
To delete all instances, select the Delete all operand instances for this operator checkbox. By default, the checkbox is cleared.
ImportantIf your Operator configured off-cluster resources, these will continue to run and will require manual cleanup.
Click Uninstall.
The Installed Operators page opens, and the Migration Toolkit for Virtualization Operator is removed from the list of installed Operators.
- Click Home > Overview.
In the Status section of the page, click Dynamic Plugins.
The Dynamic Plugins pop-up opens, listing forklift-console-plugin as a failed plugin. If the forklift-console-plugin does not appear as a failed plugin, refresh the web console.
Click forklift-console-plugin.
The ConsolePlugin details page opens in the Details tab.
On the upper right side of the page, click Actions and select Delete ConsolePlugin from the list.
A confirmation window opens.
Click Delete.
The plugin is removed from the list of Dynamic plugins on the Overview page. If the plugin still appears, restart the Overview page.
10.3. Uninstalling MTV from the command line Copy linkLink copied to clipboard!
You can uninstall Migration Toolkit for Virtualization (MTV) from the command line.
This action does not remove resources managed by the MTV Operator, including custom resource definitions (CRDs) and custom resources (CRs). To remove these after uninstalling the MTV Operator, you might need to manually delete the MTV Operator CRDs.
Prerequisites
-
You must be logged in as a user with
cluster-adminprivileges.
Procedure
Delete the
forkliftcontroller by running the following command:$ oc delete ForkliftController --all -n openshift-mtvDelete the subscription to the MTV Operator by running the following command:
$ oc get subscription -o name|grep 'mtv-operator'| xargs oc deleteDelete the
clusterserviceversionfor the MTV Operator by running the following command:$ oc get clusterserviceversion -o name|grep 'mtv-operator'| xargs oc deleteDelete the plugin console CR by running the following command:
$ oc delete ConsolePlugin forklift-console-pluginOptional: Delete the custom resource definitions (CRDs) by running the following command:
oc get crd -o name | grep 'forklift.konveyor.io' | xargs oc deleteOptional: Perform cleanup by deleting the MTV project by running the following command:
oc delete project openshift-mtv