Commit 8118f09 add vm description to the end of migration
stream, but in COLO mode, we use the migration channel to send
control code, so the additional info been send will cause slave
receive unexpect control msg, so just do not send vm description
when migrate under COLO mode.

Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com>
Signed-off-by: Yang Hongyang <yan...@cn.fujitsu.com>
---
 savevm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/savevm.c b/savevm.c
index 8040766..7d79a4b 100644
--- a/savevm.c
+++ b/savevm.c
@@ -782,9 +782,11 @@ void qemu_savevm_state_complete(QEMUFile *f)
     qjson_finish(vmdesc);
     vmdesc_len = strlen(qjson_get_str(vmdesc));
 
-    qemu_put_byte(f, QEMU_VM_VMDESCRIPTION);
-    qemu_put_be32(f, vmdesc_len);
-    qemu_put_buffer(f, (uint8_t *)qjson_get_str(vmdesc), vmdesc_len);
+    if (!migrate_enable_colo()) {
+        qemu_put_byte(f, QEMU_VM_VMDESCRIPTION);
+        qemu_put_be32(f, vmdesc_len);
+        qemu_put_buffer(f, (uint8_t *)qjson_get_str(vmdesc), vmdesc_len);
+    }
     object_unref(OBJECT(vmdesc));
 
     qemu_fflush(f);
-- 
1.7.12.4



Reply via email to