From: Jean Guyader Date: Sun, 30 Aug 2009 06:01:54 +0000 (+0100) Subject: Add VmRebooted state X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=72ec6474b5f11c81486568bda1013432c5c8d714;p=xenclient%2Ftoolstack.git Add VmRebooted state --- diff --git a/xenvm/vmstate.ml b/xenvm/vmstate.ml index 753d538..a370f9d 100644 --- a/xenvm/vmstate.ml +++ b/xenvm/vmstate.ml @@ -20,7 +20,7 @@ open Vmconfig type vmlifestate = | VmCreated | VmShutdown | VmShutdowning - | VmRebooting + | VmRebooted | VmRebooting | VmPaused | VmSuspending | VmSuspended | VmRestoring | VmRunning @@ -30,6 +30,7 @@ let string_of_vmlifestate state = | VmShutdown -> "shutdown" | VmShutdowning -> "shutdowning" | VmRebooting -> "rebooting" + | VmRebooted -> "rebooted" | VmPaused -> "paused" | VmSuspending -> "suspending" | VmSuspended -> "suspended" | VmRestoring -> "restoring" diff --git a/xenvm/xenvm.ml b/xenvm/xenvm.ml index 9cb620f..6ea4473 100644 --- a/xenvm/xenvm.ml +++ b/xenvm/xenvm.ml @@ -261,7 +261,9 @@ let monitor_vm state = state.vm_cfg.on_crash | Xal.Vanished -> ActionPreserve | Xal.Halted -> state.vm_cfg.on_halt - | Xal.Rebooted -> state.vm_cfg.on_restart + | Xal.Rebooted -> + Vmact.change_vmstate state VmRebooted; + state.vm_cfg.on_restart | Xal.Suspended -> state.vm_on_suspend_action | Xal.Shutdown i -> state.vm_cfg.on_halt in