Skip to content

Live Migration

This page explains how VM live migration works. The setup includes a hypervisor cluster and a NAS cluster. The NAS cluster shares the VM virtual disk via an NFS server, while the hypervisor cluster runs the VM. The connection shown in the video uses RDP directly to the guest. The guest plays a YouTube video to demonstrate the migration process and its impact on the client experience.

1. Hypervisor migration

This section describes how to migrate a virtual domain between hypervisors within a cluster. The hypervisor cluster uses shared storage exported from the NAS cluster. During migration, the guest operating system experiences minimal disruption as it moves from one hypervisor to another.

          HYPERVISORS                                      NAS

+--------+          +--------+               +--------+           +--------+
|        |          |        |               |        |           |        |
| vnode2 |          | vnode3 |               |  nas1  |           |  nas2  |
|        |          |        |               |        |           |        |
|        |          |        |               |        |           |        |
|  (vm)  |          |        |               |        |           |  (vm)  |
|        |          |        |               |        |           |        |
+---+----+          +----+---+               +--------+           +--------+
    |                    ^
    |                    |
    +--------------------+

2. NAS migration

This section explains how to move an NFS storage cluster resource from one NAS to another while keeping the guest OS running on the hypervisor node.

          HYPERVISORS                                      NAS

+--------+          +--------+               +--------+           +--------+
|        |          |        |               |        |           |        |
| vnode2 |          | vnode3 |               |  nas1  |           |  nas2  |
|        |          |        |               |        |           |        |
|        |          |        |               |        |           |        |
|        |          |  (vm)  |               |        |           |  (vm)  |
|        |          |        |               |        |           |        |
+---+----+          +----+---+               +--------+           +--------+
                                                 ^                    |
                                                 |                    |
                                                 +--------------------+

3. Hypervisor and NAS migration

This demo live-migrates a virtual domain resource from one hypervisor to another while it moves the shared NFS storage from one NAS to another at the same time. Users may experience a brief freeze in the guest OS, but the guest continues operating as if nothing happened.

          HYPERVISORS                                      NAS

+--------+          +--------+               +--------+           +--------+
|        |          |        |               |        |           |        |
| vnode2 |          | vnode3 |               |  nas1  |           |  nas2  |
|        |          |        |               |        |           |        |
|        |          |        |               |        |           |        |
|        |          |  (vm)  |               |  (vm)  |           |        |
|        |          |        |               |        |           |        |
+---+----+          +----+---+               +--------+           +--------+
    ^                    |                       |                    ^
    |                    |                       |                    |
    +--------------------+                       +--------------------+

Conclusions

We used two clusters, both configured with Pacemaker to monitor resources.

The storage cluster uses a DRBD primary/secondary configuration with NFSv4 server exports and floating IPs. The hypervisor cluster contains virtual domain resources that support live migration. This process commits RAM memory, which is copied to the new hypervisor while the guest remains running. Once the copy is complete, the virtual domain pauses for a few hundred milliseconds while the remaining RAM increment is transferred. The domain then starts on the other hypervisor with the same memory state and continues operation.

This setup enables a high-availability cluster where both hypervisors and storage can tolerate a node failure without clients noticing.