File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -793,9 +793,11 @@ module Forward = functor(Local: Custom_actions.CUSTOM_ACTIONS) -> struct
793793
794794 (* Read resisdent-on field from vm to determine who to forward to *)
795795 let forward_vm_op ~local_fn ~__context ~vm op =
796- Xapi_vm_lifecycle. assert_power_state_in ~__context ~self: vm
797- ~allowed: [`Running ; `Paused ];
798- do_op_on ~local_fn ~__context ~host: (Db.VM. get_resident_on ~__context ~self: vm) op
796+ let power_state = Db.VM. get_power_state ~__context ~self: vm in
797+ if List. mem power_state [`Running ; `Paused ] then
798+ do_op_on ~local_fn ~__context ~host: (Db.VM. get_resident_on ~__context ~self: vm) op
799+ else
800+ local_fn ~__context
799801
800802 (* Clear scheduled_to_be_resident_on for a VM and all its vGPUs. *)
801803 let clear_scheduled_to_be_resident_on ~__context ~vm =
You can’t perform that action at this time.
0 commit comments