qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dor Laor <dlaor@redhat.com>
To: qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	jes sorensen <jes.sorensen@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefan.hajnoczi@uk.ibm.com>
Subject: [Qemu-devel] [RFC] live snapshot, live merge, live block migration
Date: Mon, 09 May 2011 16:40:00 +0300	[thread overview]
Message-ID: <4DC7EEB0.3040007@redhat.com> (raw)

No patch here (sorry) but collection of thoughts about these features 
and their potential building blocks. Please review (also on 
http://wiki.qemu.org/Features/LiveBlockMigration)

Future qemu is expected to support these features (some already 
implemented):

  * Live block copy

    Ability to copy 1+ virtual disk from the source backing file/block
    device to a new target that is accessible by the host. The copy
    supposed to be executed while the VM runs in a transparent way.

    Status: code exists (by Marcelo) today in qemu but needs refactoring
    due to a race condition at the end of the copy operation. We agreed
    that a re-implementation of the copy operation should take place
    that makes sure the image is completely mirrored until management
    decides what copy to keep.

  * Live snapshots and live snapshot merge

    Live snapshot is already incorporated (by Jes) in qemu (still need
    qemu-agent work to freeze the guest FS).

    Live snapshot merge is required in order of reducing the overhead
    caused by the additional snapshots (sometimes over raw device).
    Currently not implemented for a live running guest

    Possibility: enhance live copy to be used for live snapshot merge.
                 It is almost the same mechanism.

  * Copy on read (image streaming)
    Ability to start guest execution while the parent image reside
    remotely and each block access is replicated to a local copy (image
    format snapshot)

    It should be nice to have a general mechanism that will be used for
    all image formats. What about the protocol to access these blocks
    over the net? We can reuse existing ones (nbd/iscsi).

    Such functionality can be hooked together with live block migration
    instead of the 'post copy' method.

  * Live block migration (pre/post)

    Beyond live block copy we'll sometimes need to move both the storage
    and the guest. There are two main approached here:
    - pre copy
      First live copy the image and only then live migration the VM.
      It is simple but if the purpose of the whole live block migration
      was to balance the cpu load, it won't be practical to use since
      copying an image of 100GB will take too long.
    - post copy
      First live migrate the VM, then live copy it's blocks.
      It's better approach for HA/load balancing but it might make
      management complex (need to keep the source VM alive, what happens
      on failures?)
      Using copy on read might simplify it -
      post copy = live snapshot + copy on read.

    In addition there are two cases for the storage access:
    1. The source block device is shared and can be easily accessed by
       the destination qemu-kvm process.
       That's the easy case, no special protocol needed for the block
       devices copying.
    2. There is no shared storage at all.
       This means we should implement a block access protocol over the
       live migration fd :(

       We need to chose whether to implement a new one, or re-use NBD or
       iScsi (target&initiator)

  * Using external dirty block bitmap

    FVD has an option to use external dirty block bitmap file in
    addition to the regular mapping/data files.

    We can consider using it for live block migration and live merge too.
    It can also allow additional usages of 3rd party tools to calculate
    diffs between the snapshots.
    There is a big down side thought since it will make management
    complicated and there is the risky of the image and its bitmap file
    get out of sync. It's much better choice to have qemu-img tool to be
    the single interface to the dirty block bitmap data.

Summary:
   * We need Marcelo's new (to come) block copy implementation
     * should work in parallel to migration and hotplug
   * General copy on read is desirable
   * Live snapshot merge to be implemented using block copy
   * Need to utilize a remote block access protocol (iscsi/nbd/other)
     Which one is the best?
   * Keep qemu-img the single interface for dirty block mappings.
   * Live block migration pre copy == live copy + block access protocol
     + live migration
   * Live block migration post copy == live migration + block access
     protocol/copy on read.

Comments?

Regards,
Dor

             reply	other threads:[~2011-05-09 13:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 13:40 Dor Laor [this message]
2011-05-09 15:23 ` [Qemu-devel] [RFC] live snapshot, live merge, live block migration Anthony Liguori
2011-05-09 20:58   ` Dor Laor
2011-05-12 14:18   ` Marcelo Tosatti
2011-05-12 15:37   ` Jes Sorensen
2011-05-10 14:13 ` Marcelo Tosatti
2011-05-12 15:33 ` Jes Sorensen
2011-05-13  3:16   ` Jagane Sundar
2011-05-15 21:14     ` Dor Laor
2011-05-15 21:38       ` Jagane Sundar
2011-05-16  7:53         ` Dor Laor
2011-05-16  8:23           ` Jagane Sundar
2011-05-17 22:53             ` Dor Laor
2011-05-18 15:49               ` Jagane Sundar
2011-05-20 12:19 ` Stefan Hajnoczi
2011-05-20 12:39   ` Jes Sorensen
2011-05-20 12:49     ` Stefan Hajnoczi
2011-05-20 12:56       ` Jes Sorensen
2011-05-22  9:52   ` Dor Laor
2011-05-23 13:02     ` Stefan Hajnoczi
2011-05-27 16:46       ` Stefan Hajnoczi
2011-05-27 17:16         ` Jagane Sundar
2011-05-23  5:42   ` Jagane Sundar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC7EEB0.3040007@redhat.com \
    --to=dlaor@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=jes.sorensen@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefan.hajnoczi@uk.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).