mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Add QMP functions for post-copy migration
Signed-off-by: Cristian Klein <cristiklein@gmail.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
ee47d8e8dd
commit
41d786b915
@ -167,7 +167,8 @@ VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
|
||||
|
||||
VIR_ENUM_IMPL(qemuMonitorMigrationCaps,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_LAST,
|
||||
"xbzrle", "auto-converge", "rdma-pin-all", "events")
|
||||
"xbzrle", "auto-converge", "rdma-pin-all", "events",
|
||||
"postcopy-ram")
|
||||
|
||||
VIR_ENUM_IMPL(qemuMonitorVMStatus,
|
||||
QEMU_MONITOR_VM_STATUS_LAST,
|
||||
@ -3797,3 +3798,14 @@ qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
|
||||
|
||||
return qemuMonitorJSONMigrateIncoming(mon, uri);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon)
|
||||
{
|
||||
VIR_DEBUG("mon=%p", mon);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
|
||||
return qemuMonitorJSONMigrateStartPostCopy(mon);
|
||||
}
|
||||
|
@ -532,6 +532,7 @@ typedef enum {
|
||||
QEMU_MONITOR_MIGRATION_CAPS_AUTO_CONVERGE,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_RDMA_PIN_ALL,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_EVENTS,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
|
||||
|
||||
QEMU_MONITOR_MIGRATION_CAPS_LAST
|
||||
} qemuMonitorMigrationCaps;
|
||||
@ -933,4 +934,6 @@ int qemuMonitorGetMemoryDeviceInfo(qemuMonitorPtr mon,
|
||||
int qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
|
||||
const char *uri);
|
||||
|
||||
int qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon);
|
||||
|
||||
#endif /* QEMU_MONITOR_H */
|
||||
|
@ -6737,3 +6737,25 @@ qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
|
||||
{
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-start-postcopy", NULL)))
|
||||
return -1;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||
|
||||
cleanup:
|
||||
virJSONValueFree(cmd);
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
}
|
||||
|
@ -488,4 +488,7 @@ int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
||||
const char *uri)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
#endif /* QEMU_MONITOR_JSON_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user