On 7/2/20 12:57 PM, Daniel P. Berrangé wrote:
savevm, loadvm and delvm are some of the few commands that have never
been converted to use QMP. The primary reason for this lack of
conversion is that they block execution of the thread for as long as
they run.

Despite this downside, however, libvirt and applications using libvirt
has used these commands for as long as QMP has existed, via the
"human-monitor-command" passthrough command. IOW, while it is clearly
desirable to be able to fix the blocking problem, this is not an
immediate obstacle to real world usage.

Meanwhile there is a need for other features which involve adding new
parameters to the commands. This is possible with HMP passthrough, but
it provides no reliable way for apps to introspect features, so using
QAPI modelling is highly desirable.

This patch thus introduces trival savevm, loadvm, delvm commands

trivial

to QMP that are functionally identical to the HMP counterpart, including
the blocking problem.

Should we name them 'x-savevm', 'x-loadvm', 'x-delvm' to give ourselves room to change them when we DO solve the blocking issue? Or will the solution of the blocking issue introduce new QMP commands, at which point we can add QMP deprecation markers on these commands to eventually retire them?


Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
---

+++ b/qapi/migration.json
@@ -1621,3 +1621,79 @@
  ##
  { 'event': 'UNPLUG_PRIMARY',
    'data': { 'device-id': 'str' } }
+
+##
+# @savevm:
+#
+# Save a VM snapshot
+#
+# @tag: name of the snapshot to create. If it already
+# exists it will be replaced.
+#
+# Note that execution of the VM will be paused during the time
+# it takes to save the snapshot
+#
+# Returns: nothing
+#
+# Example:
+#
+# -> { "execute": "savevm",
+#      "data": {
+#         "tag": "my-snap"
+#      }
+#    }
+# <- { "return": { } }
+#
+# Since: 5.2

I guess you are NOT trying to make 5.1 soft freeze next week?


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


Reply via email to