mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
8ca5e80118
commit
511c023103
6 changed files with 21 additions and 52 deletions
13
migration.c
13
migration.c
|
@ -58,6 +58,19 @@ int qemu_start_incoming_migration(const char *uri)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void process_incoming_migration(QEMUFile *f)
|
||||
{
|
||||
if (qemu_loadvm_state(f) < 0) {
|
||||
fprintf(stderr, "load of migration failed\n");
|
||||
exit(0);
|
||||
}
|
||||
qemu_announce_self();
|
||||
DPRINTF("successfully loaded vm state\n");
|
||||
|
||||
if (autostart)
|
||||
vm_start();
|
||||
}
|
||||
|
||||
int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||
{
|
||||
MigrationState *s = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue