live migration
Live migration is the ability to move a running virtual machine from one physical host to another while it keeps running, with no visible interruption to whatever is happening inside it. Imagine carefully picking up a fish tank, fish and water and all, and setting it down on a different table without the fish ever noticing the move. That is the goal: a database, a web server, or a user's session inside the VM continues serving as the whole machine is relocated underneath it, ideally with only a blink of pause measured in milliseconds.
The hard part is the VM's memory, which is large and constantly changing. The common technique is pre-copy. The hypervisor first copies all of the VM's memory pages to the destination host while the VM keeps running on the source. Of course, the VM dirties some pages during that copy, so the hypervisor then sends just the pages that changed, then the ones that changed during that round, iterating as the dirty set shrinks. Finally, for a very brief stop-and-copy moment, it pauses the VM, ships the last few dirty pages plus the CPU registers and device state, and resumes the VM on the destination — the pause is so short that connections and users do not drop.
Live migration matters because it makes the physical host disposable. An operator can drain a server for maintenance, balance load by spreading busy VMs across hosts, or evacuate a machine showing signs of hardware failure — all without taking the service down. The honest limits: it normally needs shared or replicated storage and fast networking between hosts, the iterative copy uses bandwidth and can struggle if the VM dirties memory faster than the link can send it, and the two hosts must be compatible enough (often similar CPUs) for the guest to resume safely.
A data centre needs to take a server down for a memory upgrade. Rather than shutting off the twelve VMs on it, the operator live-migrates each one to neighbouring servers. Users browsing a website hosted on those VMs notice nothing — at most a sub-second hiccup — even though their VM physically moved to different hardware.
A running VM relocates to another host with only a sub-second pause.
Live migration is not instant teleportation: if a VM writes memory faster than the network can copy it, the iterative pre-copy may never converge, forcing a longer pause or a fallback. It also generally needs shared storage and compatible host CPUs.