mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
migration: Add yank feature
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub <lukasstraub2@web.de> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <484c6a14cc2506bebedd5a237259b91363ff8f88.1609167865.git.lukasstraub2@web.de> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
8ee4480692
commit
b5eea99ec2
5 changed files with 57 additions and 0 deletions
|
@ -62,6 +62,7 @@
|
|||
#include "migration/colo.h"
|
||||
#include "qemu/bitmap.h"
|
||||
#include "net/announce.h"
|
||||
#include "qemu/yank.h"
|
||||
|
||||
const unsigned int postcopy_ram_discard_version;
|
||||
|
||||
|
@ -3006,6 +3007,10 @@ int load_snapshot(const char *name, Error **errp)
|
|||
qemu_system_reset(SHUTDOWN_CAUSE_NONE);
|
||||
mis->from_src_file = f;
|
||||
|
||||
if (!yank_register_instance(MIGRATION_YANK_INSTANCE, errp)) {
|
||||
ret = -EINVAL;
|
||||
goto err_drain;
|
||||
}
|
||||
aio_context_acquire(aio_context);
|
||||
ret = qemu_loadvm_state(f);
|
||||
migration_incoming_state_destroy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue