COLO will stop the VM during each checkpoint on either PVM or SVM.
Accidentally resuming the VM during the window might be fatal because it
may cause the RAM and devices state to misalign, corrupting the checkpoint.
Hence forbid VM resume during the process.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
monitor/qmp-cmds.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 1ca44fbd72..0c409c27dc 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -84,6 +84,9 @@ void qmp_cont(Error **errp)
} else if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
error_setg(errp, "Migration is not finalized yet");
return;
+ } else if (runstate_check(RUN_STATE_COLO)) {
+ error_setg(errp, "COLO checkpoint in progress");
+ return;
}
for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {
--
2.50.1