Chapter 12. Planning a migration of virtual machines from OVA
You prepare and create your OVA migration plan by performing the following high-level steps in the MTV UI:
- Create ownerless network maps.
- Add a OVA source provider.
- Select a migration network for an OVA source provider.
- Add an OpenShift Virtualization destination provider.
- Select a migration network for an OpenShift Virtualization provider.
- Create a OVA migration plan.
12.1. Creating ownerless network maps in the MTV UI Copy linkLink copied to clipboard!
You can create ownerless network maps by using the Migration Toolkit for Virtualization (MTV) UI to map source networks to OpenShift Virtualization networks.
Procedure
- In the Red Hat OpenShift web console, click Migration for Virtualization > Network maps.
Click Create NetworkMap.
The Create NetworkMap page opens.
- Enter the YAML or JSON definitions into the editor, or drag and drop a file into the editor.
- If you enter YAML definitions, use the following:
- 1
- Allowed values are
podandmultus. - 2
- Specify the OVA network Universal Unique ID (UUID).
- 3
- Specify a network attachment definition for each additional OpenShift Virtualization network.
- 4
- Required only when
typeismultus. Specify the namespace of the OpenShift Virtualization network attachment definition.
- Optional: To download your input, click Download.
Click Create.
Your map appears in the list of network maps.
12.2. Creating ownerless storage maps using the form page of the MTV UI Copy linkLink copied to clipboard!
You can create ownerless storage maps by using the form page of the MTV UI.
Prerequisites
- Have an Open Virtual Appliance (OVA) source provider and a OpenShift Virtualization destination provider. For more information, see Adding an Open Virtual Appliance (OVA) source provider or Adding an OpenShift Virtualization destination provider.
Procedure
- In the Red Hat OpenShift web console, click Migration for Virtualization > Storage maps.
- Click Create storage map > Create with form.
Specify the following:
- Map name: Name of the storage map.
- Project: Select from the list.
- Source provider: Select from the list.
- Target provider: Select from the list.
- Source storage: Select from the list.
- Target storage: Select from the list
- Optional: Click Add mapping to create additional storage maps, including mapping multiple storage sources to a single target storage class.
Click Create.
Your map appears in the list of storage maps.
12.3. Creating ownerless storage maps using YAML or JSON definitions in the MTV UI Copy linkLink copied to clipboard!
You can create ownerless storage maps by using YAML or JSON definitions in the Migration Toolkit for Virtualization (MTV) UI.
Procedure
- In the Red Hat OpenShift web console, click Migration for Virtualization > Storage maps.
Click Create storage map > Create with YAML.
The Create StorageMap page opens.
- Enter the YAML or JSON definitions into the editor, or drag and drop a file into the editor.
- If you enter YAML definitions, use the following:
- 1
- Allowed values are
ReadWriteOnceandReadWriteMany. - 2
- For OVA, the
StorageMapcan map only a single storage, which all the disks from the OVA are associated with, to a storage class at the destination. For this reason, the storage is referred to in the UI as "Dummy storage for source provider <provider_name>". In the YAML, write the phrase as it appears above, without the quotation marks and replacing <provider_name> with the actual name of the provider.
- Optional: To download your input, click Download.
Click Create.
Your map appears in the list of storage maps.
12.4. Adding an Open Virtual Appliance (OVA) source provider Copy linkLink copied to clipboard!
You can add Open Virtual Appliance (OVA) files that were created by VMware vSphere as a source provider by using the Red Hat OpenShift web console.
Procedure
Access the Create provider page for Open Virtual Appliance by doing one of the following:
In the Red Hat OpenShift web console, click Migration for Virtualization > Providers.
- Click Create Provider.
Select a Project from the list. The default project shown depends on the active project of MTV.
If the active project is All projects, then the default project is
openshift-mtv. Otherwise, the default project is the same as the active project.If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.
- Click Open Virtual Appliance.
If you have Administrator privileges, in the Red Hat OpenShift web console, click Migration for Virtualization > Overview.
In the Welcome pane, click Open Virtual Appliance.
If the Welcome pane is not visible, click Show the welcome card in the upper-right corner of the page, and click Open Virtual Appliance when the Welcome pane opens.
Select a Project from the list. The default project shown depends on the active project of MTV.
If the active project is All projects, then the default project is
openshift-mtv. Otherwise, the default project is the same as the active project.If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.
Specify the following fields:
- Provider resource name: Name of the source provider
- URL: URL of the NFS file share that serves the OVA
Click Create provider to add and save the provider.
The provider appears in the list of providers.
NoteAn error message might appear that states that an error has occurred. You can ignore this message.
12.5. Adding an OpenShift Virtualization destination provider Copy linkLink copied to clipboard!
You can use a Red Hat OpenShift Virtualization provider as both a source provider and a destination provider.
Specifically, the host cluster that is automatically added as a OpenShift Virtualization provider can be used as both a source provider and a destination provider.
You can also add another OpenShift Virtualization destination provider to the Red Hat OpenShift web console in addition to the default OpenShift Virtualization destination provider, which is the cluster where you installed MTV.
You can migrate VMs from the cluster that MTV is deployed on to another cluster or from a remote cluster to the cluster that MTV is deployed on.
Prerequisites
-
You must have an OpenShift Virtualization service account token with
cluster-adminprivileges.
Procedure
Access the Create OpenShift Virtualization provider interface by doing one of the following:
In the Red Hat OpenShift web console, click Migration for Virtualization > Providers.
- Click Create Provider.
Select a Project from the list. The default project shown depends on the active project of MTV.
If the active project is All projects, then the default project is
openshift-mtv. Otherwise, the default project is the same as the active project.If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.
- Click OpenShift Virtualization.
If you have Administrator privileges, in the Red Hat OpenShift web console, click Migration for Virtualization > Overview.
In the Welcome pane, click OpenShift Virtualization.
If the Welcome pane is not visible, click Show the welcome card in the upper-right corner of the page, and click OpenShift Virtualization when the Welcome pane opens.
Select a Project from the list. The default project shown depends on the active project of MTV.
If the active project is All projects, then the default project is
openshift-mtv. Otherwise, the default project is the same as the active project.If you have Administrator privileges, you can see all projects, otherwise, you can see only the projects you are authorized to work with.
Specify the following fields:
- Provider resource name: Name of the source provider
- URL: URL of the endpoint of the API server
Service account bearer token: Token for a service account with
cluster-adminprivilegesIf both URL and Service account bearer token are left blank, the local OpenShift cluster is used.
Choose one of the following options for validating CA certificates:
- Use a custom CA certificate: Migrate after validating a custom CA certificate.
- Use the system CA certificate: Migrate after validating the system CA certificate.
Skip certificate validation : Migrate without validating a CA certificate.
- To use a custom CA certificate, leave the Skip certificate validation switch toggled to left, and either drag the CA certificate to the text box or browse for it and click Select.
- To use the system CA certificate, leave the Skip certificate validation switch toggled to the left, and leave the CA certificate text box empty.
- To skip certificate validation, toggle the Skip certificate validation switch to the right.
Optional: Ask MTV to fetch a custom CA certificate from the provider’s API endpoint URL.
- Click Fetch certificate from URL. The Verify certificate window opens.
If the details are correct, select the I trust the authenticity of this certificate checkbox, and then, click Confirm. If not, click Cancel, and then, enter the correct certificate information manually.
Once confirmed, the CA certificate will be used to validate subsequent communication with the API endpoint.
Click Create provider to add and save the provider.
The provider appears in the list of providers.
12.6. Selecting a migration network for an OpenShift Virtualization provider Copy linkLink copied to clipboard!
You can select a default migration network for an OpenShift Virtualization provider in the Red Hat OpenShift web console to improve performance. The default migration network is used to transfer disks to the namespaces in which it is configured.
After you select a transfer network, associate its network attachment definition (NAD) with the gateway to be used by this network.
In MTV version 2.9 and earlier, MTV used the pod network as the default network.
In version 2.10.0 and later, MTV detects if you have selected a user-defined network (UDN) as your default network. Therefore, if you set the UDN to be the migration’s namespace, you do not need to select a new default network when you create your migration plan.
MTV supports using UDNs for all providers except OpenShift Virtualization.
For more information about UDNs, see About user defined networks in Migrating your virtual machines to Red Hat OpenShift Virtualization. Migration procedures have been updated to include UDNs.
You can override the default migration network of the provider by selecting a different network when you create a migration plan.
Procedure
- In the Red Hat OpenShift web console, click Migration > Providers for virtualization.
Click the OpenShift Virtualization provider whose migration network you want to change.
When the Providers detail page opens:
- Click the Networks tab.
- Click Set default transfer network.
- Select a default transfer network from the list and click Save.
Configure a gateway in the network used for MTV migrations by completing the following steps:
- In the Red Hat OpenShift web console, click Networking > NetworkAttachmentDefinitions.
- Select the appropriate default transfer network NAD.
- Click the YAML tab.
Add
forklift.konveyor.io/routeto the metadata:annotations section of the YAML, as in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
NetworkAttachmentDefinitionparameter is needed to configure an IP address for the interface, either from the Dynamic Host Configuration Protocol (DHCP) or statically. Configuring the IP address enables the interface to reach the configured gateway.
- Click Save.
12.7. Creating an Open Virtualization Appliance (OVA) migration plan by using the MTV wizard Copy linkLink copied to clipboard!
You can migrate Open Virtual Appliance (OVA) files that were created by VMware vSphere by using the Migration Toolkit for Virtualization plan creation wizard.
The wizard is designed to lead you step-by-step in creating a migration plan.
Do not include virtual machines with guest-initiated storage connections, such as Internet Small Computer Systems Interface (iSCSI) connections or Network File System (NFS) mounts. These require either additional planning before migration or reconfiguration after migration.
This prevents concurrent disk access to the storage the guest points to.
A plan cannot contain more than 500 VMs or 500 disks.
When you click Create plan on the Review and create page of the wizard, Migration Toolkit for Virtualization (MTV) validates your plan. If everything is OK, the Plan details page for your plan opens. This page contains settings that do not appear in the wizard, but are important. Be sure to read and follow the instructions for this page carefully, even though it is outside the plan creation wizard. The page can be opened later, any time before you run the plan, so you can come back to it if needed.
Prerequisites
- Have an OVA source provider and a OpenShift Virtualization destination provider. For more information, see Adding an Open Virtual Appliance (OVA) source provider or Adding an OpenShift Virtualization destination provider.
- If you plan to create a Network map or a Storage map that will be used by more than one migration plan, create it in the Network maps or Storage maps page of the UI before you create a migration plan that uses that map.
- If you are using a user-defined network (UDN), note the name of its namespace as defined in OpenShift Virtualization.
Procedure
- In the Red Hat OpenShift web console, click Migration for Virtualization > Migration plans.
Click Create plan.
The Create migration plan wizard opens.
On the General page, specify the following fields:
- Plan name: Enter a name.
- Plan project: Select from the list.
- Source provider: Select from the list.
- Target provider: Select from the list.
- Target project: Select from the list. If you are using a UDN, this is the namespace defined in OpenShift Virtualization.
- Click Next.
- On the Virtual machines page, select the virtual machines you want to migrate and click Next.
- If you are using a UDN, verify that the IP address of the provider is outside the subnet of the UDN. If the IP address is within the subnet of the UDN, the migration fails.
On the Network map page, choose one of the following options:
Use an existing network map: Select an existing network map from the list.
These are network maps available for all plans, and therefore, they are ownerless in terms of the system. If you select this option and choose a map, a copy of that map is attached to your plan, and your plan is the owner of that copy. Any changes you make to your copy do not affect the original plan or any copies that other users have.
NoteIf you choose an existing map, be sure it has the same source provider and the same target provider as the ones you want to use in your plan.
Use a new network map: Allows you to create a new network map by supplying the following data. This map is attached to this plan, which is then considered to be its owner. Maps that you create using this option are not available in the Use an existing network map option because each is created with an owner.
NoteYou can create an ownerless network map, which you and others can use for additional migration plans, in the Network Maps section of the UI.
- Source network: Select from the list.
Target network: Select from the list.
If needed, click Add mapping to add another mapping.
- Network map name: Enter a name or let MTV automatically generate a name for the network map.
- Click Next.
On the Storage map page, choose one of the following options:
Use an existing storage map: Select an existing storage map from the list.
These are storage maps available for all plans, and therefore, they are ownerless in terms of the system. If you select this option and choose a map, a copy of that map is attached to your plan, and your plan is the owner of that copy. Any changes you make to your copy do not affect the original plan or any copies that other users have.
NoteIf you choose an existing map, be sure it has the same source provider and the same target provider as the ones you want to use in your plan.
Use new storage map: Allows you to create one or two new storage maps by supplying the following data. These maps are attached to this plan, which is then their owner. Maps that you create using this option are not available in the Use an existing storage map option because each is created with an owner.
NoteYou can create an ownerless storage map, which you and others can use for additional migration plans, in the Storage Maps section of the UI.
- Source storage: Select from the list.
Target storage: Select from the list.
If needed, click Add mapping to add another mapping.
- Storage map name: Enter a name or let MTV automatically generate a name for the storage map.
- Click Next.
On the Other settings (optional) page, you have the option to change the Transfer network of your migration plan.
The transfer network is the network used to transfer the VMs to OpenShift Virtualization. This is the default transfer network of the provider.
- Verify that the transfer network is in the selected target project.
- To choose a different transfer network, select a different transfer network from the list.
Optional: To configure another OpenShift network in the OpenShift web console, click Networking > NetworkAttachmentDefinitions.
To learn more about the different types of networks OpenShift supports, see Additional Networks in OpenShift Container Platform.
- To adjust the maximum transmission unit (MTU) of the OpenShift transfer network, you must also change the MTU of the VMware migration network. For more information, see Selecting a migration network for a VMware source provider.
- Click Next.
- On the Hooks (optional) page, you can add a pre-migration hook, a post-migration hook, or both types of migration hooks. All are optional.
- To add a hook, select the appropriate Enable hook checkbox.
- Enter the Hook runner image.
Enter the Ansible playbook of the hook in the window.
NoteYou cannot include more than one pre-migration hook or more than one post-migration hook in a migration plan.
- Click Next.
- On the Review and Create page, review the information displayed.
Edit any item by doing the following:
Click its Edit step link.
The wizard opens to the page where you defined the item.
- Edit the item.
- Either click Next to advance to the next page of the wizard, or click Skip to review to return directly to the Review and create page.
When you finish reviewing the details of the plan, click Create plan. MTV validates your plan.
When your plan is validated, the Plan details page for your plan opens in the Details tab.
In addition to listing details based on your entries in the wizard, the Plan details tab includes the following two sections after the details of the plan:
- Migration history: Details about successful and unsuccessful attempts to run the plan
- Conditions: Any changes that need to be made to the plan so that it can run successfully
When you have fixed all conditions listed, you can run your plan from the Plans page.
The Plan details page also includes five additional tabs, which are described in the table that follows:
Expand Table 12.1. Tabs of the Plan details page YAML Virtual Machines Resources Mappings Hooks Editable YAML
Planmanifest based on your plan’s details including source provider, network and storage maps, VMs, and any issues with your VMsThe VMs the plan migrates
Calculated resources: VMs, CPUs, and total memory for both total VMs and running VMs
Editable specification of the network and storage maps used by your plan
Updatable specification of the hooks used by your plan, if any
12.8. Configuring OVA file upload by web browser Copy linkLink copied to clipboard!
You can configure Open Virtual Appliance (OVA) file upload by web browser to upload an OVA file directly to an NFS share. To configure OVA file upload, you first enable OVA appliance management in the ForkliftController custom resource (CR) and then enable OVA upload for each OVA provider. When you enable OVA upload for an OVA provider, the Upload local OVA files option populates on the provider’s Details page in the MTV UI.
Prerequisites
- You have an NFS share to point the OVA provider at.
- You have enough storage space in your NFS share.
- The NFS share is writable by the QEMU group (GID 107).
- You have a valid .ova file to upload.
- Your .ova file has a unique file name.
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, and open the
forklift-controllerresource. Click the
forklift-controllerYAML tab, and add thefeature_ova_appliance_managementfield to thespecsection of theforklift-controllercustom resource (CR):Example:
spec: ... feature_ova_appliance_management: 'true'
spec: ... feature_ova_appliance_management: 'true'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Wait for the operator to redeploy the controller after updating the
forklift-controllerCR.- In the Red Hat OpenShift web console, click Migration for Virtualization > Providers.
Click the provider to open the Details page. Click the provider’s YAML tab.
For information about creating a provider, see Adding an Open Virtual Appliance (OVA) source provider.
Scroll down the provider’s YAML file, and add the
applianceManagementfield to thespecsection. SetapplianceManagementto'true':Example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - A temporary ConnectionTestFailed error message displays while the update is processing. You can ignore the error message.
- Click the provider’s Details tab, and scroll down to the Conditions section. Verify that ApplianceManagementEnabled shows as True in the list of conditions.
- In the Upload local OVA files section, click Browse to find a valid .ova file.
Click Upload.
A success message confirms the file upload. After several seconds, the number of virtual machines increases under the Provider inventory section.