Features/PostCopyLiveMigration

From QEMU
Revision as of 10:06, 30 September 2014 by Dgilbert (talk | contribs) (→‎design)

summary

post-copy based live migration

owner

description

This is yet another live migration mechanism for QEMU/KVM, which implements the migration technique known as "postcopy" or "lazy" migration. Just after the "migrate" command is invoked, the execution host of a VM is instantaneously switched to a destination host.

design

As much as possible the design attempts to build reusable components that other features can reuse.

This postcopy implementation uses the Linux 'userfault' kernel mechanism from Andrea Arcangeli; it's not specific to Postcopy and is designed to allow use with all of the standard kernel features (like transparent huge pages, KSM etc).

Mixed pre/post copy is built into the design from the start; a command is sent to switch modes after the migration has been stated (as long as postcopy mode has been enabled first by a capability)

Major components

  • 'command' section type for sending migration commands that don't directly reflect guest state; this is used to send messages that move through different phases of postcopy and is expandable for use by others.
  • 'return path' a method for the destination to send messages back to the source; used for postcopy page requests, and allows the destination to signal failure back to the source
  • 'sent map' a bitmap on the source populated with the set of all pages that have already been transmitted
  • 'postcopy pagemap inbound (PMI)' a map on the destination holding the state of each page, whether it's been requested from the source and whether it has been received.

TODO

future enhancement

  • optimization

links