diff --git a/share/etc/oned.conf b/share/etc/oned.conf index fb6afcc5e6..a0acdd2e30 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -281,6 +281,7 @@ TM_MAD = [ # - SHUTDOWN, after the VM is shutdown # - STOP, after the VM is stopped (including VM image transfers) # - DONE, after the VM is deleted or shutdown +# - FAILED, when the VM enters the failed state # command : path can be absolute or relative to $ONE_LOCATION/share/hooks # case of self-contained installation or relative to # /usr/share/one/hooks in case of system-wide installation @@ -349,4 +350,3 @@ VM_HOOK = [ #AUTH_MAD = [ # executable = "one_auth_mad" ] - diff --git a/src/cli/oneimage b/src/cli/oneimage index c1a7564fb0..abb6305d7a 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -250,7 +250,7 @@ Commands: user --> Images of the user identified by the username * top (Lists Images continuously) - onevm top + oneimage top * show (Gets information about an specific Image) oneimage show diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc index 2af68f64ca..19060e7140 100644 --- a/src/vm/VirtualMachinePool.cc +++ b/src/vm/VirtualMachinePool.cc @@ -133,6 +133,16 @@ VirtualMachinePool::VirtualMachinePool(SqlDB * db, state_hook = true; } + else if ( on == "FAILED" ) + { + VirtualMachineStateHook * hook; + + hook = new VirtualMachineStateHook(name, cmd, arg, remote, + VirtualMachine::LCM_INIT, VirtualMachine::FAILED); + add_hook(hook); + + state_hook = true; + } else { ostringstream oss;