mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemu: Add support for migrate-recover QMP command
This command tells QEMU to start listening for an incoming post-copy recovery connection. Just like migrate-incoming is used for starting fresh migration on the destination host. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
8e0d86fb6a
commit
8c4da941c0
@ -4521,3 +4521,15 @@ qemuMonitorChangeMemoryRequestedSize(qemuMonitor *mon,
|
||||
|
||||
return qemuMonitorJSONChangeMemoryRequestedSize(mon, alias, requestedsize);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorMigrateRecover(qemuMonitor *mon,
|
||||
const char *uri)
|
||||
{
|
||||
VIR_DEBUG("uri=%s", uri);
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONMigrateRecover(mon, uri);
|
||||
}
|
||||
|
@ -1545,3 +1545,7 @@ int
|
||||
qemuMonitorChangeMemoryRequestedSize(qemuMonitor *mon,
|
||||
const char *alias,
|
||||
unsigned long long requestedsize);
|
||||
|
||||
int
|
||||
qemuMonitorMigrateRecover(qemuMonitor *mon,
|
||||
const char *uri);
|
||||
|
@ -8970,3 +8970,22 @@ qemuMonitorJSONChangeMemoryRequestedSize(qemuMonitor *mon,
|
||||
|
||||
return qemuMonitorJSONSetObjectProperty(mon, path, "requested-size", &prop);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorJSONMigrateRecover(qemuMonitor *mon,
|
||||
const char *uri)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-recover",
|
||||
"s:uri", uri,
|
||||
NULL)))
|
||||
return -1;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
return -1;
|
||||
|
||||
return qemuMonitorJSONCheckError(cmd, reply);
|
||||
}
|
||||
|
@ -872,3 +872,7 @@ int
|
||||
qemuMonitorJSONChangeMemoryRequestedSize(qemuMonitor *mon,
|
||||
const char *alias,
|
||||
unsigned long long requestedsize);
|
||||
|
||||
int
|
||||
qemuMonitorJSONMigrateRecover(qemuMonitor *mon,
|
||||
const char *uri);
|
||||
|
@ -1210,6 +1210,7 @@ GEN_TEST_FUNC(qemuMonitorJSONSetMigrationDowntime, 1)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONMigrate, QEMU_MONITOR_MIGRATE_BACKGROUND |
|
||||
QEMU_MONITOR_MIGRATE_NON_SHARED_DISK |
|
||||
QEMU_MONITOR_MIGRATE_NON_SHARED_INC, "tcp:localhost:12345")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONMigrateRecover, "tcp://destination.host:54321");
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf",
|
||||
true)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
|
||||
@ -3109,6 +3110,7 @@ mymain(void)
|
||||
DO_TEST_GEN_DEPRECATED(qemuMonitorJSONSetMigrationSpeed, true);
|
||||
DO_TEST_GEN_DEPRECATED(qemuMonitorJSONSetMigrationDowntime, true);
|
||||
DO_TEST_GEN(qemuMonitorJSONMigrate);
|
||||
DO_TEST_GEN(qemuMonitorJSONMigrateRecover);
|
||||
DO_TEST_GEN(qemuMonitorJSONDump);
|
||||
DO_TEST_GEN(qemuMonitorJSONGraphicsRelocate);
|
||||
DO_TEST_GEN(qemuMonitorJSONRemoveNetdev);
|
||||
|
Loading…
Reference in New Issue
Block a user