Chapter 8. Troubleshooting
This section provides information for troubleshooting common migration issues.
8.1. Architecture
This section describes MTV custom resources, services, and workflows.
8.1.1. MTV custom resources and services
The Migration Toolkit for Virtualization (MTV) is provided as an OpenShift Container Platform Operator. It creates and manages the following custom resources (CRs) and services.
MTV custom resources
-
ProviderCR stores attributes that enable MTV to connect to and interact with the source and target providers. -
NetworkMappingCR maps the networks of the source and target providers. -
StorageMappingCR maps the storage of the source and target providers. -
ProvisionerCR stores the configuration of the storage provisioners, such as supported volume and access modes. -
PlanCR contains a list of VMs with the same migration parameters and associated network and storage mappings. MigrationCR runs a migration plan.Only one
MigrationCR per migration plan can run at a given time. You can create multipleMigrationCRs for a singlePlanCR.
MTV services
Provider Inventoryservice:- Connects to the source and target providers.
- Maintains a local inventory for mappings and plans.
- Stores VM configurations.
-
Runs the
Validationservice if a VM configuration change is detected.
-
Validationservice checks the suitability of a VM for migration by applying rules.
The Validation service is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/.
User Interfaceservice:- Enables you to create and configure MTV CRs.
- Displays the status of the CRs and the progress of a migration.
Migration Controllerservice orchestrates migrations.When you create a migration plan, the Migration Controller service validates the plan and adds a status label. If the plan fails validation, the plan status is
Not readyand the plan cannot be used to perform a migration. If the plan passes validation, the plan status isReadyand it can be used to perform a migration. After a successful migration, the Migration Controller changes the plan status toCompleted.-
Virtual Machine Import Controller,Kubevirt Controller, andContainerized Data Import (CDI) Controllerservices handle most technical operations.
8.1.2. High-level migration workflow
The high-level workflow shows the migration process from the point of view of the user.
Figure 8.1. High-level workflow
The workflow describes the following steps:
- You create a source provider, a target provider, a network mapping, and a storage mapping.
You create a migration plan that includes the following resources:
- Source provider
- Target provider
- Network mapping
- Storage mapping
- One or more VMs
-
You run a migration plan by creating a
MigrationCR that references the migration plan. If a migration is incomplete, you can run a migration plan multiple times until all VMs are migrated. -
For each VM in the migration plan, the Migration Controller creates a
VirtualMachineImportCR and monitors its status. When all VMs have been migrated, the Migration Controller sets the status of the migration plan toCompleted. The power state of a source VM is maintained after migration.
8.1.3. Detailed migration workflow
You can use the detailed migration workflow to troubleshoot a failed migration.
Figure 8.2. Detailed OpenShift Virtualization migration workflow
The workflow describes the following steps:
-
When you run a migration plan, the Migration Controller creates a
VirtualMachineImportcustom resource (CR) for each source virtual machine (VM). -
The Virtual Machine Import Controller validates the
VirtualMachineImportCR and generates aVirtualMachineCR. The Virtual Machine Import Controller retrieves the VM configuration, including network, storage, and metadata, linked in the
VirtualMachineImportCR.For each VM disk:
-
The Virtual Machine Import Controller creates a
DataVolumeCR as a wrapper for a Persistent Volume Claim (PVC) and annotations. -
The Containerized Data Importer (CDI) Controller creates a PVC. The Persistent Volume (PV) is dynamically provisioned by the
StorageClassprovisioner. -
The CDI Controller creates an
Importerpod. For a VMware provider, the
Importerpod connects to the VM disk by using the VMware Virtual Disk Development Kit (VDDK) SDK and streams the VM disk to the PV.After the VM disks are transferred:
The Virtual Machine Import Controller creates a
Conversionpod with the PVCs attached to it.The
Conversionpod runsvirt-v2v, which installs and configures device drivers on the PVCs of the target VM.-
The Virtual Machine Import Controller creates a
VirtualMachineInstanceCR. When the target VM is powered on, the KubeVirt Controller creates a VM pod.
The VM pod runs
QEMU-KVMwith the PVCs attached as VM disks.
8.2. Error messages
This section describes error messages and how to resolve them.
warm import retry limit reached
The warm import retry limit reached error message is displayed during a warm migration if a VMware virtual machine (VM) has reached the maximum number (28) of changed block tracking (CBT) snapshots during the precopy stage. You must delete some of the CBT snapshots from the VM and restart the migration plan.
8.3. Using the must-gather tool
You can collect logs and information about MTV custom resources (CRs) by using the must-gather tool. You must attach a must-gather data file to all customer cases.
You can gather data for a specific namespace, migration plan, or virtual machine (VM) by using the filtering options.
If you specify a non-existent resource in the filtered must-gather command, no archive file is created.
Prerequisites
-
You must be logged in to the OpenShift Virtualization cluster as a user with the
cluster-adminrole. -
You must have the OpenShift Container Platform CLI (
oc) installed.
Collecting logs and CR information
-
Navigate to the directory where you want to store the
must-gatherdata. Run the
oc adm must-gathercommand:$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.1.0
The data is saved as
/must-gather/must-gather.tar.gz. You can upload this file to a support case on the Red Hat Customer Portal.Optional: Run the
oc adm must-gathercommand with the following options to gather filtered data:Namespace:
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.1.0 \ -- NS=<namespace> /usr/bin/targeted
Migration plan:
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.1.0 \ -- PLAN=<migration_plan> /usr/bin/targeted
Virtual machine:
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.1.0 \ -- VM=<vm_id> NS=<namespace> /usr/bin/targeted 1- 1
- Specify the VM ID as it appears in the
PlanCR.