migrate: HMP migate_continue
HMP equivalent to the just added migrate-continue Unpause a migrate paused at a given state. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
89cfc02cb6
commit
94ae12cba4
@ -959,7 +959,19 @@ STEXI
|
||||
@item migrate_cancel
|
||||
@findex migrate_cancel
|
||||
Cancel the current VM migration.
|
||||
ETEXI
|
||||
|
||||
{
|
||||
.name = "migrate_continue",
|
||||
.args_type = "state:s",
|
||||
.params = "state",
|
||||
.help = "Continue migration from the given paused state",
|
||||
.cmd = hmp_migrate_continue,
|
||||
},
|
||||
STEXI
|
||||
@item migrate_continue @var{state}
|
||||
@findex migrate_continue
|
||||
Continue migration from the paused state @var{state}
|
||||
ETEXI
|
||||
|
||||
{
|
||||
|
13
hmp.c
13
hmp.c
@ -1495,6 +1495,19 @@ void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
|
||||
qmp_migrate_cancel(NULL);
|
||||
}
|
||||
|
||||
void hmp_migrate_continue(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
Error *err = NULL;
|
||||
const char *state = qdict_get_str(qdict, "state");
|
||||
int val = qapi_enum_parse(&MigrationStatus_lookup, state, -1, &err);
|
||||
|
||||
if (val >= 0) {
|
||||
qmp_migrate_continue(val, &err);
|
||||
}
|
||||
|
||||
hmp_handle_error(mon, &err);
|
||||
}
|
||||
|
||||
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
Error *err = NULL;
|
||||
|
1
hmp.h
1
hmp.h
@ -68,6 +68,7 @@ void hmp_savevm(Monitor *mon, const QDict *qdict);
|
||||
void hmp_delvm(Monitor *mon, const QDict *qdict);
|
||||
void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
|
||||
void hmp_migrate_cancel(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_set_downtime(Monitor *mon, const QDict *qdict);
|
||||
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
|
||||
|
Loading…
Reference in New Issue
Block a user