Why does live migration fail for a virtual machine?

Virtual Private Cloud 4.17 and later Bare metal worker nodes only RHCOS only

You try to live migrate a virtual machine (VM), but the migration does not complete successfully.

Live migration depends on storage and node placement. Migration can fail if the VM storage does not support ReadWriteMany (RWX), if the target node does not have enough resources, or if a VNI-based VM is moved across zones.

To resolve the issue,

review the migration resource, confirm that the storage supports RWX, and verify the node and zone placement.

  1. Check the migration status.
    oc get vmim -n <namespace>
    oc describe vmim <migration_name> -n <namespace>
    
  2. Verify that the VM storage supports ReadWriteMany (RWX).
    oc get pvc -n <namespace>
    oc describe pvc <pvc_name> -n <namespace>
    
  3. Check the zone placement of the cluster nodes.
    oc get nodes -L topology.kubernetes.io/zone
    
  4. Review the target node resources.
    oc describe node <target_node_name>
    
  5. Review the virt-handler logs.
    oc logs -n openshift-cnv -l kubevirt.io=virt-handler
    
  6. If the VM uses VNIs, confirm that the migration stays within the same zone. For more information, see Managing virtual network interfaces for OpenShift Virtualization.