All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Lukas Straub <lukasstraub2@web.de>, qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>, Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Zhang Chen <zhangckid@gmail.com>,
	Hailiang Zhang <zhanghailiang@xfusion.com>,
	Markus Armbruster <armbru@redhat.com>,
	Li Zhijian <lizhijian@fujitsu.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Lukas Straub <lukasstraub2@web.de>
Subject: Re: [PATCH v8 17/17] qemu-colo.rst: Simplify the block replication setup
Date: Tue, 17 Feb 2026 10:07:29 -0300	[thread overview]
Message-ID: <87h5rfmsby.fsf@suse.de> (raw)
In-Reply-To: <20260210-colo_unit_test_multifd-v8-17-7f9e5f7d082b@web.de>

Lukas Straub <lukasstraub2@web.de> writes:

> On the primary side we don't actually need the replication
> block driver, since it only passes trough all IO.
> So simplify the setup and also use 'blockdev-add' instead of
> 'human-monitor-command'.
>
> This is how my clients use colo in production.
>
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
> ---
>  docs/system/qemu-colo.rst | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/docs/system/qemu-colo.rst b/docs/system/qemu-colo.rst
> index 75abbd80298df79223cb8e70064a5dc83d70f4eb..f7d3b6439cf3401a58c412634239d1a43999a10e 100644
> --- a/docs/system/qemu-colo.rst
> +++ b/docs/system/qemu-colo.rst
> @@ -240,8 +240,8 @@ Note:
>  **4.** On Primary VM's QEMU monitor, issue command::
>  
>      {"execute":"qmp_capabilities"}
> -    {"execute": "human-monitor-command", "arguments": {"command-line": "drive_add -n buddy driver=replication,mode=primary,file.driver=nbd,file.host=127.0.0.2,file.port=9999,file.export=parent0,node-name=replication0"}}
> -    {"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", "node": "replication0" } }
> +    {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name": "nbd0", "server": {"type": "inet", "host": "127.0.0.2", "port": "9999"}, "export": "parent0", "detect-zeroes": "on"} }
> +    {"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", "node": "nbd0" } }
>      {"execute": "migrate-set-capabilities", "arguments": {"capabilities": [ {"capability": "x-colo", "state": true } ] } }
>      {"execute": "migrate", "arguments": {"uri": "tcp:127.0.0.2:9998" } }
>  
> @@ -269,7 +269,7 @@ Primary Failover
>  The Secondary died, resume on the Primary::
>  
>      {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "child": "children.1"} }
> -    {"execute": "human-monitor-command", "arguments":{ "command-line": "drive_del replication0" } }
> +    {"execute": "blockdev-del", "arguments": {"node-name": "nbd0"} }
>      {"execute": "object-del", "arguments":{ "id": "comp0" } }
>      {"execute": "object-del", "arguments":{ "id": "iothread1" } }
>      {"execute": "object-del", "arguments":{ "id": "m0" } }
> @@ -309,8 +309,8 @@ Wait until disk is synced, then::
>      {"execute": "stop"}
>      {"execute": "block-job-cancel", "arguments":{ "device": "resync"} }
>  
> -    {"execute": "human-monitor-command", "arguments":{ "command-line": "drive_add -n buddy driver=replication,mode=primary,file.driver=nbd,file.host=127.0.0.2,file.port=9999,file.export=parent0,node-name=replication0"}}
> -    {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "replication0" } }
> +    {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name": "nbd0", "server": {"type": "inet", "host": "127.0.0.2", "port": "9999"}, "export": "parent0", "detect-zeroes": "on"} }
> +    {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "nbd0" } }
>  
>      {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id": "m0", "netdev": "hn0", "queue": "tx", "outdev": "mirror0" } }
>      {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire0", "netdev": "hn0", "queue": "rx", "indev": "compare_out" } }
> @@ -341,8 +341,8 @@ Wait until disk is synced, then::
>      {"execute": "stop"}
>      {"execute": "block-job-cancel", "arguments":{ "device": "resync" } }
>  
> -    {"execute": "human-monitor-command", "arguments":{ "command-line": "drive_add -n buddy driver=replication,mode=primary,file.driver=nbd,file.host=127.0.0.1,file.port=9999,file.export=parent0,node-name=replication0"}}
> -    {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "replication0" } }
> +    {"execute": "blockdev-add", "arguments": {"driver": "nbd", "node-name": "nbd0", "server": {"type": "inet", "host": "127.0.0.1", "port": "9999"}, "export": "parent0", "detect-zeroes": "on"} }
> +    {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "nbd0" } }
>  
>      {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id": "m0", "insert": "before", "position": "id=rew0", "netdev": "hn0", "queue": "tx", "outdev": "mirror0" } }
>      {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire0", "insert": "before", "position": "id=rew0", "netdev": "hn0", "queue": "rx", "indev": "compare_out" } }

Reviewed-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-02-17 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 16:22 [PATCH v8 00/17] migration: Add COLO multifd support and COLO migration unit test Lukas Straub
2026-02-10 16:22 ` [PATCH v8 01/17] MAINTAINERS: Add myself as maintainer for COLO migration framework Lukas Straub
2026-02-10 16:23 ` [PATCH v8 02/17] MAINTAINERS: Remove Hailiang Zhang from " Lukas Straub
2026-02-10 16:23 ` [PATCH v8 03/17] colo: Setup ram cache in normal migration path Lukas Straub
2026-02-10 16:23 ` [PATCH v8 04/17] colo: Replace migration_incoming_colo_enabled() with migrate_colo() Lukas Straub
2026-02-10 16:23 ` [PATCH v8 05/17] colo: Remove ENABLE_COLO savevm command and mark it as deprecated Lukas Straub
2026-02-10 17:00   ` Peter Xu
2026-02-10 16:23 ` [PATCH v8 06/17] ram: Remove colo special-casing Lukas Straub
2026-02-10 16:23 ` [PATCH v8 07/17] multifd: Move ram state receive into multifd_ram_state_recv() Lukas Straub
2026-02-10 16:23 ` [PATCH v8 08/17] multifd: Add COLO support Lukas Straub
2026-02-10 16:23 ` [PATCH v8 09/17] Call colo_release_ram_cache() after multifd threads terminate Lukas Straub
2026-02-10 16:23 ` [PATCH v8 10/17] colo: Fix crash during device vmstate load Lukas Straub
2026-02-10 16:23 ` [PATCH v8 11/17] colo: Hold the BQL while sending ram state Lukas Straub
2026-02-10 16:23 ` [PATCH v8 12/17] colo: Do not hold the BQL while receiving " Lukas Straub
2026-02-10 16:23 ` [PATCH v8 13/17] migration-test: Add COLO migration unit test Lukas Straub
2026-02-10 16:23 ` [PATCH v8 14/17] Convert colo main documentation to restructuredText Lukas Straub
2026-02-10 16:23 ` [PATCH v8 15/17] qemu-colo.rst: Miscellaneous changes Lukas Straub
2026-02-10 16:23 ` [PATCH v8 16/17] qemu-colo.rst: Add my copyright Lukas Straub
2026-02-10 16:23 ` [PATCH v8 17/17] qemu-colo.rst: Simplify the block replication setup Lukas Straub
2026-02-17 13:07   ` Fabiano Rosas [this message]
2026-02-17 13:07 ` [PATCH v8 00/17] migration: Add COLO multifd support and COLO migration unit test Fabiano Rosas
2026-02-17 14:14   ` Fabiano Rosas
2026-02-19 13:40     ` Lukas Straub

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=87h5rfmsby.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=lizhijian@fujitsu.com \
    --cc=lukasstraub2@web.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangckid@gmail.com \
    --cc=zhanghailiang@xfusion.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.