From nobody Tue Feb 10 05:44:13 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1698772614664258.7008429011172; Tue, 31 Oct 2023 10:16:54 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 987BA1793; Tue, 31 Oct 2023 13:16:53 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 08EE917D3; Tue, 31 Oct 2023 13:13:45 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2F47117B1; Tue, 31 Oct 2023 13:13:33 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 75B081769 for ; Tue, 31 Oct 2023 13:13:09 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-m5lNw21eOUKxeQq_hIiNow-1; Tue, 31 Oct 2023 13:13:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35899892248 for ; Tue, 31 Oct 2023 17:13:07 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.224.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80ACF40C6EBE for ; Tue, 31 Oct 2023 17:13:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: m5lNw21eOUKxeQq_hIiNow-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [libvirt PATCH 3/3] virsh: Wire up VIR_MIGRATE_ASSUME_SHARED_STORAGE support Date: Tue, 31 Oct 2023 18:13:00 +0100 Message-ID: <20231031171300.139023-4-abologna@redhat.com> In-Reply-To: <20231031171300.139023-1-abologna@redhat.com> References: <20231031171300.139023-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GQDAE7VJQPIAYLMHOTUUSVHU547IAC5E X-Message-ID-Hash: GQDAE7VJQPIAYLMHOTUUSVHU547IAC5E X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZM-MESSAGEID: 1698772615462100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani --- docs/manpages/virsh.rst | 5 ++++- tools/virsh-domain.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 3e7a4c6c22..849933fa2e 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3382,6 +3382,7 @@ migrate [--parallel [--parallel-connections connections]] [--bandwidth bandwidth] [--tls-destination hostname] [--disks-uri URI] [--copy-storage-synchronous-writes] + [--assume-shared-storage] =20 Migrate domain to another host. Add *--live* for live migration; <--p2p> for peer-2-peer migration; *--direct* for direct migration; or *--tunnelle= d* @@ -3461,7 +3462,9 @@ considered unsafe. For QEMU domain, this may happen i= f the domain uses disks without explicitly setting cache mode to "none". Migrating such domains is unsafe unless the disk images are stored on coherent clustered filesystem, such as GFS2 or GPFS. If you are sure the migration is safe or you just do= not -care, use *--unsafe* to force the migration. +care, use *--unsafe* to force the migration. *--assume-shared-storage* is a +weaker version of *--unsafe* which allows migration if the source disk is +detected as local while retaining all other checks. =20 *dname* is used for renaming the domain to new name during migration, which also usually can be omitted. Likewise, *--xml* ``file`` is usually diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 66f933dead..cccf079c34 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11128,6 +11128,10 @@ static const vshCmdOptDef opts_migrate[] =3D { .type =3D VSH_OT_INT, .help =3D N_("compress level for zstd compression") }, + {.name =3D "assume-shared-storage", + .type =3D VSH_OT_BOOL, + .help =3D N_("assume that disk storage is shared even if libvirt dete= cts it as local") + }, {.name =3D NULL} }; =20 @@ -11177,6 +11181,7 @@ doMigrate(void *opaque) { "tls", VIR_MIGRATE_TLS }, { "parallel", VIR_MIGRATE_PARALLEL }, { "suspend", VIR_MIGRATE_PAUSED }, + { "assume-shared-storage", VIR_MIGRATE_ASSUME_SHARED_STORAGE }, }; =20 #ifndef WIN32 --=20 2.41.0