runstate: Allow to transition from paused to postmigrate
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 13 Oct 2011 17:39:59 +0000 (14:39 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 19 Oct 2011 12:48:57 +0000 (10:48 -0200)
The user may already have paused the VM before starting the
migration process. If s/he does that, then the state will be
'paused' when we finish the migration process. In that case
we want to transition from 'paused' to 'postmigrate' as the
latter is now the real reason why the VM is stopped.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
vl.c

diff --git a/vl.c b/vl.c
index 2a634a7ce69092c467c7a79626e950c74d7a1d05..3e5fdf540e7715120407c15362a0f1e6e73628a9 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -341,6 +341,7 @@ static const RunStateTransition runstate_transitions_def[] = {
     { RUN_STATE_IO_ERROR, RUN_STATE_RUNNING },
 
     { RUN_STATE_PAUSED, RUN_STATE_RUNNING },
+    { RUN_STATE_PAUSED, RUN_STATE_POSTMIGRATE },
 
     { RUN_STATE_POSTMIGRATE, RUN_STATE_RUNNING },