qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Juan Quintela <quintela@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	Dietmar Maurer <dietmar@proxmox.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [RFC] qmp interface for save vmstate to image
Date: Fri, 15 Mar 2013 15:24:38 +0800	[thread overview]
Message-ID: <5142CCB6.7000004@linux.vnet.ibm.com> (raw)

Hi, Juan and guys,
  I'd like to add a new way to save vmstate, which will based on the
migration thread, but will write contents to block images, instead
of fd as stream. Following is the method to add API:

1 add parameters to migrate interface, and a new type of uri:
image:[VMSATE_SAVE_IMAGE]

##
# @MigrateImageOptions:
#
# Options for migration to image.
#
# @path: the full path to the image to be used.
# @use-existing: #optional, whether to use existing image in path. If
#                not specified, qemu will try create new image.
# @create-size: #optional, the image's virtual size in creation. Only
#               valid when use-existing is false or absence, unit is M.
# @fmt: #optional the format of the image. If not specified, when
#       use-existing is true, qemu will try detect the image format,
#       when use-existing is false or absence, qcow2 format will be
#       used.
# @stream: #optional, whether to save vmstate as stream, in which way
#          small writes reduce but size may continue growing. If not
#          specified, vmstate will be saved with fixed size.
#
# Since: 1.5
##
{ 'type': 'MigrateImageOptions',
  'data': { 'path': 'str', '*use-existing': 'bool',
            '*create-size': 'int', '*fmt': 'str',
            '*stream': 'bool' } }

##
# @migrate
#
# Migrates the current running guest to another Virtual Machine.
#
# @uri: the Uniform Resource Identifier of the destination VM
#
# @blk: #optional do block migration (full disk copy)
#
# @inc: #optional incremental disk copy migration
#
# @detach: this argument exists only for compatibility reasons and
#          is ignored by QEMU
#
# @image-options: #optional, the options used in migration to image.
#                 Only valid in migration to image.
#
# Returns: nothing on success
#
# Since: 0.14.0
##
{ 'command': 'migrate',
  'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
           '*detach': 'bool', '*image-options': MigrateImageOptions} }

  In this way query-migrate and migrate incoming could be naturelly used
for querying and restoring, But introduce some options only for the
image migration.

2 new command vmstate-save with above options. Then use query-migrate
and migrate incoming to query/restore the states, which seems wild.

  I can't decide which is better, could u take a look and put some
comments on this?
-- 
Best Regards

Wenchao Xia

             reply	other threads:[~2013-03-15  7:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  7:24 Wenchao Xia [this message]
2013-03-15 14:51 ` [Qemu-devel] [RFC] qmp interface for save vmstate to image Stefan Hajnoczi
2013-03-18  6:40   ` Wenchao Xia
2013-03-18  9:04     ` Kevin Wolf
2013-03-18 10:08       ` Paolo Bonzini
2013-03-18 10:50         ` Wenchao Xia
2013-03-18 10:47       ` Wenchao Xia
2013-03-18 10:09     ` Stefan Hajnoczi
2013-03-18 13:28 ` Pavel Hrdina
2013-03-21  6:43   ` Wenchao Xia
2013-03-21 11:48     ` Pavel Hrdina
2013-03-21 13:38       ` Stefan Hajnoczi
2013-03-21 13:42         ` Paolo Bonzini
2013-03-21 13:53           ` Pavel Hrdina
2013-03-21 14:56           ` Stefan Hajnoczi
2013-03-21 15:08             ` Eric Blake
2013-03-23  4:36               ` Wenchao Xia
2013-03-27  3:35                 ` Wenchao Xia
2013-03-21 13:43         ` Pavel Hrdina

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=5142CCB6.7000004@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=dietmar@proxmox.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.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).