From nobody Thu Nov 21 17:48:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) 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 1731938444722719.4116276826962; Mon, 18 Nov 2024 06:00:44 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9D6471B27; Mon, 18 Nov 2024 09:00:43 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 181881B87; Mon, 18 Nov 2024 08:59:43 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 1544619FF; Mon, 18 Nov 2024 08:59:38 -0500 (EST) 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 874441A09 for ; Mon, 18 Nov 2024 08:59:37 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-PGbSmk9vPvyKqG6Urpbtbg-1; Mon, 18 Nov 2024 08:59:36 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37A851956048 for ; Mon, 18 Nov 2024 13:59:35 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5F8D91956056 for ; Mon, 18 Nov 2024 13:59:34 +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.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731938377; h=from:from: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; bh=QyaMLfkC65FI8EOLMJNx0WkEtiINyAwNuWSl6s5yTtc=; b=TIKKcpzOx4P1EV8eZZF3+iiEsNCD3UVQPBwBDSyhI9sdtCzEWHDu7ywPnFTHAoT3miKrIj 4JozOoAjw1GhMsRE9zAl1PPv2l/qZCxaWqM40SGLR58mH+jit2xS1pmhwxlKzjdH9jseqL s4aIWnJ1U0lvqgP+mF/RiKyOqSNbQ/U= X-MC-Unique: PGbSmk9vPvyKqG6Urpbtbg-1 X-Mimecast-MFC-AGG-ID: PGbSmk9vPvyKqG6Urpbtbg From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 2/3] API: migration: Warn about use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DEST_XML Date: Mon, 18 Nov 2024 14:59:28 +0100 Message-ID: <6e2922dcbd72a1493dd8b87a60eddc297dca69ed.1731938316.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: eGrEBoTdHpwRTQ4oX8EqmDgdROBtjcvzgOSq6--iBMk_1731938375 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CKLIJERF6X3AWBMD2JSWISFZDWKPPZMN X-Message-ID-Hash: CKLIJERF6X3AWBMD2JSWISFZDWKPPZMN X-MailFrom: pkrempa@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-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1731938445783116600 Content-Type: text/plain; charset="utf-8" When a VM is being migrated to a destination host it can be made persistent on the destination by using VIR_MIGRATE_PERSIST_DEST. That may not work as intended if VIR_MIGRATE_PARAM_DEST_XML or the 'xmlin' parameter is used as that allows overriding certain aspects of the VM xml, but does not involve the persistent definition. In most cases users will need to supply also VIR_MIGRATE_PARAM_PERSIST_XML with the same set of modification. Modify the man page to clarify the above so that users don't end up with broken VM after migrating and restarting it. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 9232ce2e6b..d4f1573954 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -929,6 +929,19 @@ typedef enum { * VIR_MIGRATE_UNDEFINE_SOURCE is not used, it will end up persistent = on * both hosts. * + * Note: If VIR_MIGRATE_PERSIST_DEST flag is used together with the + * VIR_MIGRATE_PARAM_DEST_XML migration parameter which supplies= an + * updated definition for the destination host it's required to + * supply also VIR_MIGRATE_PARAM_PERSIST_XML updated the same wa= y. + * Otherwise the persistent definition on the destination will n= ot + * contain the updates. + * + * The VIR_MIGRATE_PERSIST_DEST flag should not be used with the + * "xmlin" parameter of older APIs as that way an updated persis= tent + * XML can't be supplied and thus the persistent definition will + * likely be incorrect as it will be based on the persistent def= inition + * on the source of the migration. + * * Since: 0.7.3 */ VIR_MIGRATE_PERSIST_DEST =3D (1 << 3), --=20 2.47.0