From nobody Fri May 16 08:44:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496824755839852.8626660351512; Wed, 7 Jun 2017 01:39:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5DDF0C0587EB; Wed, 7 Jun 2017 08:39:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D4D918364; Wed, 7 Jun 2017 08:39:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4E6011869FEF; Wed, 7 Jun 2017 08:38:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v578brJT004882 for ; Wed, 7 Jun 2017 04:37:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4B0C317A61; Wed, 7 Jun 2017 08:37:53 +0000 (UTC) Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F18F17997 for ; Wed, 7 Jun 2017 08:37:52 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 942F810193C; Wed, 7 Jun 2017 10:37:46 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5DDF0C0587EB Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5DDF0C0587EB From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 7 Jun 2017 10:37:42 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 17/20] qemu: Always send persistent XML during migration X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 07 Jun 2017 08:39:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When persistent migration of a transient domain is requested but no custom XML is passed to the migration API we would just let the destination daemon make a persistent definition from the live definition itself. This is not a problem now, but once the destination daemon starts replacing the original CPU definition with the one from migration cookie before starting a domain, it would need to add more ugly hacks to reverse the operation. Let's just always send the persistent definition in the cookie to make things a bit cleaner. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch (separated from the original 13/15) src/qemu/qemu_migration.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2cd862875..40564ac63 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3644,8 +3644,9 @@ qemuMigrationRun(virQEMUDriverPtr driver, if (!(persistDef =3D qemuMigrationPrepareDef(driver, persist_x= ml, NULL, NULL))) goto cleanup; - } else if (vm->newDef) { - if (!(persistDef =3D qemuDomainDefCopy(driver, vm->newDef, + } else { + virDomainDefPtr def =3D vm->newDef ? vm->newDef : vm->def; + if (!(persistDef =3D qemuDomainDefCopy(driver, def, VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_MIGRATABLE= ))) goto cleanup; --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list