# HG changeset patch # User David Scott # Date 1269955331 -3600 # Node ID 419d6473c6afec9cf87b2d8554ef5fb641294026 # Parent c41d0a69a0603cf6a2bfba50bca0e0ca98454130 CA-39435: when no suspend SR is available, use the same error message in VM.checkpoint that we do in VM.suspend (VM_NO_SUSPEND_SR). Signed-off-by: David Scott diff -r c41d0a69a060 -r 419d6473c6af ocaml/xapi/xapi_vm_snapshot.ml --- a/ocaml/xapi/xapi_vm_snapshot.ml Tue Mar 30 11:34:27 2010 +0100 +++ b/ocaml/xapi/xapi_vm_snapshot.ml Tue Mar 30 14:22:11 2010 +0100 @@ -189,6 +189,9 @@ | Api_errors.Server_error("SR_BACKEND_FAILURE_44", _) as e -> error "Not enough space to create the suspend image"; raise e + | Api_errors.Server_error(code, _) as e when code = Api_errors.vm_no_suspend_sr -> + error "No suspend SR available for this VM"; + raise e | _ -> raise (Api_errors.Server_error (Api_errors.vm_checkpoint_suspend_failed, [Ref.string_of vm])) end;