Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ocaml/xapi-idl/xen/xenops_types.ml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ module Vm = struct

type id = string [@@deriving rpcty, sexp]

type action = Coredump | Shutdown | Start | Pause | Softreboot
type action = Coredump | Shutdown | Start | Pause | Softreboot | Recover
[@@deriving rpcty, sexp]

type scheduler_params = {
Expand Down
8 changes: 7 additions & 1 deletion ocaml/xenopsd/lib/xenops_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3240,7 +3240,7 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
vm.Vm.on_crash
| Some Needs_suspend ->
warn "VM %s has unexpectedly suspended" id ;
[Vm.Shutdown]
[Vm.Recover]
| Some Needs_softreset ->
vm.Vm.on_softreboot
| None ->
Expand All @@ -3252,6 +3252,12 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
[]
| Vm.Shutdown ->
[VM_shutdown (id, None)]
| Vm.Recover ->
[VM_shutdown (id, None)]
(* This could instead try to recover the device model and
fast-resume the VM. Recovery of the device model is the^
difficult part. As part of it, qemu must be unpaused.
*)
| Vm.Start ->
let delay =
if run_time < B.VM.minimum_reboot_delay then (
Expand Down
Loading