qemu: Add support for migrate-continue QMP command

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2017-10-20 09:17:09 +02:00
parent 8587bb4549
commit b5ec33b832
4 changed files with 47 additions and 0 deletions

View File

@ -4254,6 +4254,19 @@ qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon)
return qemuMonitorJSONMigrateStartPostCopy(mon);
}
int
qemuMonitorMigrateContinue(qemuMonitorPtr mon,
qemuMonitorMigrationStatus status)
{
VIR_DEBUG("status=%s", qemuMonitorMigrationStatusTypeToString(status));
QEMU_CHECK_MONITOR_JSON(mon);
return qemuMonitorJSONMigrateContinue(mon, status);
}
int
qemuMonitorGetRTCTime(qemuMonitorPtr mon,
struct tm *tm)

View File

@ -1119,6 +1119,9 @@ int qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
int qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon);
int qemuMonitorMigrateContinue(qemuMonitorPtr mon,
qemuMonitorMigrationStatus status);
int qemuMonitorGetRTCTime(qemuMonitorPtr mon,
struct tm *tm);

View File

@ -7374,6 +7374,33 @@ qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
return ret;
}
int
qemuMonitorJSONMigrateContinue(qemuMonitorPtr mon,
qemuMonitorMigrationStatus status)
{
const char *statusStr = qemuMonitorMigrationStatusTypeToString(status);
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-continue",
"s:state", statusStr,
NULL)))
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
}
int
qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon,
struct tm *tm)

View File

@ -500,6 +500,10 @@ int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
int qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
ATTRIBUTE_NONNULL(1);
int qemuMonitorJSONMigrateContinue(qemuMonitorPtr mon,
qemuMonitorMigrationStatus status)
ATTRIBUTE_NONNULL(1);
int qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon,
struct tm *tm)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);