This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Chapter 6. Upgrading the Migration Toolkit for Containers
You can upgrade the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 4.6 by using Operator Lifecycle Manager.
You can upgrade MTC on OpenShift Container Platform 4.5, and earlier versions, by reinstalling the legacy Migration Toolkit for Containers Operator.
				If you are upgrading from MTC version 1.3, you must perform an additional procedure to update the MigPlan custom resource (CR).
			
6.1. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform 4.6
You can upgrade the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 4.6 by using the Operator Lifecycle Manager.
Prerequisites
- 
						You must be logged in as a user with cluster-adminprivileges.
Procedure
- In the OpenShift Container Platform console, navigate to Operators - Installed Operators. - Operators that have a pending upgrade display an Upgrade available status. 
- Click Migration Toolkit for Containers Operator.
- Click the Subscription tab. Any upgrades requiring approval are displayed next to Upgrade Status. For example, it might display 1 requires approval.
- Click 1 requires approval, then click Preview Install Plan.
- Review the resources that are listed as available for upgrade and click Approve.
- 
						Navigate back to the Operators Installed Operators page to monitor the progress of the upgrade. When complete, the status changes to Succeeded and Up to date. 
- 
						Click Workloads Pods to verify that the MTC pods are running. 
6.2. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform versions 4.2 to 4.5
You can upgrade Migration Toolkit for Containers (MTC) on OpenShift Container Platform versions 4.2 to 4.5 by manually installing the legacy Migration Toolkit for Containers Operator.
Prerequisites
- 
						You must be logged in as a user with cluster-adminprivileges.
- 
						You must have access to registry.redhat.io.
- 
						You must have podmaninstalled.
Procedure
- Log in to - registry.redhat.iowith your Red Hat Customer Portal credentials by entering the following command:- sudo podman login registry.redhat.io - $ sudo podman login registry.redhat.io- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Download the - operator.ymlfile by entering the following command:- sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/operator.yml ./ - $ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/operator.yml ./- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Replace the Migration Toolkit for Containers Operator by entering the following command: - oc replace --force -f operator.yml - $ oc replace --force -f operator.yml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Scale the - migration-operatordeployment to- 0to stop the deployment by entering the following command:- oc scale -n openshift-migration --replicas=0 deployment/migration-operator - $ oc scale -n openshift-migration --replicas=0 deployment/migration-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Scale the - migration-operatordeployment to- 1to start the deployment and apply the changes by entering the following command:- oc scale -n openshift-migration --replicas=1 deployment/migration-operator - $ oc scale -n openshift-migration --replicas=1 deployment/migration-operator- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify that the - migration-operatorwas upgraded by entering the following command:- oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'- $ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Download the - controller.ymlfile by entering the following command:- sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/controller.yml ./ - $ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.7):/controller.yml ./- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Create the - migration-controllerobject by entering the following command:- oc create -f controller.yml - $ oc create -f controller.yml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify that the MTC pods are running by entering the following command: - oc get pods -n openshift-migration - $ oc get pods -n openshift-migration- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
6.3. Upgrading MTC 1.3 to 1.7
				If you are upgrading Migration Toolkit for Containers (MTC) version 1.3.x to 1.7, you must update the MigPlan custom resource (CR) manifest on the cluster on which the MigrationController pod is running.
			
				Because the indirectImageMigration and indirectVolumeMigration parameters do not exist in MTC 1.3, their default value in version 1.4 is false, which means that direct image migration and direct volume migration are enabled. Because the direct migration requirements are not fulfilled, the migration plan cannot reach a Ready state unless these parameter values are changed to true.
			
Prerequisites
- 
						You must be logged in as a user with cluster-adminprivileges.
Procedure
- 
						Log in to the cluster on which the MigrationControllerpod is running.
- Get the - MigPlanCR manifest:- oc get migplan <migplan> -o yaml -n openshift-migration - $ oc get migplan <migplan> -o yaml -n openshift-migration- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Update the following parameter values and save the file as - migplan.yaml:- ... spec: indirectImageMigration: true indirectVolumeMigration: true - ... spec: indirectImageMigration: true indirectVolumeMigration: true- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Replace the - MigPlanCR manifest to apply the changes:- oc replace -f migplan.yaml -n openshift-migration - $ oc replace -f migplan.yaml -n openshift-migration- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Get the updated - MigPlanCR manifest to verify the changes:- oc get migplan <migplan> -o yaml -n openshift-migration - $ oc get migplan <migplan> -o yaml -n openshift-migration- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow