Live migration process of a VM from one host to another.

In a virtualized cluster, Live VM Migration is the process of moving a running virtual machine from one physical host to another without shutting it down. This technique is widely used for:

  • Load balancing
  • High availability
  • Server consolidation
  • Disaster recovery

Unlike physical-to-physical failover, virtual machines can migrate between hosts without affecting service continuity — even if a VM’s host fails.


States of a Virtual Machine (VM)

A VM can exist in the following four states:

  1. Inactive: VM is not enabled.
  2. Active: VM is running and performing tasks.
  3. Paused: VM is temporarily halted but still consuming resources.
  4. Suspended: VM state is saved to disk and halted completely.

Steps of Live Migration of a VM

Live migration involves 6 steps:

Step 0 & 1: Initiate Migration

  • Identify the VM to migrate and the destination host.
  • This may be done manually or automatically based on strategies like load balancing.

Step 2: Memory Pre-Copy

  • Copy the entire memory of the VM to the destination host.
  • The dirty pages (memory pages modified during transfer) are copied again in multiple rounds.
  • This continues until the dirty data becomes small enough for final transfer.
  • During this, the VM continues to run with minimal impact.

Step 3: Suspend VM and Copy Final Data

  • The VM is paused to transfer the remaining dirty pages, CPU state, and device/network info.
  • This introduces a short downtime, where the VM service is temporarily unavailable.
  • This downtime must be very short (e.g., milliseconds) for a seamless experience.

Step 4 & 5: Commit and Activate on New Host

  • VM is activated on the destination host using the transferred state.
  • Network connections are re-established, and all dependencies on the source host are cleared.
  • The old VM is deleted from the source.

Performance Effects of Live Migration

An experiment with 512 KB file transfers to 100 clients shows:

  • Initial throughput: 870 MB/s
  • During precopy: 765 MB/s (for 63s)
  • Later iterations: 694 MB/s (for 9.8s)
  • Downtime: Just 165 milliseconds

This indicates that live migration causes very low performance overhead, ensuring that services remain almost uninterrupted, which is vital for cloud and enterprise systems.

Leave a Reply

Your email address will not be published. Required fields are marked *