qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] qmp interface for save vmstate to image


From: Wenchao Xia
Subject: [Qemu-devel] [RFC] qmp interface for save vmstate to image
Date: Fri, 15 Mar 2013 15:24:38 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

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 via email to

[Prev in Thread] Current Thread [Next in Thread]