migration/hmp: add migrate_pause command

Wrapper for QMP command "migrate-pause".

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180502104740.12123-25-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Peter Xu 2018-05-02 18:47:40 +08:00 committed by Juan Quintela
parent bfbf89c2b5
commit d37297dc66
3 changed files with 24 additions and 0 deletions

View File

@ -971,6 +971,20 @@ STEXI
@item migrate_recover @var{uri} @item migrate_recover @var{uri}
@findex migrate_recover @findex migrate_recover
Continue a paused incoming postcopy migration using the @var{uri}. Continue a paused incoming postcopy migration using the @var{uri}.
ETEXI
{
.name = "migrate_pause",
.args_type = "",
.params = "",
.help = "Pause an ongoing migration (postcopy-only)",
.cmd = hmp_migrate_pause,
},
STEXI
@item migrate_pause
@findex migrate_pause
Pause an ongoing migration. Currently it only supports postcopy.
ETEXI ETEXI
{ {

9
hmp.c
View File

@ -1527,6 +1527,15 @@ void hmp_migrate_recover(Monitor *mon, const QDict *qdict)
hmp_handle_error(mon, &err); hmp_handle_error(mon, &err);
} }
void hmp_migrate_pause(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
qmp_migrate_pause(&err);
hmp_handle_error(mon, &err);
}
/* Kept for backwards compatibility */ /* Kept for backwards compatibility */
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict) void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
{ {

1
hmp.h
View File

@ -69,6 +69,7 @@ void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
void hmp_migrate_continue(Monitor *mon, const QDict *qdict); void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict); void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
void hmp_migrate_recover(Monitor *mon, const QDict *qdict); void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
void hmp_migrate_pause(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict); void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict); void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict); void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);