qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH V1 03/32] savevm: QMP command for cprsave


From: Eric Blake
Subject: Re: [PATCH V1 03/32] savevm: QMP command for cprsave
Date: Thu, 30 Jul 2020 11:12:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/30/20 10:14 AM, Steve Sistare wrote:
To enable live reboot, provide the cprsave QMP command and the VMS_REBOOT
vmstate-saving operation, which saves the state of the virtual machine in a
simple file.

Syntax:
   {'command':'cprsave', 'data':{'file':'str', 'mode':'str'}}

   The mode argument must be 'reboot'.  Additional modes will be defined in
   the future.


Focusing on just the UI:

+++ b/qapi/migration.json
@@ -1621,3 +1621,17 @@
  ##
  { 'event': 'UNPLUG_PRIMARY',
    'data': { 'device-id': 'str' } }
+
+##
+# @cprsave:
+#
+# Create a checkpoint of the virtual machine device state in @file.
+# Guest RAM and guest block device blocks are not saved.
+#
+# @file: name of checkpoint file

Since you used qemu_open() in the code, this can include a '/dev/fdset/NNN' magic name for saving into a previously-passed-in file descriptor instead of directly opening a local file name. That's a good thing, but I don't know if it needs explicit mention in the docs.

+# @mode: 'reboot' : checkpoint can be cprload'ed after a host kexec reboot.
+#
+# Since 5.0

5.2 (you've missed 5.0 by a long shot, and even 5.1 is too late now).

+##
+{ 'command': 'cprsave', 'data': { 'file': 'str', 'mode': 'str' } }

'mode' should be an enum type, rather than an open-coded string:

{ 'enum': 'CprMode', 'data': ['reboot'] }
{ 'command': 'cprsave', 'data': {'file': 'str', 'mode': 'CprMode' } }

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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