From nobody Mon Feb 9 09:08:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1691590501; cv=none; d=zohomail.com; s=zohoarc; b=lL3O3rl7VtMakTjeQVjEpBSmEkHaFqIiQQaf9Exex2FIr4SDzuLQXh3wPyOIpm1xde4KEIXg6W0ufTSGDAE9SzCvuR9bqXM64cuI8YzBZUXzXO0MR50kjR5hm+WV4KWLMOMgz6hB/p5Qoq2pkis16Jy5R8KOaElQyjfZ44TEubY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691590501; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lAz7LbL3XqICdqcGsM8kygySpp1kqddqLCK2Vy1m/1w=; b=MpSfMR5d04ZN3BdFv1vricAsFIF2FiAlucrvkjApqqMEfnMIh0NIyTT5rsB5RCX5wb3a2iEZZK5OrgSrzv1vjjswZ011gLDipCH7UD3qIN+g8DgD1BUXL2KSg3g8q10UAAG0fU1fBOza6sgkiqzEGVGPsCqVH3/8ESekIa484dw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1691590501417550.3708897152574; Wed, 9 Aug 2023 07:15:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-248-Gr67JakpOHqBQOc0kqfpkg-1; Wed, 09 Aug 2023 10:14:54 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 734F7185A7A4; Wed, 9 Aug 2023 14:14:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6164440D2839; Wed, 9 Aug 2023 14:14:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 43B321946589; Wed, 9 Aug 2023 14:14:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9651319465B1 for ; Wed, 9 Aug 2023 14:14:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 351BD4021AD; Wed, 9 Aug 2023 14:14:28 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABA0F401E30 for ; Wed, 9 Aug 2023 14:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691590500; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lAz7LbL3XqICdqcGsM8kygySpp1kqddqLCK2Vy1m/1w=; b=FyO9zCLq1k6qLQby3Jr9cZC3593Tr8bH3HQuYP84j75SQSuATBAY4iaZkaV5YLzhTpkxtB NicSf4NsYv5Mhn+h7puLkUcUw99PPo2KpXm1ERsi5XwktIWYW7tuLM0E4aXvf5zac4RS/s Z40kHuI7Ta18T6FRucgtJ7z/5tSU8wI= X-MC-Unique: Gr67JakpOHqBQOc0kqfpkg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/4] virsh: doMigrate: Require --copy-storage-(all|inc) with --migrate-disks Date: Wed, 9 Aug 2023 16:14:23 +0200 Message-ID: <42f21fdf8640975b7e60dd647799564e7f5814ae.1691590343.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1691590557341100001 Content-Type: text/plain; charset="utf-8" Users need to enable non-shared-storage migration, otherwise the disks specified via '--migrate-disks' will be ignored. Add an error message to inform the users of their wrong config. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tools/virsh-domain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 84bf62057b..e0776c991f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11204,6 +11204,11 @@ doMigrate(void *opaque) if (opt) { g_autofree char **val =3D NULL; + if (!(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARE= D_INC))) { + vshError(ctl, "'--migrate-disks' requires one of '--copy-stora= ge-all', '--copy-storage-inc'"); + goto out; + } + val =3D g_strsplit(opt, ",", 0); if (virTypedParamsAddStringList(¶ms, --=20 2.41.0