* Juan Quintela (quint...@redhat.com) wrote: > If we have a paused guest, it can't unplug the network VF device, so > we wait there forever. Just change the code to give one error on that > case. > > Signed-off-by: Juan Quintela <quint...@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > migration/migration.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/migration/migration.c b/migration/migration.c > index 87a9b59f83..d44fc880f9 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -3548,6 +3548,18 @@ static void *migration_thread(void *opaque) > qemu_savevm_state_setup(s->to_dst_file); > > if (qemu_savevm_state_guest_unplug_pending()) { > + /* if guest is paused, it can send back the wait event */ > + if (!runstate_is_running()) { > + Error *local_err = NULL; > + > + error_setg(&local_err, "migration: network failover and " > + "guest is paused'"); > + migrate_set_error(s, local_err); > + error_free(local_err); > + migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, > + MIGRATION_STATUS_FAILED); > + goto end; > + } > migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, > MIGRATION_STATUS_WAIT_UNPLUG); > > @@ -3597,6 +3609,7 @@ static void *migration_thread(void *opaque) > } > > trace_migration_thread_after_loop(); > +end: > migration_iteration_finish(s); > object_unref(OBJECT(s)); > rcu_unregister_thread(); > -- > 2.26.2 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK