ArticleslgStudy

science

Live migration

Live migration is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Live migration rather than just read about it. In short: Live migration, also called migration, refers to the process of moving a running virtual machine (VM) between different physical machines in a manner that the VM and applications running within the VM are mostly unaffected. Memory, storage, and network connectivity of the virtual machine are transferred from the original host machine to the destination.

Key takeaways

  • Live migration belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Live migration to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Live migration from memory before moving on to harder problems.

Reference excerpt

Live migration, also called migration, refers to the process of moving a running virtual machine (VM) between different physical machines in a manner that the VM and applications running within the VM are mostly unaffected. Memory, storage, and network connectivity of the virtual machine are transferred from the original host machine to the destination. The time between stopping the VM or application on the source and resuming it on destination is called "downtime" or "blackout".

Live migration basics Live migration requires the entire VM's state to be transferred from the source host to the target host. This state includes the state of any components of the VM, for example, the register contents of the virtual CPUs (vCPUs). The state of the VM is not stable until the VM is paused. For example, until the vCPUs have been paused, the state in the virtual registers may be changing. The simplest way to implement live migration is to pause the VM, serialize and send the state to the target host, and resume the VM on the target host. Serializing and sending certain state, like the state of the VM's main memory or locally-attached storage devices, can be slow.

Memory live migration If the entire contents of the VM's main memory must be copied while the VM is paused, the VM will have to remain paused for an extended period of time, depending on the size of the VM's main memory. There are several techniques for reducing blackout for large-memory VMs.

Pre-copy memory migration Pre-copy memory migration requires the hypervisor to track which pages the guest is writing to. With this ability, the following strategy is possible:

Copy all of the VM's main memory pages to the target host. Before copying any particular page, track any subsequent writes to the page (e.g. by write-protecting the corresponding SLAT entry). After all pages have been copied, start a new copying pass, but only copy pages that were written to since it was last copied to the target host (i.e., pages that are "dirty"). Repeat step 3 until the set of remaining dirty pages is small. Pause the VM, and transfer the remaining dirty pages to the target host. This is the basic pre-copy strategy. Other optimizations can be applied, like not re-sending pages that will likely be dirtied again quickly. The guest is usually able to write to memory faster than it can be copied to the target, which means that pre-copy might never converge to a small dirty set. If the hypervisor does not throttle writes to guest memory, blackout time may remain large, even with pre-copy memory migration.

Post-copy memory migration Post-copy memory migration is a strategy for transferring a VM's main memory outside of blackout. It can complement pre-copy by reducing pause time when pre-copy does not converge on a small set of dirty pages. It requires the hypervisor to intercept guest memory accesses, allowing the VM to resume on the target host without a complete memory copy. Accesses to pages not yet present on the target (e.g., pages dirtied during pre-copy) are fetched on demand by the hypervisor. To ensure that all dirty pages are eventually transferred, a hypervisor implementing post-copy live migration will also fetch outstanding dirty pages in the background, concurrently with on-demand fetching of dirty pages. Post-copy transfers each page only once, whereas pre-copy may resend pages multiple times if they are repeatedly modified. However, pre-copy maintains a consistent VM state on the source, while post-copy splits state between source and destination. As a result, failures during post-copy cannot be recovered, unlike pre-copy, which can be restarted.

VM managers with live migration support Virtuozzo Xen since version 2.0, 2004 for PV guests; since version 3.1, May 18, 2007 for HVM guests OpenVZ Parallels Cloud Server Workload Partitions Integrity Virtual Machines KVM since February 2007, with different techniques. Oracle VM Server for x86 Oracle VM Server for SPARC OVirt Red Hat Virtualisation POWER Hypervisor (PHYP) VMware ESXi IBM Live Partition Mobility, since 2007 Hyper-V Server 2008 R2 VirtualBox Proxmox Virtual Environment

Cloud Platforms with live migration support Microsoft Azure Jelastic Google Cloud Platform CloudEndure Oracle Cloud Infrastructure

Systems providing software live migration OpenSSI MOSIX Single-system image

See also Virtual machine Comparison of platform virtualization software CRIU

References

External links HOWTO Article about Xen migration OpenVZ checkpointing and live migration Live migration in KVM VMware VMotion Microsoft: Step by Step Guide for live migration Microsoft Whitepaper: Live Migration Overview & Architecture

Worked examples

Example 1 — a first encounter with Live migration

Start with the simplest possible case. Write down what Live migration claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Live migration before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Live migration ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Live migration

In research
Live migration appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Live migration in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Live migration is common in secondary-school and first-year university syllabi. It links to neighbouring topics Virtualization, so understanding it makes those chapters shorter.
In everyday life
Look for Live migration outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Live migration in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Live migration means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Live migration out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Live migration in simple terms?

Live migration, also called migration, refers to the process of moving a running virtual machine (VM) between different physical machines in a manner that the VM and applications running within the VM are mostly unaffected. Memory, storage, and network connectivity of the virtual machine are transf…

Why does Live migration matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Live migration?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Live migration.

Tags

  • Virtualization

Keep exploring