From nobody Mon Feb 9 10:48:29 2026 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.zohomail.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 1506002570949611.8754586164774; Thu, 21 Sep 2017 07:02:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5897FC047B9A; Thu, 21 Sep 2017 14:02:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01B575C8B2; Thu, 21 Sep 2017 14:02:49 +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 26EA73FAD0; Thu, 21 Sep 2017 14:02:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8LDdlEV032015 for ; Thu, 21 Sep 2017 09:39:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id C6D8E5D988; Thu, 21 Sep 2017 13:39:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2F0A5D986 for ; Thu, 21 Sep 2017 13:39:45 +0000 (UTC) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51DD1C0828AF for ; Thu, 21 Sep 2017 13:39:43 +0000 (UTC) Received: from dim-vz7.qa.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id v8LDde4l025773 for ; Thu, 21 Sep 2017 16:39:41 +0300 (MSK) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5897FC047B9A Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5897FC047B9A DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 51DD1C0828AF Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=virtuozzo.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nshirokovskiy@virtuozzo.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 51DD1C0828AF From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Thu, 21 Sep 2017 16:39:39 +0300 Message-Id: <1506001179-562177-3-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1506001179-562177-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1506001179-562177-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Delayed for 25:40:43 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 21 Sep 2017 13:39:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 21 Sep 2017 13:39:44 +0000 (UTC) for IP:'195.214.232.25' DOMAIN:'mailhub.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 195.214.232.25 mailhub.sw.ru 195.214.232.25 mailhub.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] qemu: don't update cpu unconditionally for migratable flag 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 21 Sep 2017 14:02:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Imagine if we use 'virsh dumpxml --migratable' for offline domain to get config to tweak before migration. Currenly cpu section will be expanded, host-cpu mode turns into custom and migration fails because of ABI check. Looks like ABI check does not make much sence for offline migration but we don't want host-cpu mode to turn into custom in the first place. Using --migratable is reasonable in this case because this flags makes changes for inactive configs too like removing automatically added parts that old versions can not handle. I suggest not to update cpu for inactive configs. This appoach is coherent with the way migration works for inactive configs in case it is not specified externally to migration: function qemuMigrationCookieXM= LFormat don't expand cpu too. Adding flag for active configs is useless because qemuDomainFormatXML will clear it in this case. Thus we can skip adding update flag altogether. --- I suppose next usage of libvirt in case one need to migrate with tweaked co= nfigs: inactive domain: virsh dumpxml DOM --migratable > dom.xml virsh migrate DOM --offline --persistent --xml dom.xml active domain: virsh dumpxml DOM --migratable > active.xml virsh dumpxml DOM --migratable --inactive > inactive.xml virsh migrate DOM --persistent --xml active.xml --persistent-xml inacti= ve.xml src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d9dff93..3223554 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6993,9 +6993,6 @@ static char if (qemuDomainUpdateCurrentMemorySize(driver, vm) < 0) goto cleanup; =20 - if ((flags & VIR_DOMAIN_XML_MIGRATABLE)) - flags |=3D VIR_DOMAIN_XML_UPDATE_CPU; - ret =3D qemuDomainFormatXML(driver, vm, flags); =20 cleanup: --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list