# Live migration
# Introduction
Live migration is the process of moving a running virtual machine (VM) to another node in the cluster without interrupting the virtual workload. By default, live migration traffic is encrypted using Transport Layer Security (TLS).
An enhanced web console provides a graphical portal to manage these virtualized resources alongside the OpenShift Container Platform cluster containers and infrastructure.
# Requirements of Live migration
A dedicated Multus network for live migration is highly recommended.
Persistent Volume Claim (Storage) must have ReadWriteMany (RWX) access mode.
All CPU in cluster which hosts Virtual machines must support the host model.
# Configuring live migration
You can configure the following live migration settings to ensure the migration process do not saturate the cluster.
Limits and timeouts
Maximum number of migrations per node or cluster
Edit the HyperConverged CR and add the necessary live migration parameters:
oc edit hyperconverged kubevirt-hyperconverged -n openshift-cnv
sample configuration parameters
apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
name: kubevirt-hyperconverged
namespace: openshift-cnv
spec:
liveMigrationConfig:
bandwidthPerMigration: 64Mi
completionTimeoutPerGiB: 800
parallelMigrationsPerCluster: 5
parallelOutboundMigrationsPerNode: 2
progressTimeout: 150
# Initiating Live Migration
Live migration of virtual machines can be done using web console or CLI. prerequisites must be met for the live migration of any virtual machines.
# Initiating Live Migration using web console
Navigate to Virtualization → VirtualMachines in the web console.
Select Migrate from the Options menu beside a VM.
FIGURE 38 Live Migration between nodes
- Click Migrate.
# Initiating Live Migration using CLI
- Create and apply the VirtualMachineInstanceMigration manifest for the VM
apiVersion: kubevirt.io/v1
kind: VirtualMachineInstanceMigration
metadata:
name: < migration_name >
spec:
vmiName: < vm_name >