Migration is the term for the process of moving a virtualized guest from one host to another. Migration can be conducted offline (where the guest is suspended and then moved) or live (where a guest is moved without suspending).
Migration is a key feature of virtualization as software is completely separated from hardware. Migration is useful for:
-
Load balancing - guests can be moved to hosts with lower usage when a host becomes overloaded.
-
Hardware failover - when hardware devices on the host start to fail, guests can be safely relocated so the host can be powered down and repaired.
-
Energy saving - guests can be redistributed to other hosts and host systems powered off to save energy and cut costs in low usage periods.
-
Geographic migration - guests can be moved to another location for lower latency or in serious circumstances.
Migration only moves the virtualized guest's memory. The guest's storage is located on networked storage which is shared between the source host and the destination.
Shared, networked storage must be used for storing guest images. Without shared storage migration is not possible. It is recommended to use libvirt managed storage pools for shared storage.
An offline migration suspends the guest then moves an image of the guest's memory to the destination host. The guest is resumed on the destination host and then memory the guest used on the source host is freed.
Live migration is the process of migrating a running guest from one physical host to another physical host.