Phases of a live migration
The migration of a virtual server from a source to a destination host consists of two phases, the live phase and the stopped phase.
Live phase
While the virtual server is running, its memory pages are transferred to the destination host. During the live phase, the virtual server might continue to modify memory pages. These pages are called dirty pages, which must be retransmitted.QEMU continuously estimates the time it will need to complete the migration during the stopped phase. If this estimated time is less than the specified maximum downtime for the virtual server, the virtual server enters the stopped phase of the migration.
If the virtual server changes memory pages faster than the host can transfer them to the destination, the migration command option --auto-converge can be used to throttle down the CPU time of the virtual server until the estimated downtime is less than the specified maximum downtime. If you do not specify this option, it might happen that the virtual server never enters the stopped phase because there are too many dirty pages to migrate.
This mechanism works for average virtual server workloads. Workloads that are very memory intensive might require the additional specification of the --timeout option. This option suspends the virtual server after a specified amount of time and avoids the situation where throttling down the CPU cannot catch up with the memory activity and thus, in the worst case, the migration operation never stops.
Stopped phase
During the stopped phase, the virtual server is paused. The host uses this downtime to transfer the rest of the dirty pages and the virtual server's system image to the destination.If the virtual server makes use of storage keys, they are also migrated during this phase.