Features/PostCopyLiveMigrationYabusame

From QEMU
Revision as of 15:18, 5 August 2011 by Yamahata (talk | contribs)

summary

post-copy based live migration

owner

description

This is 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

The migration procedure looks like

  • start migration: stop the guest VM on the source and send the machine states except guest RAM to the destination
  • resume the guest VM on the destination without guest RAM contents
  • Hook guest access to pages, and pull page contents from the source. This continues until all the pages are pulled to the destination


postcopy livemigration


  • character device driver

qemu mmap() the dedicated character device, and then hook page fault. Next it send the page fault request to the user space daemon and when the daemon responds the page request with page contents, the page fault is resolved and VM execution is resumed.

  • daemon on destination side

an independent daemon vs a thread in qemu. It waits page request from the character device. When receiving the requests, it pull the page contents from the migration source, then responds the requests.

  • protocol

The existing protocol that exists today will be extended.


TODO

  • character deriver to hook guest ram access
  • daemon to handle page request
  • modification to qemu on source side
  • fix THP: They check if vma operations is anonymous, not if the page is anonymous.

future enhancement

  • optimization
    • another connection for background page transfer in order to reduce latency
    • mixing precopy/postcopy
    • avoid memory copy
    • hint not to send page
    • not to pull page when writing/clearing whole page
  • cooperate with Kemari

links