KubeVirt migration workflow

The KubeVirt workflow provides a detailed view of the process of migrating virtual machines (VMs).

KubeVirt workflow
Figure 1. KubeVirt workflow

The KubeVirt workflow comprises the following steps:

  1. When you run a migration plan, the Migration Controller creates a VirtualMachineImport CR for each source VM.

  2. The Virtual Machine Import Controller validates the VirtualMachineImport CR and generates a VirtualMachine CR

  3. The Virtual Machine Import Controller retrieves the VM configuration, including network, storage, and metadata, linked in the VirtualMachineImport CR.



    For each VM disk:

  4. The Virtual Machine Import Controller creates a DataVolume CR as a wrapper for a Persistent Volume Claim (PVC) and annotations.



  5. The Containerized Data Importer (CDI) Controller creates a PVC. The Persistent Volume (PV) is dynamically provisioned by the StorageClass provisioner.



  6. The CDI Controller creates an Importer pod.

  7. The Importer pod connects to the source VM disk, using the VDDK SDK, and streams the disk to the PV.

  8. After the VM disks are transferred, the Virtual Machine Import Controller creates a Conversion pod with the PVCs attached to it. The Conversion pod runs virt-v2v, which installs and configures device drivers on the PVCs of the target VM.

  9. The Virtual Machine Import Controller creates a VirtualMachineInstance CR.

  10. When the target VM is powered on, the KubeVirt Controller creates a VM pod. The VM pod runs QEMU-KVM with the PVCs attached as VM disks.