@@ -100,7 +100,6 @@ static void process_incoming_migration_co(void *opaque)
fprintf(stderr, "load of migration failed\n");
exit(0);
}
- qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
bdrv_clear_incoming_migration_all();
@@ -1681,11 +1681,15 @@ void vm_state_notify(int running, RunState state)
void vm_start(void)
{
if (!runstate_is_running()) {
+ RunState prev_run_state = current_run_state;
cpu_enable_ticks();
runstate_set(RUN_STATE_RUNNING);
vm_state_notify(1, RUN_STATE_RUNNING);
resume_all_vcpus();
monitor_protocol_event(QEVENT_RESUME, NULL);
+ if (prev_run_state == RUN_STATE_PRELAUNCH_MIGRATE) {
+ qemu_announce_self();
+ }
}
}
Since we may want to send garp by guest if guest driver is capable of it. We need trigger this event after vm is started. So this patch do this when the state is changing from RUN_STATE_PRELAUNCH_MIGRATE to RUN_STATE_RUNINNG. Signed-off-by: Jason Wang <jasowang@redhat.com> --- migration.c | 1 - vl.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletions(-)