On 16/08/2018 09:22, Zhoujian (jay) wrote: > Could we add the check !runstate_check(RUN_STATE_FINISH_MIGRATE) before > setting > to RUN_STATE_PRELAUNCH, just like !runstate_check(RUN_STATE_RUNNING) and > !runstate_check(RUN_STATE_INMIGRATE) did? But I'm not sure whether this will > cause any side effect.
I think there is a bigger problem to fix before. global_state_store sees RUNNING, not PRELAUNCH; the VM is migrated with state that is already reset, but the state on the destination is RUNNING and the VM restarts running on the destination. Likewise, if migration fails the VM is resumed on the source because s->vm_was_running is true. David, Juan, do you have any ideas here? Paolo