]> xenbits.xen.org Git - xenclient/toolstack.git/commitdiff
Add VmRebooted state
authorJean Guyader <jean.guyader@eu.citrix.com>
Sun, 30 Aug 2009 06:01:54 +0000 (07:01 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Sun, 30 Aug 2009 06:01:54 +0000 (07:01 +0100)
xenvm/vmstate.ml
xenvm/xenvm.ml

index 753d53800ccd9e3f2fa4168b1a8389d2c9b1fe95..a370f9dd03c322ae9af8bbec9cbd49004e7eb82e 100644 (file)
@@ -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"
index 9cb620ffdfd43604837348b34e56ed3fbb7e3780..6ea4473aceac80586221a3739fea2241d6169f6f 100644 (file)
@@ -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