diff --git a/ocaml/xapi/xapi_vm_snapshot.ml b/ocaml/xapi/xapi_vm_snapshot.ml index 9790d2725f2..8e0d20e011e 100644 --- a/ocaml/xapi/xapi_vm_snapshot.ml +++ b/ocaml/xapi/xapi_vm_snapshot.ml @@ -73,7 +73,15 @@ let compare_snapid_chunks s1 s2 = let checkpoint ~__context ~vm ~new_name = Xapi_vmss.show_task_in_xencenter ~__context ~vm ; let power_state = Db.VM.get_power_state ~__context ~self:vm in + let vtpms = Db.VM.get_VTPMs ~__context ~self:vm in let snapshot_info = ref [] in + ( match (power_state, vtpms) with + | `Running, _ :: _ -> + let message = "VM.checkpoint of running VM with VTPM" in + Helpers.maybe_raise_vtpm_unimplemented __FUNCTION__ message + | _ -> + () + ) ; (* live-suspend the VM if the VM is running *) ( if power_state = `Running then try diff --git a/quality-gate.sh b/quality-gate.sh index 4680156e4a7..4395123e58a 100755 --- a/quality-gate.sh +++ b/quality-gate.sh @@ -58,7 +58,7 @@ structural-equality () { } vtpm-unimplemented () { - N=6 + N=7 VTPM=$(git grep -r --count 'maybe_raise_vtpm_unimplemented' -- **/*.ml | cut -d ':' -f 2 | paste -sd+ - | bc) if [ "$VTPM" -eq "$N" ]; then echo "OK found $VTPM usages of vtpm unimplemented errors"