提交 b5ec33b8 编写于 作者: J Jiri Denemark

qemu: Add support for migrate-continue QMP command

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 8587bb45
......@@ -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)
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册