@@ -121,7 +121,7 @@
{ 'enum': 'RunState',
'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
- 'running', 'save-vm', 'shutdown', 'watchdog' ] }
+ 'running', 'save-vm', 'shutdown', 'watchdog', 'premigrate' ] }
##
# @StatusInfo:
@@ -351,8 +351,11 @@ static const RunStateTransition runstate_transitions_def[] = {
{ RUN_STATE_PRELAUNCH, RUN_STATE_RUNNING },
{ RUN_STATE_PRELAUNCH, RUN_STATE_FINISH_MIGRATE },
+ { RUN_STATE_PRELAUNCH, RUN_STATE_PREMIGRATE },
{ RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
+ { RUN_STATE_PREMIGRATE, RUN_STATE_INMIGRATE },
+
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_POSTMIGRATE },
@@ -2975,6 +2978,7 @@ int main(int argc, char **argv, char **envp)
break;
case QEMU_OPTION_incoming:
incoming = optarg;
+ runstate_set(RUN_STATE_PREMIGRATE);
break;
case QEMU_OPTION_nodefaults:
default_serial = 0;
This new state will be used by Xen functions to know QEMU will wait for a migration. This is important to know for memory related function because the memory is already allocated and reallocated them will not works. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- qapi-schema.json | 2 +- vl.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-)