* [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test
@ 2025-12-30 14:05 Lukas Straub
2025-12-30 14:05 ` [PATCH 1/3] multifd: Add colo support Lukas Straub
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Lukas Straub @ 2025-12-30 14:05 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Xu, Fabiano Rosas, Laurent Vivier, Paolo Bonzini,
Zhang Chen, Lukas Straub, Juan Quintela
Hello everyone,
This adds COLO multifd support and migration unit tests for COLO migration
and failover.
Regards,
Lukas
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
Lukas Straub (3):
multifd: Add colo support
migration-test: Add -snapshot option for COLO
migration-test: Add COLO migration unit test
migration/meson.build | 2 +-
migration/multifd-colo.c | 57 ++++++++++++++++++
migration/multifd-colo.h | 26 +++++++++
migration/multifd.c | 14 ++++-
tests/qtest/meson.build | 7 ++-
tests/qtest/migration-test.c | 1 +
tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++
tests/qtest/migration/framework.c | 69 +++++++++++++++++++++-
tests/qtest/migration/framework.h | 10 ++++
9 files changed, 294 insertions(+), 7 deletions(-)
---
base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591
change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46
Best regards,
--
Lukas Straub <lukasstraub2@web.de>
^ permalink raw reply [flat|nested] 17+ messages in thread* [PATCH 1/3] multifd: Add colo support 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub @ 2025-12-30 14:05 ` Lukas Straub 2026-01-06 19:54 ` Peter Xu 2025-12-30 14:05 ` [PATCH 2/3] migration-test: Add -snapshot option for COLO Lukas Straub ` (3 subsequent siblings) 4 siblings, 1 reply; 17+ messages in thread From: Lukas Straub @ 2025-12-30 14:05 UTC (permalink / raw) To: qemu-devel Cc: Peter Xu, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Lukas Straub, Juan Quintela Like in the normal ram_load() path, put the received pages into the colo cache and mark the pages in the bitmap so that they will be flushed to the guest later. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- migration/meson.build | 2 +- migration/multifd-colo.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ migration/multifd-colo.h | 26 ++++++++++++++++++++++ migration/multifd.c | 14 +++++++++--- 4 files changed, 95 insertions(+), 4 deletions(-) diff --git a/migration/meson.build b/migration/meson.build index 16909d54c5110fc5d8187fd3a68c4a5b08b59ea7..1e59fe4f1f0bbfffed90df38e8f39fa87bceb9b9 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -40,7 +40,7 @@ system_ss.add(files( ), gnutls, zlib) if get_option('replication').allowed() - system_ss.add(files('colo-failover.c', 'colo.c')) + system_ss.add(files('colo-failover.c', 'colo.c', 'multifd-colo.c')) else system_ss.add(files('colo-stubs.c')) endif diff --git a/migration/multifd-colo.c b/migration/multifd-colo.c new file mode 100644 index 0000000000000000000000000000000000000000..05a81e57b2bda517cbc0844b4f03dc78453f6af8 --- /dev/null +++ b/migration/multifd-colo.c @@ -0,0 +1,57 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * multifd colo implementation + * + * Copyright (c) Lukas Straub <lukasstraub2@web.de> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "exec/target_page.h" +#include "qemu/error-report.h" +#include "qapi/error.h" +#include "ram.h" +#include "multifd.h" +#include "options.h" +#include "io/channel-socket.h" +#include "migration/colo.h" +#include "multifd-colo.h" +#include "system/ramblock.h" + +void multifd_colo_prepare_recv(MultiFDRecvParams *p) +{ + if (!migrate_colo()) { + return; + } + + assert(p->block->colo_cache); + + /* + * While we're still in precopy state (not yet in colo state), we copy + * received pages to both guest and cache. No need to set dirty bits, + * since guest and cache memory are in sync. + */ + if (migration_incoming_in_colo_state()) { + colo_record_bitmap(p->block, p->normal, p->normal_num); + } + p->host = p->block->colo_cache; +} + +void multifd_colo_process_recv(MultiFDRecvParams *p) +{ + if (!migrate_colo()) { + return; + } + + if (!migration_incoming_in_colo_state()) { + for (int i = 0; i < p->normal_num; i++) { + void *guest = p->block->host + p->normal[i]; + void *cache = p->host + p->normal[i]; + memcpy(guest, cache, multifd_ram_page_size()); + } + } + p->host = p->block->host; +} diff --git a/migration/multifd-colo.h b/migration/multifd-colo.h new file mode 100644 index 0000000000000000000000000000000000000000..82eaf3f48c47de2f090f9de52f9d57a337d4754a --- /dev/null +++ b/migration/multifd-colo.h @@ -0,0 +1,26 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * multifd colo header + * + * Copyright (c) Lukas Straub <lukasstraub2@web.de> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef QEMU_MIGRATION_MULTIFD_COLO_H +#define QEMU_MIGRATION_MULTIFD_COLO_H + +#ifdef CONFIG_REPLICATION + +void multifd_colo_prepare_recv(MultiFDRecvParams *p); +void multifd_colo_process_recv(MultiFDRecvParams *p); + +#else + +static inline void multifd_colo_prepare_recv(MultiFDRecvParams *p) {} +static inline void multifd_colo_process_recv(MultiFDRecvParams *p) {} + +#endif +#endif diff --git a/migration/multifd.c b/migration/multifd.c index bf6da85af8a1e207235ce06b8dbace33beded6d8..9006f73cc5b52e8814da107c0b5c867ee6d03a95 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -29,6 +29,7 @@ #include "qemu-file.h" #include "trace.h" #include "multifd.h" +#include "multifd-colo.h" #include "threadinfo.h" #include "options.h" #include "qemu/yank.h" @@ -1398,11 +1399,18 @@ static void *multifd_recv_thread(void *opaque) if (is_device_state) { assert(use_packets); ret = multifd_device_state_recv(p, &local_err); + if (ret != 0) { + break; + } } else { + multifd_colo_prepare_recv(p); + ret = multifd_recv_state->ops->recv(p, &local_err); - } - if (ret != 0) { - break; + if (ret != 0) { + break; + } + + multifd_colo_process_recv(p); } } else if (is_device_state) { error_setg(&local_err, -- 2.39.5 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] multifd: Add colo support 2025-12-30 14:05 ` [PATCH 1/3] multifd: Add colo support Lukas Straub @ 2026-01-06 19:54 ` Peter Xu 2026-01-15 22:43 ` Lukas Straub 0 siblings, 1 reply; 17+ messages in thread From: Peter Xu @ 2026-01-06 19:54 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Juan Quintela On Tue, Dec 30, 2025 at 03:05:44PM +0100, Lukas Straub wrote: > Like in the normal ram_load() path, put the received pages into the > colo cache and mark the pages in the bitmap so that they will be > flushed to the guest later. > > Signed-off-by: Juan Quintela <quintela@redhat.com> > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > --- > migration/meson.build | 2 +- > migration/multifd-colo.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ > migration/multifd-colo.h | 26 ++++++++++++++++++++++ > migration/multifd.c | 14 +++++++++--- > 4 files changed, 95 insertions(+), 4 deletions(-) > > diff --git a/migration/meson.build b/migration/meson.build > index 16909d54c5110fc5d8187fd3a68c4a5b08b59ea7..1e59fe4f1f0bbfffed90df38e8f39fa87bceb9b9 100644 > --- a/migration/meson.build > +++ b/migration/meson.build > @@ -40,7 +40,7 @@ system_ss.add(files( > ), gnutls, zlib) > > if get_option('replication').allowed() > - system_ss.add(files('colo-failover.c', 'colo.c')) > + system_ss.add(files('colo-failover.c', 'colo.c', 'multifd-colo.c')) > else > system_ss.add(files('colo-stubs.c')) > endif > diff --git a/migration/multifd-colo.c b/migration/multifd-colo.c > new file mode 100644 > index 0000000000000000000000000000000000000000..05a81e57b2bda517cbc0844b4f03dc78453f6af8 > --- /dev/null > +++ b/migration/multifd-colo.c > @@ -0,0 +1,57 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0-or-later > + * > + * multifd colo implementation > + * > + * Copyright (c) Lukas Straub <lukasstraub2@web.de> > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + */ > + > +#include "qemu/osdep.h" > +#include "exec/target_page.h" > +#include "qemu/error-report.h" > +#include "qapi/error.h" > +#include "ram.h" > +#include "multifd.h" > +#include "options.h" > +#include "io/channel-socket.h" > +#include "migration/colo.h" > +#include "multifd-colo.h" > +#include "system/ramblock.h" > + > +void multifd_colo_prepare_recv(MultiFDRecvParams *p) > +{ > + if (!migrate_colo()) { We should avoid invoking *_colo_*() function, then check COLO enabled or not only reaching here. Instead, we'd check "migrate_colo()" first and invoke it only if it's enabled. > + return; > + } > + > + assert(p->block->colo_cache); > + > + /* > + * While we're still in precopy state (not yet in colo state), we copy > + * received pages to both guest and cache. No need to set dirty bits, > + * since guest and cache memory are in sync. > + */ > + if (migration_incoming_in_colo_state()) { > + colo_record_bitmap(p->block, p->normal, p->normal_num); > + } > + p->host = p->block->colo_cache; May want to update the comment of "host" then, because it isn't always pointing to ramblock's buffer now when COLO is enabled. > +} > + > +void multifd_colo_process_recv(MultiFDRecvParams *p) > +{ > + if (!migrate_colo()) { Same here. > + return; > + } > + > + if (!migration_incoming_in_colo_state()) { > + for (int i = 0; i < p->normal_num; i++) { > + void *guest = p->block->host + p->normal[i]; > + void *cache = p->host + p->normal[i]; > + memcpy(guest, cache, multifd_ram_page_size()); > + } > + } > + p->host = p->block->host; > +} > diff --git a/migration/multifd-colo.h b/migration/multifd-colo.h > new file mode 100644 > index 0000000000000000000000000000000000000000..82eaf3f48c47de2f090f9de52f9d57a337d4754a > --- /dev/null > +++ b/migration/multifd-colo.h > @@ -0,0 +1,26 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0-or-later > + * > + * multifd colo header > + * > + * Copyright (c) Lukas Straub <lukasstraub2@web.de> > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + */ > + > +#ifndef QEMU_MIGRATION_MULTIFD_COLO_H > +#define QEMU_MIGRATION_MULTIFD_COLO_H > + > +#ifdef CONFIG_REPLICATION > + > +void multifd_colo_prepare_recv(MultiFDRecvParams *p); > +void multifd_colo_process_recv(MultiFDRecvParams *p); > + > +#else > + > +static inline void multifd_colo_prepare_recv(MultiFDRecvParams *p) {} > +static inline void multifd_colo_process_recv(MultiFDRecvParams *p) {} > + > +#endif > +#endif > diff --git a/migration/multifd.c b/migration/multifd.c > index bf6da85af8a1e207235ce06b8dbace33beded6d8..9006f73cc5b52e8814da107c0b5c867ee6d03a95 100644 > --- a/migration/multifd.c > +++ b/migration/multifd.c > @@ -29,6 +29,7 @@ > #include "qemu-file.h" > #include "trace.h" > #include "multifd.h" > +#include "multifd-colo.h" > #include "threadinfo.h" > #include "options.h" > #include "qemu/yank.h" > @@ -1398,11 +1399,18 @@ static void *multifd_recv_thread(void *opaque) > if (is_device_state) { > assert(use_packets); > ret = multifd_device_state_recv(p, &local_err); > + if (ret != 0) { > + break; > + } > } else { > + multifd_colo_prepare_recv(p); > + > ret = multifd_recv_state->ops->recv(p, &local_err); > - } > - if (ret != 0) { > - break; > + if (ret != 0) { > + break; > + } > + > + multifd_colo_process_recv(p); Personally I'd suggest we introduce multifd_ram_state_recv() and put everything there. Thanks, > } > } else if (is_device_state) { > error_setg(&local_err, > > -- > 2.39.5 > -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] multifd: Add colo support 2026-01-06 19:54 ` Peter Xu @ 2026-01-15 22:43 ` Lukas Straub 0 siblings, 0 replies; 17+ messages in thread From: Lukas Straub @ 2026-01-15 22:43 UTC (permalink / raw) To: Peter Xu Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Juan Quintela [-- Attachment #1: Type: text/plain, Size: 6311 bytes --] On Tue, 6 Jan 2026 14:54:55 -0500 Peter Xu <peterx@redhat.com> wrote: > On Tue, Dec 30, 2025 at 03:05:44PM +0100, Lukas Straub wrote: > > Like in the normal ram_load() path, put the received pages into the > > colo cache and mark the pages in the bitmap so that they will be > > flushed to the guest later. > > > > Signed-off-by: Juan Quintela <quintela@redhat.com> > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > --- > > migration/meson.build | 2 +- > > migration/multifd-colo.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ > > migration/multifd-colo.h | 26 ++++++++++++++++++++++ > > migration/multifd.c | 14 +++++++++--- > > 4 files changed, 95 insertions(+), 4 deletions(-) > > > > diff --git a/migration/meson.build b/migration/meson.build > > index 16909d54c5110fc5d8187fd3a68c4a5b08b59ea7..1e59fe4f1f0bbfffed90df38e8f39fa87bceb9b9 100644 > > --- a/migration/meson.build > > +++ b/migration/meson.build > > @@ -40,7 +40,7 @@ system_ss.add(files( > > ), gnutls, zlib) > > > > if get_option('replication').allowed() > > - system_ss.add(files('colo-failover.c', 'colo.c')) > > + system_ss.add(files('colo-failover.c', 'colo.c', 'multifd-colo.c')) > > else > > system_ss.add(files('colo-stubs.c')) > > endif > > diff --git a/migration/multifd-colo.c b/migration/multifd-colo.c > > new file mode 100644 > > index 0000000000000000000000000000000000000000..05a81e57b2bda517cbc0844b4f03dc78453f6af8 > > --- /dev/null > > +++ b/migration/multifd-colo.c > > @@ -0,0 +1,57 @@ > > +/* > > + * SPDX-License-Identifier: GPL-2.0-or-later > > + * > > + * multifd colo implementation > > + * > > + * Copyright (c) Lukas Straub <lukasstraub2@web.de> > > + * > > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > > + * See the COPYING file in the top-level directory. > > + */ > > + > > +#include "qemu/osdep.h" > > +#include "exec/target_page.h" > > +#include "qemu/error-report.h" > > +#include "qapi/error.h" > > +#include "ram.h" > > +#include "multifd.h" > > +#include "options.h" > > +#include "io/channel-socket.h" > > +#include "migration/colo.h" > > +#include "multifd-colo.h" > > +#include "system/ramblock.h" > > + > > +void multifd_colo_prepare_recv(MultiFDRecvParams *p) > > +{ > > + if (!migrate_colo()) { > > We should avoid invoking *_colo_*() function, then check COLO enabled or > not only reaching here. Instead, we'd check "migrate_colo()" first and > invoke it only if it's enabled. Okay, I will fix that in the next version. > > > + return; > > + } > > + > > + assert(p->block->colo_cache); > > + > > + /* > > + * While we're still in precopy state (not yet in colo state), we copy > > + * received pages to both guest and cache. No need to set dirty bits, > > + * since guest and cache memory are in sync. > > + */ > > + if (migration_incoming_in_colo_state()) { > > + colo_record_bitmap(p->block, p->normal, p->normal_num); > > + } > > + p->host = p->block->colo_cache; > > May want to update the comment of "host" then, because it isn't always > pointing to ramblock's buffer now when COLO is enabled. Will do. > > > +} > > + > > +void multifd_colo_process_recv(MultiFDRecvParams *p) > > +{ > > + if (!migrate_colo()) { > > Same here. > > > + return; > > + } > > + > > + if (!migration_incoming_in_colo_state()) { > > + for (int i = 0; i < p->normal_num; i++) { > > + void *guest = p->block->host + p->normal[i]; > > + void *cache = p->host + p->normal[i]; > > + memcpy(guest, cache, multifd_ram_page_size()); > > + } > > + } > > + p->host = p->block->host; > > +} > > diff --git a/migration/multifd-colo.h b/migration/multifd-colo.h > > new file mode 100644 > > index 0000000000000000000000000000000000000000..82eaf3f48c47de2f090f9de52f9d57a337d4754a > > --- /dev/null > > +++ b/migration/multifd-colo.h > > @@ -0,0 +1,26 @@ > > +/* > > + * SPDX-License-Identifier: GPL-2.0-or-later > > + * > > + * multifd colo header > > + * > > + * Copyright (c) Lukas Straub <lukasstraub2@web.de> > > + * > > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > > + * See the COPYING file in the top-level directory. > > + */ > > + > > +#ifndef QEMU_MIGRATION_MULTIFD_COLO_H > > +#define QEMU_MIGRATION_MULTIFD_COLO_H > > + > > +#ifdef CONFIG_REPLICATION > > + > > +void multifd_colo_prepare_recv(MultiFDRecvParams *p); > > +void multifd_colo_process_recv(MultiFDRecvParams *p); > > + > > +#else > > + > > +static inline void multifd_colo_prepare_recv(MultiFDRecvParams *p) {} > > +static inline void multifd_colo_process_recv(MultiFDRecvParams *p) {} > > + > > +#endif > > +#endif > > diff --git a/migration/multifd.c b/migration/multifd.c > > index bf6da85af8a1e207235ce06b8dbace33beded6d8..9006f73cc5b52e8814da107c0b5c867ee6d03a95 100644 > > --- a/migration/multifd.c > > +++ b/migration/multifd.c > > @@ -29,6 +29,7 @@ > > #include "qemu-file.h" > > #include "trace.h" > > #include "multifd.h" > > +#include "multifd-colo.h" > > #include "threadinfo.h" > > #include "options.h" > > #include "qemu/yank.h" > > @@ -1398,11 +1399,18 @@ static void *multifd_recv_thread(void *opaque) > > if (is_device_state) { > > assert(use_packets); > > ret = multifd_device_state_recv(p, &local_err); > > + if (ret != 0) { > > + break; > > + } > > } else { > > + multifd_colo_prepare_recv(p); > > + > > ret = multifd_recv_state->ops->recv(p, &local_err); > > - } > > - if (ret != 0) { > > - break; > > + if (ret != 0) { > > + break; > > + } > > + > > + multifd_colo_process_recv(p); > > Personally I'd suggest we introduce multifd_ram_state_recv() and put > everything there. Will do. > > Thanks, > > > } > > } else if (is_device_state) { > > error_setg(&local_err, > > > > -- > > 2.39.5 > > > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/3] migration-test: Add -snapshot option for COLO 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub 2025-12-30 14:05 ` [PATCH 1/3] multifd: Add colo support Lukas Straub @ 2025-12-30 14:05 ` Lukas Straub 2026-01-06 19:55 ` Peter Xu 2025-12-30 14:05 ` [PATCH 3/3] migration-test: Add COLO migration unit test Lukas Straub ` (2 subsequent siblings) 4 siblings, 1 reply; 17+ messages in thread From: Lukas Straub @ 2025-12-30 14:05 UTC (permalink / raw) To: qemu-devel Cc: Peter Xu, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Lukas Straub For the COLO test, both VMs will run in parallel. Thus both VMs want to open the image read/write at the same time. Using read-only=on is not possible here, because ide-hd does not support read-only backing image. And the image won't boot with ide-cd. As a workaround, use the '-snapshot' option where qemu will internally create a writable snapshut while leaving the real image read-only. Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- tests/qtest/migration/framework.c | 4 +++- tests/qtest/migration/framework.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index e35839c95f51d851a3fed8e8457ed2d7e927f59b..8c1fc6e009f16dc05a47e917167f62e0250ca992 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -322,7 +322,9 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) } arch_opts = g_strdup_printf( "-drive if=none,id=d0,file=%s,format=raw " - "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1", bootpath); + "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1 %s", + bootpath, + args->is_colo ? "-snapshot" : ""); start_address = X86_TEST_MEM_START; end_address = X86_TEST_MEM_END; } else if (g_str_equal(arch, "s390x")) { diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h index ed85ed502dd01aa809892b68d3934b5107bd3442..2ea13e7758697550b5531737e66d6d939dd800d1 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -134,6 +134,7 @@ typedef struct { bool suspend_me; /* enable OOB QMP capability */ bool oob; + bool is_colo; /* Do not connect to target monitor and qtest sockets in qtest_init */ bool defer_target_connect; -- 2.39.5 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/3] migration-test: Add -snapshot option for COLO 2025-12-30 14:05 ` [PATCH 2/3] migration-test: Add -snapshot option for COLO Lukas Straub @ 2026-01-06 19:55 ` Peter Xu 2026-01-15 22:37 ` Lukas Straub 0 siblings, 1 reply; 17+ messages in thread From: Peter Xu @ 2026-01-06 19:55 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen On Tue, Dec 30, 2025 at 03:05:45PM +0100, Lukas Straub wrote: > For the COLO test, both VMs will run in parallel. Thus both VMs want to open > the image read/write at the same time. Using read-only=on is not possible here, > because ide-hd does not support read-only backing image. And the image > won't boot with ide-cd. > > As a workaround, use the '-snapshot' option where qemu will internally create > a writable snapshut while leaving the real image read-only. > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > --- > tests/qtest/migration/framework.c | 4 +++- > tests/qtest/migration/framework.h | 1 + > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c > index e35839c95f51d851a3fed8e8457ed2d7e927f59b..8c1fc6e009f16dc05a47e917167f62e0250ca992 100644 > --- a/tests/qtest/migration/framework.c > +++ b/tests/qtest/migration/framework.c > @@ -322,7 +322,9 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) > } > arch_opts = g_strdup_printf( > "-drive if=none,id=d0,file=%s,format=raw " > - "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1", bootpath); > + "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1 %s", > + bootpath, > + args->is_colo ? "-snapshot" : ""); We can use opts_source / opts_target for this. > start_address = X86_TEST_MEM_START; > end_address = X86_TEST_MEM_END; > } else if (g_str_equal(arch, "s390x")) { > diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h > index ed85ed502dd01aa809892b68d3934b5107bd3442..2ea13e7758697550b5531737e66d6d939dd800d1 100644 > --- a/tests/qtest/migration/framework.h > +++ b/tests/qtest/migration/framework.h > @@ -134,6 +134,7 @@ typedef struct { > bool suspend_me; > /* enable OOB QMP capability */ > bool oob; > + bool is_colo; > > /* Do not connect to target monitor and qtest sockets in qtest_init */ > bool defer_target_connect; > > -- > 2.39.5 > -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/3] migration-test: Add -snapshot option for COLO 2026-01-06 19:55 ` Peter Xu @ 2026-01-15 22:37 ` Lukas Straub 0 siblings, 0 replies; 17+ messages in thread From: Lukas Straub @ 2026-01-15 22:37 UTC (permalink / raw) To: Peter Xu Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen [-- Attachment #1: Type: text/plain, Size: 2376 bytes --] On Tue, 6 Jan 2026 14:55:34 -0500 Peter Xu <peterx@redhat.com> wrote: > On Tue, Dec 30, 2025 at 03:05:45PM +0100, Lukas Straub wrote: > > For the COLO test, both VMs will run in parallel. Thus both VMs want to open > > the image read/write at the same time. Using read-only=on is not possible here, > > because ide-hd does not support read-only backing image. And the image > > won't boot with ide-cd. > > > > As a workaround, use the '-snapshot' option where qemu will internally create > > a writable snapshut while leaving the real image read-only. > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > --- > > tests/qtest/migration/framework.c | 4 +++- > > tests/qtest/migration/framework.h | 1 + > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c > > index e35839c95f51d851a3fed8e8457ed2d7e927f59b..8c1fc6e009f16dc05a47e917167f62e0250ca992 100644 > > --- a/tests/qtest/migration/framework.c > > +++ b/tests/qtest/migration/framework.c > > @@ -322,7 +322,9 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) > > } > > arch_opts = g_strdup_printf( > > "-drive if=none,id=d0,file=%s,format=raw " > > - "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1", bootpath); > > + "-device ide-hd,drive=d0,secs=1,cyls=1,heads=1 %s", > > + bootpath, > > + args->is_colo ? "-snapshot" : ""); > > We can use opts_source / opts_target for this. Okay, I will fix this in the next version. > > > start_address = X86_TEST_MEM_START; > > end_address = X86_TEST_MEM_END; > > } else if (g_str_equal(arch, "s390x")) { > > diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h > > index ed85ed502dd01aa809892b68d3934b5107bd3442..2ea13e7758697550b5531737e66d6d939dd800d1 100644 > > --- a/tests/qtest/migration/framework.h > > +++ b/tests/qtest/migration/framework.h > > @@ -134,6 +134,7 @@ typedef struct { > > bool suspend_me; > > /* enable OOB QMP capability */ > > bool oob; > > + bool is_colo; > > > > /* Do not connect to target monitor and qtest sockets in qtest_init */ > > bool defer_target_connect; > > > > -- > > 2.39.5 > > > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/3] migration-test: Add COLO migration unit test 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub 2025-12-30 14:05 ` [PATCH 1/3] multifd: Add colo support Lukas Straub 2025-12-30 14:05 ` [PATCH 2/3] migration-test: Add -snapshot option for COLO Lukas Straub @ 2025-12-30 14:05 ` Lukas Straub 2026-01-06 20:03 ` Peter Xu 2025-12-30 15:02 ` [PATCH 0/3] migration: Add COLO multifd support and " Peter Xu 2026-01-06 20:05 ` Peter Xu 4 siblings, 1 reply; 17+ messages in thread From: Lukas Straub @ 2025-12-30 14:05 UTC (permalink / raw) To: qemu-devel Cc: Peter Xu, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Lukas Straub Add a COLO migration test for COLO migration and failover. COLO does not support q35 machine at this time. Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- tests/qtest/meson.build | 7 ++- tests/qtest/migration-test.c | 1 + tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ tests/qtest/migration/framework.c | 65 ++++++++++++++++++++- tests/qtest/migration/framework.h | 9 +++ 5 files changed, 195 insertions(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 08fba9695b9813dc0b6b6554ef8c40c9615918fa..e68ce6c193ce2a2c244fa072ebb24738380f844a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -366,6 +366,11 @@ if gnutls.found() endif endif +migration_colo_files = [] +if get_option('replication').allowed() + migration_colo_files = [files('migration/colo-tests.c')] +endif + qtests = { 'aspeed_hace-test': files('aspeed-hace-utils.c', 'aspeed_hace-test.c'), 'aspeed_smc-test': files('aspeed-smc-utils.c', 'aspeed_smc-test.c'), @@ -377,7 +382,7 @@ qtests = { 'migration/migration-util.c') + dbus_vmstate1, 'erst-test': files('erst-test.c'), 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], - 'migration-test': test_migration_files + migration_tls_files, + 'migration-test': test_migration_files + migration_tls_files + migration_colo_files, 'pxe-test': files('boot-sector.c'), 'pnv-xive2-test': files('pnv-xive2-common.c', 'pnv-xive2-flush-sync.c', 'pnv-xive2-nvpg_bar.c'), diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 08936871741535c926eeac40a7d7c3f461c72fd0..e582f05c7dc2673dbd05a936df8feb6c964b5bbc 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -55,6 +55,7 @@ int main(int argc, char **argv) migration_test_add_precopy(env); migration_test_add_cpr(env); migration_test_add_misc(env); + migration_test_add_colo(env); ret = g_test_run(); diff --git a/tests/qtest/migration/colo-tests.c b/tests/qtest/migration/colo-tests.c new file mode 100644 index 0000000000000000000000000000000000000000..adec41c1c0473539d02e488b1d0baa663d7743b1 --- /dev/null +++ b/tests/qtest/migration/colo-tests.c @@ -0,0 +1,115 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * QTest testcases for COLO migration + * + * Copyright (c) 2025 Lukas Straub <lukasstraub2@web.de> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu/osdep.h" +#include "libqtest.h" +#include "migration/framework.h" +#include "migration/migration-qmp.h" +#include "migration/migration-util.h" +#include "qemu/module.h" + +static void test_colo_plain_primary_failover(char *name, MigrateCommon *args) +{ + args->listen_uri = "tcp:127.0.0.1:0"; + args->colo_primary_failover = true; + + test_colo_common(args); +} + +static void test_colo_plain_secondary_failover(char *name, MigrateCommon *args) +{ + args->listen_uri = "tcp:127.0.0.1:0"; + + test_colo_common(args); +} + +static void *hook_start_multifd(QTestState *from, QTestState *to) +{ + return migrate_hook_start_precopy_tcp_multifd_common(from, to, "none"); +} + +static void test_colo_multifd_primary_failover(char *name, MigrateCommon *args) +{ + args->listen_uri = "defer"; + args->start_hook = hook_start_multifd; + args->colo_primary_failover = true; + args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true; + + test_colo_common(args); +} + +static void test_colo_multifd_secondary_failover(char *name, + MigrateCommon *args) +{ + args->listen_uri = "defer"; + args->start_hook = hook_start_multifd; + args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true; + + test_colo_common(args); +} + +static void test_colo_plain_primary_failover_checkpoint(char *name, + MigrateCommon *args) +{ + args->colo_failover_during_checkpoint = true; + test_colo_plain_primary_failover(name, args); +} + +static void test_colo_plain_secondary_failover_checkpoint(char *name, + MigrateCommon *args) +{ + args->colo_failover_during_checkpoint = true; + test_colo_plain_secondary_failover(name, args); +} + +static void test_colo_multifd_primary_failover_checkpoint(char *name, + MigrateCommon *args) +{ + args->colo_failover_during_checkpoint = true; + test_colo_multifd_primary_failover(name, args); +} + +static void test_colo_multifd_secondary_failover_checkpoint(char *name, + MigrateCommon *args) +{ + args->colo_failover_during_checkpoint = true; + test_colo_multifd_secondary_failover(name, args); +} + +void migration_test_add_colo(MigrationTestEnv *env) +{ + migration_test_add("/migration/colo/plain/secondary_failover", + test_colo_plain_secondary_failover); + + migration_test_add("/migration/colo/multifd/secondary_failover", + test_colo_multifd_secondary_failover); + + if (!env->full_set) { + return; + } + + migration_test_add("/migration/colo/plain/primary_failover", + test_colo_plain_primary_failover); + + migration_test_add("/migration/colo/multifd/primary_failover", + test_colo_multifd_primary_failover); + + migration_test_add("/migration/colo/plain/primary_failover_checkpoint", + test_colo_plain_primary_failover_checkpoint); + migration_test_add("/migration/colo/plain/secondary_failover_checkpoint", + test_colo_plain_secondary_failover_checkpoint); + + migration_test_add("/migration/colo/multifd/primary_failover_checkpoint", + test_colo_multifd_primary_failover_checkpoint); + migration_test_add("/migration/colo/multifd/secondary_failover_checkpoint", + test_colo_multifd_secondary_failover_checkpoint); +} diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 8c1fc6e009f16dc05a47e917167f62e0250ca992..08bca49a8980f9988be9447acf54b17acd56da94 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -315,7 +315,7 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { memory_size = "150M"; - if (g_str_equal(arch, "i386")) { + if (g_str_equal(arch, "i386") || args->is_colo) { machine_alias = "pc"; } else { machine_alias = "q35"; @@ -1068,6 +1068,69 @@ void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, return NULL; } +int test_colo_common(MigrateCommon *args) +{ + QTestState *from, *to; + void *data_hook = NULL; + + args->start.oob = true; + args->start.is_colo = true; + args->start.caps[MIGRATION_CAPABILITY_X_COLO] = true; + + if (migrate_start(&from, &to, args->listen_uri, &args->start)) { + return -1; + } + + migrate_set_parameter_int(from, "x-checkpoint-delay", 300); + + if (args->start_hook) { + data_hook = args->start_hook(from, to); + } + + migrate_ensure_converge(from); + wait_for_serial("src_serial"); + + migrate_qmp(from, to, args->connect_uri, NULL, "{}"); + + wait_for_migration_status(from, "colo", NULL); + wait_for_resume(to, &dst_state); + + wait_for_serial("src_serial"); + wait_for_serial("dest_serial"); + + /* wait for 3 checkpoints */ + for (int i = 0; i < 3; i++) { + qtest_qmp_eventwait(to, "RESUME"); + wait_for_serial("src_serial"); + wait_for_serial("dest_serial"); + } + + if (args->colo_failover_during_checkpoint) { + qtest_qmp_eventwait(to, "STOP"); + } + if (args->colo_primary_failover) { + qtest_qmp_assert_success(from, "{'exec-oob': 'yank', 'id': 'yank-cmd', " + "'arguments': {'instances':" + "[{'type': 'migration'}]}}"); + qtest_qmp_assert_success(from, "{'execute': 'x-colo-lost-heartbeat'}"); + wait_for_serial("src_serial"); + } else { + qtest_qmp_assert_success(to, "{'exec-oob': 'yank', 'id': 'yank-cmd', " + "'arguments': {'instances':" + "[{'type': 'migration'}]}}"); + qtest_qmp_assert_success(to, "{'execute': 'x-colo-lost-heartbeat'}"); + wait_for_serial("dest_serial"); + } + + if (args->end_hook) { + args->end_hook(from, to, data_hook); + } + + migrate_end(from, to, !args->colo_primary_failover); + + return 0; +} + QTestMigrationState *get_src(void) { return &src_state; diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h index 2ea13e7758697550b5531737e66d6d939dd800d1..1da532569d8c5941c99d83ae7da88ccab2bdcbe2 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -230,6 +230,9 @@ typedef struct { */ bool live; + bool colo_primary_failover; + bool colo_failover_during_checkpoint; + /* Postcopy specific fields */ void *postcopy_data; PostcopyRecoveryFailStage postcopy_recovery_fail_stage; @@ -248,6 +251,7 @@ void test_postcopy_common(MigrateCommon *args); void test_postcopy_recovery_common(MigrateCommon *args); int test_precopy_common(MigrateCommon *args); void test_file_common(MigrateCommon *args, bool stop_src); +int test_colo_common(MigrateCommon *args); void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, QTestState *to, const char *method); @@ -267,5 +271,10 @@ void migration_test_add_file(MigrationTestEnv *env); void migration_test_add_precopy(MigrationTestEnv *env); void migration_test_add_cpr(MigrationTestEnv *env); void migration_test_add_misc(MigrationTestEnv *env); +#ifdef CONFIG_REPLICATION +void migration_test_add_colo(MigrationTestEnv *env); +#else +static inline void migration_test_add_colo(MigrationTestEnv *env) {}; +#endif #endif /* TEST_FRAMEWORK_H */ -- 2.39.5 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] migration-test: Add COLO migration unit test 2025-12-30 14:05 ` [PATCH 3/3] migration-test: Add COLO migration unit test Lukas Straub @ 2026-01-06 20:03 ` Peter Xu 2026-01-15 22:35 ` Lukas Straub 0 siblings, 1 reply; 17+ messages in thread From: Peter Xu @ 2026-01-06 20:03 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen On Tue, Dec 30, 2025 at 03:05:46PM +0100, Lukas Straub wrote: > Add a COLO migration test for COLO migration and failover. > > COLO does not support q35 machine at this time. > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > --- > tests/qtest/meson.build | 7 ++- > tests/qtest/migration-test.c | 1 + > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > tests/qtest/migration/framework.c | 65 ++++++++++++++++++++- > tests/qtest/migration/framework.h | 9 +++ > 5 files changed, 195 insertions(+), 2 deletions(-) > > diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build > index 08fba9695b9813dc0b6b6554ef8c40c9615918fa..e68ce6c193ce2a2c244fa072ebb24738380f844a 100644 > --- a/tests/qtest/meson.build > +++ b/tests/qtest/meson.build > @@ -366,6 +366,11 @@ if gnutls.found() > endif > endif > > +migration_colo_files = [] > +if get_option('replication').allowed() > + migration_colo_files = [files('migration/colo-tests.c')] > +endif > + > qtests = { > 'aspeed_hace-test': files('aspeed-hace-utils.c', 'aspeed_hace-test.c'), > 'aspeed_smc-test': files('aspeed-smc-utils.c', 'aspeed_smc-test.c'), > @@ -377,7 +382,7 @@ qtests = { > 'migration/migration-util.c') + dbus_vmstate1, > 'erst-test': files('erst-test.c'), > 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], > - 'migration-test': test_migration_files + migration_tls_files, > + 'migration-test': test_migration_files + migration_tls_files + migration_colo_files, > 'pxe-test': files('boot-sector.c'), > 'pnv-xive2-test': files('pnv-xive2-common.c', 'pnv-xive2-flush-sync.c', > 'pnv-xive2-nvpg_bar.c'), > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c > index 08936871741535c926eeac40a7d7c3f461c72fd0..e582f05c7dc2673dbd05a936df8feb6c964b5bbc 100644 > --- a/tests/qtest/migration-test.c > +++ b/tests/qtest/migration-test.c > @@ -55,6 +55,7 @@ int main(int argc, char **argv) > migration_test_add_precopy(env); > migration_test_add_cpr(env); > migration_test_add_misc(env); > + migration_test_add_colo(env); > > ret = g_test_run(); > > diff --git a/tests/qtest/migration/colo-tests.c b/tests/qtest/migration/colo-tests.c > new file mode 100644 > index 0000000000000000000000000000000000000000..adec41c1c0473539d02e488b1d0baa663d7743b1 > --- /dev/null > +++ b/tests/qtest/migration/colo-tests.c > @@ -0,0 +1,115 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0-or-later > + * > + * QTest testcases for COLO migration > + * > + * Copyright (c) 2025 Lukas Straub <lukasstraub2@web.de> > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#include "qemu/osdep.h" > +#include "libqtest.h" > +#include "migration/framework.h" > +#include "migration/migration-qmp.h" > +#include "migration/migration-util.h" > +#include "qemu/module.h" > + > +static void test_colo_plain_primary_failover(char *name, MigrateCommon *args) > +{ > + args->listen_uri = "tcp:127.0.0.1:0"; > + args->colo_primary_failover = true; > + > + test_colo_common(args); > +} > + > +static void test_colo_plain_secondary_failover(char *name, MigrateCommon *args) > +{ > + args->listen_uri = "tcp:127.0.0.1:0"; > + > + test_colo_common(args); > +} > + > +static void *hook_start_multifd(QTestState *from, QTestState *to) > +{ > + return migrate_hook_start_precopy_tcp_multifd_common(from, to, "none"); > +} > + > +static void test_colo_multifd_primary_failover(char *name, MigrateCommon *args) > +{ > + args->listen_uri = "defer"; > + args->start_hook = hook_start_multifd; > + args->colo_primary_failover = true; > + args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true; > + > + test_colo_common(args); > +} > + > +static void test_colo_multifd_secondary_failover(char *name, > + MigrateCommon *args) > +{ > + args->listen_uri = "defer"; > + args->start_hook = hook_start_multifd; > + args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true; > + > + test_colo_common(args); > +} > + > +static void test_colo_plain_primary_failover_checkpoint(char *name, > + MigrateCommon *args) > +{ > + args->colo_failover_during_checkpoint = true; > + test_colo_plain_primary_failover(name, args); > +} > + > +static void test_colo_plain_secondary_failover_checkpoint(char *name, > + MigrateCommon *args) > +{ > + args->colo_failover_during_checkpoint = true; > + test_colo_plain_secondary_failover(name, args); > +} > + > +static void test_colo_multifd_primary_failover_checkpoint(char *name, > + MigrateCommon *args) > +{ > + args->colo_failover_during_checkpoint = true; > + test_colo_multifd_primary_failover(name, args); > +} > + > +static void test_colo_multifd_secondary_failover_checkpoint(char *name, > + MigrateCommon *args) > +{ > + args->colo_failover_during_checkpoint = true; > + test_colo_multifd_secondary_failover(name, args); > +} > + > +void migration_test_add_colo(MigrationTestEnv *env) > +{ > + migration_test_add("/migration/colo/plain/secondary_failover", > + test_colo_plain_secondary_failover); > + > + migration_test_add("/migration/colo/multifd/secondary_failover", > + test_colo_multifd_secondary_failover); > + > + if (!env->full_set) { > + return; > + } IMHO we can skip all COLO tests in full_set. Don't worry, if it's merged at least Fabiano and myself will always run it, making sure migration patches will be smoked. Here it's about whether we will run it in everyone's CI. > + > + migration_test_add("/migration/colo/plain/primary_failover", > + test_colo_plain_primary_failover); > + > + migration_test_add("/migration/colo/multifd/primary_failover", > + test_colo_multifd_primary_failover); > + > + migration_test_add("/migration/colo/plain/primary_failover_checkpoint", > + test_colo_plain_primary_failover_checkpoint); > + migration_test_add("/migration/colo/plain/secondary_failover_checkpoint", > + test_colo_plain_secondary_failover_checkpoint); > + > + migration_test_add("/migration/colo/multifd/primary_failover_checkpoint", > + test_colo_multifd_primary_failover_checkpoint); > + migration_test_add("/migration/colo/multifd/secondary_failover_checkpoint", > + test_colo_multifd_secondary_failover_checkpoint); > +} > diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c > index 8c1fc6e009f16dc05a47e917167f62e0250ca992..08bca49a8980f9988be9447acf54b17acd56da94 100644 > --- a/tests/qtest/migration/framework.c > +++ b/tests/qtest/migration/framework.c > @@ -315,7 +315,7 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) > if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { > memory_size = "150M"; > > - if (g_str_equal(arch, "i386")) { > + if (g_str_equal(arch, "i386") || args->is_colo) { OK, one more reference.. I'm curious, why Q35 is not supported? > machine_alias = "pc"; > } else { > machine_alias = "q35"; > @@ -1068,6 +1068,69 @@ void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, > return NULL; > } > > +int test_colo_common(MigrateCommon *args) > +{ > + QTestState *from, *to; > + void *data_hook = NULL; > + > + args->start.oob = true; > + args->start.is_colo = true; > + args->start.caps[MIGRATION_CAPABILITY_X_COLO] = true; > + > + if (migrate_start(&from, &to, args->listen_uri, &args->start)) { > + return -1; > + } > + > + migrate_set_parameter_int(from, "x-checkpoint-delay", 300); > + > + if (args->start_hook) { > + data_hook = args->start_hook(from, to); > + } > + > + migrate_ensure_converge(from); > + wait_for_serial("src_serial"); > + > + migrate_qmp(from, to, args->connect_uri, NULL, "{}"); > + > + wait_for_migration_status(from, "colo", NULL); > + wait_for_resume(to, &dst_state); > + > + wait_for_serial("src_serial"); > + wait_for_serial("dest_serial"); > + > + /* wait for 3 checkpoints */ > + for (int i = 0; i < 3; i++) { > + qtest_qmp_eventwait(to, "RESUME"); > + wait_for_serial("src_serial"); > + wait_for_serial("dest_serial"); > + } > + > + if (args->colo_failover_during_checkpoint) { > + qtest_qmp_eventwait(to, "STOP"); > + } > + if (args->colo_primary_failover) { > + qtest_qmp_assert_success(from, "{'exec-oob': 'yank', 'id': 'yank-cmd', " > + "'arguments': {'instances':" > + "[{'type': 'migration'}]}}"); > + qtest_qmp_assert_success(from, "{'execute': 'x-colo-lost-heartbeat'}"); > + wait_for_serial("src_serial"); > + } else { > + qtest_qmp_assert_success(to, "{'exec-oob': 'yank', 'id': 'yank-cmd', " > + "'arguments': {'instances':" > + "[{'type': 'migration'}]}}"); > + qtest_qmp_assert_success(to, "{'execute': 'x-colo-lost-heartbeat'}"); > + wait_for_serial("dest_serial"); > + } > + > + if (args->end_hook) { > + args->end_hook(from, to, data_hook); > + } > + > + migrate_end(from, to, !args->colo_primary_failover); > + > + return 0; > +} > + > QTestMigrationState *get_src(void) > { > return &src_state; > diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h > index 2ea13e7758697550b5531737e66d6d939dd800d1..1da532569d8c5941c99d83ae7da88ccab2bdcbe2 100644 > --- a/tests/qtest/migration/framework.h > +++ b/tests/qtest/migration/framework.h > @@ -230,6 +230,9 @@ typedef struct { > */ > bool live; > > + bool colo_primary_failover; > + bool colo_failover_during_checkpoint; Let's try to not add more per-feature fields here into the test framework struct. My bad to have started doing this for postcopy tests.. I'll prepare patches to remove the postcopy ones. These parameters can be passed from the test callers, afaict. Thanks, > + > /* Postcopy specific fields */ > void *postcopy_data; > PostcopyRecoveryFailStage postcopy_recovery_fail_stage; > @@ -248,6 +251,7 @@ void test_postcopy_common(MigrateCommon *args); > void test_postcopy_recovery_common(MigrateCommon *args); > int test_precopy_common(MigrateCommon *args); > void test_file_common(MigrateCommon *args, bool stop_src); > +int test_colo_common(MigrateCommon *args); > void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, > QTestState *to, > const char *method); > @@ -267,5 +271,10 @@ void migration_test_add_file(MigrationTestEnv *env); > void migration_test_add_precopy(MigrationTestEnv *env); > void migration_test_add_cpr(MigrationTestEnv *env); > void migration_test_add_misc(MigrationTestEnv *env); > +#ifdef CONFIG_REPLICATION > +void migration_test_add_colo(MigrationTestEnv *env); > +#else > +static inline void migration_test_add_colo(MigrationTestEnv *env) {}; > +#endif > > #endif /* TEST_FRAMEWORK_H */ > > -- > 2.39.5 > -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] migration-test: Add COLO migration unit test 2026-01-06 20:03 ` Peter Xu @ 2026-01-15 22:35 ` Lukas Straub 2026-01-15 22:42 ` Peter Xu 0 siblings, 1 reply; 17+ messages in thread From: Lukas Straub @ 2026-01-15 22:35 UTC (permalink / raw) To: Peter Xu Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen [-- Attachment #1: Type: text/plain, Size: 7801 bytes --] On Tue, 6 Jan 2026 15:03:11 -0500 Peter Xu <peterx@redhat.com> wrote: > On Tue, Dec 30, 2025 at 03:05:46PM +0100, Lukas Straub wrote: > > Add a COLO migration test for COLO migration and failover. > > > > COLO does not support q35 machine at this time. > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > --- > > tests/qtest/meson.build | 7 ++- > > tests/qtest/migration-test.c | 1 + > > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > > tests/qtest/migration/framework.c | 65 ++++++++++++++++++++- > > tests/qtest/migration/framework.h | 9 +++ > > 5 files changed, 195 insertions(+), 2 deletions(-) > > > > [...] > > + > > +void migration_test_add_colo(MigrationTestEnv *env) > > +{ > > + migration_test_add("/migration/colo/plain/secondary_failover", > > + test_colo_plain_secondary_failover); > > + > > + migration_test_add("/migration/colo/multifd/secondary_failover", > > + test_colo_multifd_secondary_failover); > > + > > + if (!env->full_set) { > > + return; > > + } > > IMHO we can skip all COLO tests in full_set. Don't worry, if it's merged > at least Fabiano and myself will always run it, making sure migration > patches will be smoked. > > Here it's about whether we will run it in everyone's CI. Okay, I will fix this in the next version. > > > + > > + migration_test_add("/migration/colo/plain/primary_failover", > > + test_colo_plain_primary_failover); > > + > > + migration_test_add("/migration/colo/multifd/primary_failover", > > + test_colo_multifd_primary_failover); > > + > > + migration_test_add("/migration/colo/plain/primary_failover_checkpoint", > > + test_colo_plain_primary_failover_checkpoint); > > + migration_test_add("/migration/colo/plain/secondary_failover_checkpoint", > > + test_colo_plain_secondary_failover_checkpoint); > > + > > + migration_test_add("/migration/colo/multifd/primary_failover_checkpoint", > > + test_colo_multifd_primary_failover_checkpoint); > > + migration_test_add("/migration/colo/multifd/secondary_failover_checkpoint", > > + test_colo_multifd_secondary_failover_checkpoint); > > +} > > diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c > > index 8c1fc6e009f16dc05a47e917167f62e0250ca992..08bca49a8980f9988be9447acf54b17acd56da94 100644 > > --- a/tests/qtest/migration/framework.c > > +++ b/tests/qtest/migration/framework.c > > @@ -315,7 +315,7 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) > > if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { > > memory_size = "150M"; > > > > - if (g_str_equal(arch, "i386")) { > > + if (g_str_equal(arch, "i386") || args->is_colo) { > > OK, one more reference.. > > I'm curious, why Q35 is not supported? There is a bug in the emulated ahci disk controller which crashes when it's vmstate is loaded more than once. > > > machine_alias = "pc"; > > } else { > > machine_alias = "q35"; > > @@ -1068,6 +1068,69 @@ void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, > > return NULL; > > } > > > > +int test_colo_common(MigrateCommon *args) > > +{ > > + QTestState *from, *to; > > + void *data_hook = NULL; > > + > > + args->start.oob = true; > > + args->start.is_colo = true; > > + args->start.caps[MIGRATION_CAPABILITY_X_COLO] = true; > > + > > + if (migrate_start(&from, &to, args->listen_uri, &args->start)) { > > + return -1; > > + } > > + > > + migrate_set_parameter_int(from, "x-checkpoint-delay", 300); > > + > > + if (args->start_hook) { > > + data_hook = args->start_hook(from, to); > > + } > > + > > + migrate_ensure_converge(from); > > + wait_for_serial("src_serial"); > > + > > + migrate_qmp(from, to, args->connect_uri, NULL, "{}"); > > + > > + wait_for_migration_status(from, "colo", NULL); > > + wait_for_resume(to, &dst_state); > > + > > + wait_for_serial("src_serial"); > > + wait_for_serial("dest_serial"); > > + > > + /* wait for 3 checkpoints */ > > + for (int i = 0; i < 3; i++) { > > + qtest_qmp_eventwait(to, "RESUME"); > > + wait_for_serial("src_serial"); > > + wait_for_serial("dest_serial"); > > + } > > + > > + if (args->colo_failover_during_checkpoint) { > > + qtest_qmp_eventwait(to, "STOP"); > > + } > > + if (args->colo_primary_failover) { > > + qtest_qmp_assert_success(from, "{'exec-oob': 'yank', 'id': 'yank-cmd', " > > + "'arguments': {'instances':" > > + "[{'type': 'migration'}]}}"); > > + qtest_qmp_assert_success(from, "{'execute': 'x-colo-lost-heartbeat'}"); > > + wait_for_serial("src_serial"); > > + } else { > > + qtest_qmp_assert_success(to, "{'exec-oob': 'yank', 'id': 'yank-cmd', " > > + "'arguments': {'instances':" > > + "[{'type': 'migration'}]}}"); > > + qtest_qmp_assert_success(to, "{'execute': 'x-colo-lost-heartbeat'}"); > > + wait_for_serial("dest_serial"); > > + } > > + > > + if (args->end_hook) { > > + args->end_hook(from, to, data_hook); > > + } > > + > > + migrate_end(from, to, !args->colo_primary_failover); > > + > > + return 0; > > +} > > + > > QTestMigrationState *get_src(void) > > { > > return &src_state; > > diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h > > index 2ea13e7758697550b5531737e66d6d939dd800d1..1da532569d8c5941c99d83ae7da88ccab2bdcbe2 100644 > > --- a/tests/qtest/migration/framework.h > > +++ b/tests/qtest/migration/framework.h > > @@ -230,6 +230,9 @@ typedef struct { > > */ > > bool live; > > > > + bool colo_primary_failover; > > + bool colo_failover_during_checkpoint; > > Let's try to not add more per-feature fields here into the test framework > struct. My bad to have started doing this for postcopy tests.. I'll > prepare patches to remove the postcopy ones. These parameters can be > passed from the test callers, afaict. > > Thanks, > > > + > > /* Postcopy specific fields */ > > void *postcopy_data; > > PostcopyRecoveryFailStage postcopy_recovery_fail_stage; > > @@ -248,6 +251,7 @@ void test_postcopy_common(MigrateCommon *args); > > void test_postcopy_recovery_common(MigrateCommon *args); > > int test_precopy_common(MigrateCommon *args); > > void test_file_common(MigrateCommon *args, bool stop_src); > > +int test_colo_common(MigrateCommon *args); > > void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from, > > QTestState *to, > > const char *method); > > @@ -267,5 +271,10 @@ void migration_test_add_file(MigrationTestEnv *env); > > void migration_test_add_precopy(MigrationTestEnv *env); > > void migration_test_add_cpr(MigrationTestEnv *env); > > void migration_test_add_misc(MigrationTestEnv *env); > > +#ifdef CONFIG_REPLICATION > > +void migration_test_add_colo(MigrationTestEnv *env); > > +#else > > +static inline void migration_test_add_colo(MigrationTestEnv *env) {}; > > +#endif > > > > #endif /* TEST_FRAMEWORK_H */ > > > > -- > > 2.39.5 > > > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] migration-test: Add COLO migration unit test 2026-01-15 22:35 ` Lukas Straub @ 2026-01-15 22:42 ` Peter Xu 0 siblings, 0 replies; 17+ messages in thread From: Peter Xu @ 2026-01-15 22:42 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen On Thu, Jan 15, 2026 at 11:35:00PM +0100, Lukas Straub wrote: > > > diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c > > > index 8c1fc6e009f16dc05a47e917167f62e0250ca992..08bca49a8980f9988be9447acf54b17acd56da94 100644 > > > --- a/tests/qtest/migration/framework.c > > > +++ b/tests/qtest/migration/framework.c > > > @@ -315,7 +315,7 @@ int migrate_args(char **from, char **to, const char *uri, MigrateStart *args) > > > if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { > > > memory_size = "150M"; > > > > > > - if (g_str_equal(arch, "i386")) { > > > + if (g_str_equal(arch, "i386") || args->is_colo) { > > > > OK, one more reference.. > > > > I'm curious, why Q35 is not supported? > > There is a bug in the emulated ahci disk controller which crashes when > it's vmstate is loaded more than once. I wonder what happens if one does a loadvm on top of a migrated QEMU, then. Is that the only device that is broken? Could we fix the device instead? Thanks, -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub ` (2 preceding siblings ...) 2025-12-30 14:05 ` [PATCH 3/3] migration-test: Add COLO migration unit test Lukas Straub @ 2025-12-30 15:02 ` Peter Xu 2026-01-04 5:44 ` Zhang Chen 2026-01-06 20:05 ` Peter Xu 4 siblings, 1 reply; 17+ messages in thread From: Peter Xu @ 2025-12-30 15:02 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Juan Quintela On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > Hello everyone, > This adds COLO multifd support and migration unit tests for COLO migration > and failover. Hi, Lukas, I'll review the series after the new year. Could you still introduce some background on how you're deploying COLO? Do you use it in production, or for fun? COLO is still a nice and interesting feature, said that, COLO has quite a lot of code plugged into migration core. I wished it's like a multifd compressor which was much more self-contained, but it's not. I wished we can simplify the code in QEMU migration. We've talked it through before with current COLO maintainers, it looks to me there aren't really much users using it in production, meanwhile COLO doesn't look like a feature to benefit individual QEMU users either. I want to study the use case of COLO in status quo, and evaluate how much effort we should put on it in the future. Note that if it's for fun we can always use a stable branch which will be there forever. We'll need to think about QEMU evolving in the future, and what's best for QEMU. Thanks, > > Regards, > Lukas > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > --- > Lukas Straub (3): > multifd: Add colo support > migration-test: Add -snapshot option for COLO > migration-test: Add COLO migration unit test > > migration/meson.build | 2 +- > migration/multifd-colo.c | 57 ++++++++++++++++++ > migration/multifd-colo.h | 26 +++++++++ > migration/multifd.c | 14 ++++- > tests/qtest/meson.build | 7 ++- > tests/qtest/migration-test.c | 1 + > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > tests/qtest/migration/framework.h | 10 ++++ > 9 files changed, 294 insertions(+), 7 deletions(-) > --- > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > Best regards, > -- > Lukas Straub <lukasstraub2@web.de> > -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2025-12-30 15:02 ` [PATCH 0/3] migration: Add COLO multifd support and " Peter Xu @ 2026-01-04 5:44 ` Zhang Chen 2026-01-04 5:48 ` Zhang Chen 2026-01-06 19:48 ` Peter Xu 0 siblings, 2 replies; 17+ messages in thread From: Zhang Chen @ 2026-01-04 5:44 UTC (permalink / raw) To: Peter Xu Cc: Lukas Straub, qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Juan Quintela, Hailiang Zhang On Tue, Dec 30, 2025 at 11:02 PM Peter Xu <peterx@redhat.com> wrote: > > On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > > Hello everyone, > > This adds COLO multifd support and migration unit tests for COLO migration > > and failover. > > Hi, Lukas, > > I'll review the series after the new year. > > Could you still introduce some background on how you're deploying COLO? Do > you use it in production, or for fun? > > COLO is still a nice and interesting feature, said that, COLO has quite a > lot of code plugged into migration core. I wished it's like a multifd > compressor which was much more self-contained, but it's not. I wished we > can simplify the code in QEMU migration. > > We've talked it through before with current COLO maintainers, it looks to > me there aren't really much users using it in production, meanwhile COLO > doesn't look like a feature to benefit individual QEMU users either. > > I want to study the use case of COLO in status quo, and evaluate how much > effort we should put on it in the future. Note that if it's for fun we can > always use a stable branch which will be there forever. We'll need to > think about QEMU evolving in the future, and what's best for QEMU. > > Thanks, > Hi Lukas and Peter, Thanks for this series, I will support for background info if Peter have any questions. And CC Hailiang Zhang, although he hasn't replied to emails for a long time. If no one objects, I think Lukas can replease Hailiang for COLO Framework. COLO Framework M: Hailiang Zhang <zhanghailiang@xfusion.com> S: Maintained F: migration/colo* F: include/migration/colo.h F: include/migration/failover.h F: docs/COLO-FT.txt Thanks Chen > > > > Regards, > > Lukas > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > --- > > Lukas Straub (3): > > multifd: Add colo support > > migration-test: Add -snapshot option for COLO > > migration-test: Add COLO migration unit test > > > > migration/meson.build | 2 +- > > migration/multifd-colo.c | 57 ++++++++++++++++++ > > migration/multifd-colo.h | 26 +++++++++ > > migration/multifd.c | 14 ++++- > > tests/qtest/meson.build | 7 ++- > > tests/qtest/migration-test.c | 1 + > > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > > tests/qtest/migration/framework.h | 10 ++++ > > 9 files changed, 294 insertions(+), 7 deletions(-) > > --- > > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > > > Best regards, > > -- > > Lukas Straub <lukasstraub2@web.de> > > > > -- > Peter Xu > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2026-01-04 5:44 ` Zhang Chen @ 2026-01-04 5:48 ` Zhang Chen 2026-01-06 19:48 ` Peter Xu 1 sibling, 0 replies; 17+ messages in thread From: Zhang Chen @ 2026-01-04 5:48 UTC (permalink / raw) To: Peter Xu Cc: Lukas Straub, qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Juan Quintela, Hailiang Zhang On Sun, Jan 4, 2026 at 1:44 PM Zhang Chen <zhangckid@gmail.com> wrote: > > On Tue, Dec 30, 2025 at 11:02 PM Peter Xu <peterx@redhat.com> wrote: > > > > On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > > > Hello everyone, > > > This adds COLO multifd support and migration unit tests for COLO migration > > > and failover. > > > > Hi, Lukas, > > > > I'll review the series after the new year. > > > > Could you still introduce some background on how you're deploying COLO? Do > > you use it in production, or for fun? > > > > COLO is still a nice and interesting feature, said that, COLO has quite a > > lot of code plugged into migration core. I wished it's like a multifd > > compressor which was much more self-contained, but it's not. I wished we > > can simplify the code in QEMU migration. > > > > We've talked it through before with current COLO maintainers, it looks to > > me there aren't really much users using it in production, meanwhile COLO > > doesn't look like a feature to benefit individual QEMU users either. > > > > I want to study the use case of COLO in status quo, and evaluate how much > > effort we should put on it in the future. Note that if it's for fun we can > > always use a stable branch which will be there forever. We'll need to > > think about QEMU evolving in the future, and what's best for QEMU. > > > > Thanks, > > > > Hi Lukas and Peter, > > Thanks for this series, I will support for background info if Peter > have any questions. > And CC Hailiang Zhang, although he hasn't replied to emails for a long time. > If no one objects, I think Lukas can replease Hailiang for COLO Framework. > S/replease/replace > COLO Framework > M: Hailiang Zhang <zhanghailiang@xfusion.com> > S: Maintained > F: migration/colo* > F: include/migration/colo.h > F: include/migration/failover.h > F: docs/COLO-FT.txt > > Thanks > Chen > > > > > > > Regards, > > > Lukas > > > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > > --- > > > Lukas Straub (3): > > > multifd: Add colo support > > > migration-test: Add -snapshot option for COLO > > > migration-test: Add COLO migration unit test > > > > > > migration/meson.build | 2 +- > > > migration/multifd-colo.c | 57 ++++++++++++++++++ > > > migration/multifd-colo.h | 26 +++++++++ > > > migration/multifd.c | 14 ++++- > > > tests/qtest/meson.build | 7 ++- > > > tests/qtest/migration-test.c | 1 + > > > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > > > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > > > tests/qtest/migration/framework.h | 10 ++++ > > > 9 files changed, 294 insertions(+), 7 deletions(-) > > > --- > > > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > > > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > > > > > Best regards, > > > -- > > > Lukas Straub <lukasstraub2@web.de> > > > > > > > -- > > Peter Xu > > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2026-01-04 5:44 ` Zhang Chen 2026-01-04 5:48 ` Zhang Chen @ 2026-01-06 19:48 ` Peter Xu 2026-01-15 21:45 ` Lukas Straub 1 sibling, 1 reply; 17+ messages in thread From: Peter Xu @ 2026-01-06 19:48 UTC (permalink / raw) To: Zhang Chen Cc: Lukas Straub, qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Juan Quintela, Hailiang Zhang On Sun, Jan 04, 2026 at 01:44:52PM +0800, Zhang Chen wrote: > On Tue, Dec 30, 2025 at 11:02 PM Peter Xu <peterx@redhat.com> wrote: > > > > On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > > > Hello everyone, > > > This adds COLO multifd support and migration unit tests for COLO migration > > > and failover. > > > > Hi, Lukas, > > > > I'll review the series after the new year. > > > > Could you still introduce some background on how you're deploying COLO? Do > > you use it in production, or for fun? > > > > COLO is still a nice and interesting feature, said that, COLO has quite a > > lot of code plugged into migration core. I wished it's like a multifd > > compressor which was much more self-contained, but it's not. I wished we > > can simplify the code in QEMU migration. > > > > We've talked it through before with current COLO maintainers, it looks to > > me there aren't really much users using it in production, meanwhile COLO > > doesn't look like a feature to benefit individual QEMU users either. > > > > I want to study the use case of COLO in status quo, and evaluate how much > > effort we should put on it in the future. Note that if it's for fun we can > > always use a stable branch which will be there forever. We'll need to > > think about QEMU evolving in the future, and what's best for QEMU. > > > > Thanks, > > > > Hi Lukas and Peter, Hi, Chen, > > Thanks for this series, I will support for background info if Peter > have any questions. Thanks, I believe my major question so far was, whether we should deprecate COLO in migration framework. :) The netfilters and rest can be discussed separately. Now looking back at my initial ask in Zhijian's fix, I still agree with Zhijian on these two points mentioned: https://lore.kernel.org/all/b2eadde7-57e9-426c-8487-e500ba06410e@fujitsu.com/ That is: - Active users who depend on it. - A unit test for the COLO framework. Meanwhile, I can't see how COLO would win if to be compared with some app-level HA infrastructure.. considering the overhead it requires on running two VMs and compare every packet. Lukas, thanks for trying to fix the 2nd. I apologize that I still requested you to send these patches, without further raising the attention that I still want to discuss deprecation. I don't think anyone yet proved we should keep COLO. I do plan to send one patch adding COLO framework to deprecation, if nobody would stop me in a week justifying question 1 above. We kind of proved almost nobody is actively using COLO anymore in the past few releases. If nobody is using COLO, we should simply drop it. > And CC Hailiang Zhang, although he hasn't replied to emails for a long time. > If no one objects, I think Lukas can replease Hailiang for COLO Framework. > > COLO Framework > M: Hailiang Zhang <zhanghailiang@xfusion.com> > S: Maintained > F: migration/colo* > F: include/migration/colo.h > F: include/migration/failover.h > F: docs/COLO-FT.txt Right, this is also another reason why I think we may want to deprecate COLO framework. Since I requested this series (sorry again, Lukas), I'll review it today no matter if we decide to merge this series at last, or deprecate COLO framework. Thanks, > > Thanks > Chen > > > > > > > Regards, > > > Lukas > > > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > > --- > > > Lukas Straub (3): > > > multifd: Add colo support > > > migration-test: Add -snapshot option for COLO > > > migration-test: Add COLO migration unit test > > > > > > migration/meson.build | 2 +- > > > migration/multifd-colo.c | 57 ++++++++++++++++++ > > > migration/multifd-colo.h | 26 +++++++++ > > > migration/multifd.c | 14 ++++- > > > tests/qtest/meson.build | 7 ++- > > > tests/qtest/migration-test.c | 1 + > > > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > > > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > > > tests/qtest/migration/framework.h | 10 ++++ > > > 9 files changed, 294 insertions(+), 7 deletions(-) > > > --- > > > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > > > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > > > > > Best regards, > > > -- > > > Lukas Straub <lukasstraub2@web.de> > > > > > > > -- > > Peter Xu > > > -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2026-01-06 19:48 ` Peter Xu @ 2026-01-15 21:45 ` Lukas Straub 0 siblings, 0 replies; 17+ messages in thread From: Lukas Straub @ 2026-01-15 21:45 UTC (permalink / raw) To: Peter Xu Cc: Zhang Chen, qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Juan Quintela, Hailiang Zhang [-- Attachment #1: Type: text/plain, Size: 5577 bytes --] On Tue, 6 Jan 2026 14:48:14 -0500 Peter Xu <peterx@redhat.com> wrote: > On Sun, Jan 04, 2026 at 01:44:52PM +0800, Zhang Chen wrote: > > On Tue, Dec 30, 2025 at 11:02 PM Peter Xu <peterx@redhat.com> wrote: > > > > > > On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > > > > Hello everyone, > > > > This adds COLO multifd support and migration unit tests for COLO migration > > > > and failover. > > > > > > Hi, Lukas, > > > > > > I'll review the series after the new year. > > > > > > Could you still introduce some background on how you're deploying COLO? Do > > > you use it in production, or for fun? > > > > > > COLO is still a nice and interesting feature, said that, COLO has quite a > > > lot of code plugged into migration core. I wished it's like a multifd > > > compressor which was much more self-contained, but it's not. I wished we > > > can simplify the code in QEMU migration. > > > > > > We've talked it through before with current COLO maintainers, it looks to > > > me there aren't really much users using it in production, meanwhile COLO > > > doesn't look like a feature to benefit individual QEMU users either. > > > > > > I want to study the use case of COLO in status quo, and evaluate how much > > > effort we should put on it in the future. Note that if it's for fun we can > > > always use a stable branch which will be there forever. We'll need to > > > think about QEMU evolving in the future, and what's best for QEMU. > > > > > > Thanks, > > > > > > > Hi Lukas and Peter, > > Hi, Chen, > > > > > Thanks for this series, I will support for background info if Peter > > have any questions. > > Thanks, I believe my major question so far was, whether we should deprecate > COLO in migration framework. :) > > The netfilters and rest can be discussed separately. > > Now looking back at my initial ask in Zhijian's fix, I still agree with > Zhijian on these two points mentioned: > > https://lore.kernel.org/all/b2eadde7-57e9-426c-8487-e500ba06410e@fujitsu.com/ > > That is: > > - Active users who depend on it. > - A unit test for the COLO framework. > > Meanwhile, I can't see how COLO would win if to be compared with some > app-level HA infrastructure.. considering the overhead it requires on > running two VMs and compare every packet. > > Lukas, thanks for trying to fix the 2nd. I apologize that I still > requested you to send these patches, without further raising the attention > that I still want to discuss deprecation. I don't think anyone yet proved > we should keep COLO. I do plan to send one patch adding COLO framework to > deprecation, if nobody would stop me in a week justifying question 1 above. Hello Peter, I am a consultant on open-source high availability and fault tolaerance solutions. I provide a complete cluster management solution with automatic failover and failback for Qemu COLO. Qemu COLOs lockstepping architecture has a big performance advantage and it outperforms the market leader by 10x-100x in latency. No one else provides this unique architecture. I have customers that depend on this. I occasionally get inquiries about Qemu COLO even without doing any kind of marketing. So there is a general interest for this. Also, Canonical considers providing this to one of their customers. Regards, Lukas Straub > > We kind of proved almost nobody is actively using COLO anymore in the past > few releases. If nobody is using COLO, we should simply drop it. > > > And CC Hailiang Zhang, although he hasn't replied to emails for a long time. > > If no one objects, I think Lukas can replease Hailiang for COLO Framework. > > > > COLO Framework > > M: Hailiang Zhang <zhanghailiang@xfusion.com> > > S: Maintained > > F: migration/colo* > > F: include/migration/colo.h > > F: include/migration/failover.h > > F: docs/COLO-FT.txt > > Right, this is also another reason why I think we may want to deprecate > COLO framework. I will take over maintainership. > > Since I requested this series (sorry again, Lukas), I'll review it today no > matter if we decide to merge this series at last, or deprecate COLO > framework. > > Thanks, > > > > > Thanks > > Chen > > > > > > > > > > Regards, > > > > Lukas > > > > > > > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > > > > --- > > > > Lukas Straub (3): > > > > multifd: Add colo support > > > > migration-test: Add -snapshot option for COLO > > > > migration-test: Add COLO migration unit test > > > > > > > > migration/meson.build | 2 +- > > > > migration/multifd-colo.c | 57 ++++++++++++++++++ > > > > migration/multifd-colo.h | 26 +++++++++ > > > > migration/multifd.c | 14 ++++- > > > > tests/qtest/meson.build | 7 ++- > > > > tests/qtest/migration-test.c | 1 + > > > > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > > > > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > > > > tests/qtest/migration/framework.h | 10 ++++ > > > > 9 files changed, 294 insertions(+), 7 deletions(-) > > > > --- > > > > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > > > > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > > > > > > > Best regards, > > > > -- > > > > Lukas Straub <lukasstraub2@web.de> > > > > > > > > > > -- > > > Peter Xu > > > > > > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub ` (3 preceding siblings ...) 2025-12-30 15:02 ` [PATCH 0/3] migration: Add COLO multifd support and " Peter Xu @ 2026-01-06 20:05 ` Peter Xu 4 siblings, 0 replies; 17+ messages in thread From: Peter Xu @ 2026-01-06 20:05 UTC (permalink / raw) To: Lukas Straub Cc: qemu-devel, Fabiano Rosas, Laurent Vivier, Paolo Bonzini, Zhang Chen, Juan Quintela On Tue, Dec 30, 2025 at 03:05:43PM +0100, Lukas Straub wrote: > Hello everyone, > This adds COLO multifd support and migration unit tests for COLO migration > and failover. > > Regards, > Lukas > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> > --- > Lukas Straub (3): > multifd: Add colo support > migration-test: Add -snapshot option for COLO > migration-test: Add COLO migration unit test > > migration/meson.build | 2 +- > migration/multifd-colo.c | 57 ++++++++++++++++++ > migration/multifd-colo.h | 26 +++++++++ > migration/multifd.c | 14 ++++- > tests/qtest/meson.build | 7 ++- > tests/qtest/migration-test.c | 1 + > tests/qtest/migration/colo-tests.c | 115 +++++++++++++++++++++++++++++++++++++ > tests/qtest/migration/framework.c | 69 +++++++++++++++++++++- > tests/qtest/migration/framework.h | 10 ++++ > 9 files changed, 294 insertions(+), 7 deletions(-) > --- > base-commit: 942b0d378a1de9649085ad6db5306d5b8cef3591 > change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46 > > Best regards, > -- > Lukas Straub <lukasstraub2@web.de> > Lukas, I gave it a shot on the tests locally. I saw a lot of errors even if qtest didn't think it's failing. I do not know if it's only me. Let's discuss deprecation first, then if we want to keep COLO, then please have a look. Log attached. ===8<=== $ QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --full -r /x86_64/migration/colo TAP version 14 # random seed: R02Sa4f442d17819fa84c9ab14620fa9dd5e # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -machine none -accel qtest # Start of x86_64 tests # Start of migration tests # Start of colo tests # Start of plain tests # Running /x86_64/migration/colo/plain/secondary_failover # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming tcp:127.0.0.1:0 -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Unable to write to socket: Broken pipe qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Can't send COLO message: Input/output error ok 1 /x86_64/migration/colo/plain/secondary_failover # slow test /x86_64/migration/colo/plain/secondary_failover executed in 2.96 secs # Running /x86_64/migration/colo/plain/primary_failover # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming tcp:127.0.0.1:0 -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected ok 2 /x86_64/migration/colo/plain/primary_failover # slow test /x86_64/migration/colo/plain/primary_failover executed in 2.54 secs # Running /x86_64/migration/colo/plain/primary_failover_checkpoint # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming tcp:127.0.0.1:0 -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Failed to load section ID: stream error: -5: Channel error: Input/output error ok 3 /x86_64/migration/colo/plain/primary_failover_checkpoint # slow test /x86_64/migration/colo/plain/primary_failover_checkpoint executed in 2.87 secs # Running /x86_64/migration/colo/plain/secondary_failover_checkpoint # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming tcp:127.0.0.1:0 -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Failed to load section ID: stream error: -5: Unable to read from socket: Connection reset by peer qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Can't send COLO message: Input/output error qemu-system-x86_64: Can't send COLO message: Input/output error qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected ok 4 /x86_64/migration/colo/plain/secondary_failover_checkpoint # slow test /x86_64/migration/colo/plain/secondary_failover_checkpoint executed in 3.30 secs # End of plain tests # Start of multifd tests # Running /x86_64/migration/colo/multifd/secondary_failover # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming defer -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Can't send COLO message: Input/output error qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected ok 5 /x86_64/migration/colo/multifd/secondary_failover # slow test /x86_64/migration/colo/multifd/secondary_failover executed in 2.70 secs # Running /x86_64/migration/colo/multifd/primary_failover # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming defer -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Can't receive COLO message: Input/output error qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected ok 6 /x86_64/migration/colo/multifd/primary_failover # slow test /x86_64/migration/colo/multifd/primary_failover executed in 2.00 secs # Running /x86_64/migration/colo/multifd/primary_failover_checkpoint # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming defer -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Failed to load section ID: stream error: -5: Channel error: Input/output error ok 7 /x86_64/migration/colo/multifd/primary_failover_checkpoint # slow test /x86_64/migration/colo/multifd/primary_failover_checkpoint executed in 2.26 secs # Running /x86_64/migration/colo/multifd/secondary_failover_checkpoint # Using machine type: pc-i440fx-10.2 # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name source,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/src_serial -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest # starting QEMU: exec ./qemu-system-x86_64 -qtest unix:/tmp/qtest-2106378.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2106378.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -accel kvm -accel tcg -machine pc-i440fx-10.2, -name target,debug-threads=on -machine memory-backend=mig.mem -object memory-backend-ram,id=mig.mem,size=150M,share=off -serial file:/tmp/migration-test-WWZRI3/dest_serial -incoming defer -drive if=none,id=d0,file=/tmp/migration-test-WWZRI3/bootsect,format=raw -device ide-hd,drive=d0,secs=1,cyls=1,heads=1 -snapshot -accel qtest qemu-system-x86_64: Failed to load section ID: stream error: -5: Unable to read from socket: Connection reset by peer qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Can't send COLO message: Input/output error qemu-system-x86_64: Can't send COLO message: Input/output error qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected qemu-system-x86_64: Unable to shutdown socket: Transport endpoint is not connected ok 8 /x86_64/migration/colo/multifd/secondary_failover_checkpoint # slow test /x86_64/migration/colo/multifd/secondary_failover_checkpoint executed in 3.07 secs # End of multifd tests # End of colo tests # End of migration tests # End of x86_64 tests 1..8 -- Peter Xu ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-01-15 22:44 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-30 14:05 [PATCH 0/3] migration: Add COLO multifd support and COLO migration unit test Lukas Straub 2025-12-30 14:05 ` [PATCH 1/3] multifd: Add colo support Lukas Straub 2026-01-06 19:54 ` Peter Xu 2026-01-15 22:43 ` Lukas Straub 2025-12-30 14:05 ` [PATCH 2/3] migration-test: Add -snapshot option for COLO Lukas Straub 2026-01-06 19:55 ` Peter Xu 2026-01-15 22:37 ` Lukas Straub 2025-12-30 14:05 ` [PATCH 3/3] migration-test: Add COLO migration unit test Lukas Straub 2026-01-06 20:03 ` Peter Xu 2026-01-15 22:35 ` Lukas Straub 2026-01-15 22:42 ` Peter Xu 2025-12-30 15:02 ` [PATCH 0/3] migration: Add COLO multifd support and " Peter Xu 2026-01-04 5:44 ` Zhang Chen 2026-01-04 5:48 ` Zhang Chen 2026-01-06 19:48 ` Peter Xu 2026-01-15 21:45 ` Lukas Straub 2026-01-06 20:05 ` Peter Xu
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.