All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Straub <lukasstraub2@web.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Zhang Chen <zhangckid@gmail.com>
Subject: Re: [PATCH 2/3] migration-test: Add -snapshot option for COLO
Date: Thu, 15 Jan 2026 23:37:55 +0100	[thread overview]
Message-ID: <20260115233755.0d409373@penguin> (raw)
In-Reply-To: <aV1otmGc76_KzZMv@x1.local>

[-- 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 --]

  reply	other threads:[~2026-01-15 22:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260115233755.0d409373@penguin \
    --to=lukasstraub2@web.de \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangckid@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.