* [PATCH] savevm: check for incoming-state in savevm
@ 2021-02-02 11:41 lichun
0 siblings, 0 replies; only message in thread
From: lichun @ 2021-02-02 11:41 UTC (permalink / raw)
To: quintela, dgilbert; +Cc: lichun, qemu-devel
Running #qemu-system-i386 test.img -monitor stdio -incoming tcp:0.0.0.0:1234
(qemu) savevm
we get:
before the patch:
bdrv_co_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed.
Aborted
after:
Error: Guest is waiting for an incoming migration
Signed-off-by: lichun <lichun@ruijie.com.cn>
---
migration/savevm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index 4f3b69e..84e76e4 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1522,6 +1522,11 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
return -EINVAL;
}
+ if (runstate_check(RUN_STATE_INMIGRATE)) {
+ error_setg(errp, "Guest is waiting for an incoming migration");
+ return -EINVAL;
+ }
+
if (migrate_use_block()) {
error_setg(errp, "Block migration and snapshots are incompatible");
return -EINVAL;
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-02 3:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02 11:41 [PATCH] savevm: check for incoming-state in savevm lichun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).