To support storage live migration, you need to deploy OKD Virtualization version 4.17 or later. Earlier versions of OKD Virtualization do not support live storage migration.
In OKD Virtualization 4.17.0, not all the required feature gates are enabled. However, to use the storage live migration feature, you must enable the feature gate.
Enable the feature gate by running the following command:
$ oc annotate --overwrite -n openshift-cnv hco kubevirt-hyperconverged kubevirt.kubevirt.io/jsonpatch='[ {"op": "add", "path": "/spec/configuration/developerConfiguration/featureGates/-", "value": "VolumesUpdateStrategy"}, {"op": "add", "path": "/spec/configuration/developerConfiguration/featureGates/-", "value": "VolumeMigration"} ]'
|
Red Hat does not support clusters with the annotation enabling this feature gate.
Do not add this annotation in a production cluster, if you add that annotation you receive a cluster wide alert indicating that your cluster is no longer supported.
|
For more information about the deployments and custom resource definitions (CRDs) that the migration controller uses to manipulate the VMs, see Migration controller options.
|
If the mig-controller pod starts before you install OKD Virtualization, the migration controller does not automatically see that you have the OKD Virtualization Custom Resource Definition (CRD) installed.
Restart the mig-controller pod in the openshift-migration namespace after installing OKD Virtualization.
|
The following table explains that to use storage live migrations, you need to have OKD Virtualization installed. Moreover, you must use MTC CRDs and at least two storage classes.
Table 2. Storage live migration requirements
Resource |
Purpose |
MigCluster
|
Represents the cluster to use when migrating the storage. |
StorageClass
|
The storage class, ensure there are at least two storage classes. |
VirtualMachine
|
A virtual machine definition, installed by KubeVirt. |
VirtualMachineInstance
|
A running virtual machine, installed by KubeVirt. |
DataVolume
|
A definition on how to populate a persistent volume (PV) with a VM disk, installed by Containerized Data Importer (CDI). |