From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528044363108.74030096049796; Mon, 23 Apr 2018 17:00:44 -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 E04DC3680B; Tue, 24 Apr 2018 00:00:39 +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 45AB882C7B; Tue, 24 Apr 2018 00:00:39 +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 4F49E18033EB; Tue, 24 Apr 2018 00:00:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00Xrx001126 for ; Mon, 23 Apr 2018 20:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id F0DB518B07; Tue, 24 Apr 2018 00:00:32 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADC6018A6F for ; Tue, 24 Apr 2018 00:00:32 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 19:59:55 -0400 Message-Id: <20180424000005.689-2-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 01/11] Check return status for virUUIDGenerate 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.30]); Tue, 24 Apr 2018 00:00:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Although legal, a few paths were not checking a return value < 0 for failure instead they checked a non zero failure. Clean them all up to be consistent. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 2 +- src/conf/network_conf.c | 2 +- src/conf/secret_conf.c | 2 +- src/openvz/openvz_conf.c | 2 +- src/xenconfig/xen_common.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 65b429460a..dacf888565 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18778,7 +18778,7 @@ virDomainDefParseXML(xmlDocPtr xml, * also serve as the uuid. */ tmp =3D virXPathString("string(./uuid[1])", ctxt); if (!tmp) { - if (virUUIDGenerate(def->uuid)) { + if (virUUIDGenerate(def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to generate UUID")); goto error; diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 54109a3d2e..630a87fc07 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1619,7 +1619,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt) /* Extract network uuid */ tmp =3D virXPathString("string(./uuid[1])", ctxt); if (!tmp) { - if (virUUIDGenerate(def->uuid)) { + if (virUUIDGenerate(def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to generate UUID")); goto error; diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 989705234c..7a2e4b28aa 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -177,7 +177,7 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root) =20 uuidstr =3D virXPathString("string(./uuid)", ctxt); if (!uuidstr) { - if (virUUIDGenerate(def->uuid)) { + if (virUUIDGenerate(def->uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to generate UUID")); goto cleanup; diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index a25eaf570e..72ef63a355 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -1019,7 +1019,7 @@ openvzSetUUID(int vpsid) { unsigned char uuid[VIR_UUID_BUFLEN]; =20 - if (virUUIDGenerate(uuid)) { + if (virUUIDGenerate(uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to generate UUID")); return -1; diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index bc43185363..7db365f363 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -202,7 +202,7 @@ xenConfigGetUUID(virConfPtr conf, const char *name, uns= igned char *uuid) } =20 if (!(val =3D virConfGetValue(conf, name))) { - if (virUUIDGenerate(uuid)) { + if (virUUIDGenerate(uuid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to generate UUID")); return -1; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528044767220.29422338019958; Mon, 23 Apr 2018 17:00:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B4A3A85A02; Tue, 24 Apr 2018 00:00:40 +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 0318267E6B; Tue, 24 Apr 2018 00:00:40 +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 A5BCD4CAA2; Tue, 24 Apr 2018 00:00:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00XcU001131 for ; Mon, 23 Apr 2018 20:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C20518B0C; Tue, 24 Apr 2018 00:00:33 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2798D18A55 for ; Tue, 24 Apr 2018 00:00:33 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 19:59:56 -0400 Message-Id: <20180424000005.689-3-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 02/11] conf: Modify last arg to virDomainDefCopy 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 24 Apr 2018 00:00:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rather than single boolean, let's create a virDomainDefCopyFlags and have the last argument be an unsigned int using the new VIR_DOMAIN_DEF_COPY_MIGRATABLE bit. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 8 ++++---- src/conf/domain_conf.h | 6 +++++- src/libxl/libxl_domain.c | 4 ++-- src/qemu/qemu_domain.c | 5 +++-- src/qemu/qemu_driver.c | 5 +++-- src/test/test_driver.c | 5 +++-- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dacf888565..1411034e7c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3315,7 +3315,7 @@ virDomainObjSetDefTransient(virCapsPtr caps, if (domain->newDef) return 0; =20 - if (!(domain->newDef =3D virDomainDefCopy(domain->def, caps, xmlopt, N= ULL, false))) + if (!(domain->newDef =3D virDomainDefCopy(domain->def, caps, xmlopt, N= ULL, 0))) goto out; =20 ret =3D 0; @@ -27892,7 +27892,7 @@ virDomainDefCopy(virDomainDefPtr src, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, void *parseOpaque, - bool migratable) + unsigned int flags) { char *xml; virDomainDefPtr ret; @@ -27900,7 +27900,7 @@ virDomainDefCopy(virDomainDefPtr src, unsigned int parse_flags =3D VIR_DOMAIN_DEF_PARSE_INACTIVE | VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE; =20 - if (migratable) + if (flags & VIR_DOMAIN_DEF_COPY_MIGRATABLE) format_flags |=3D VIR_DOMAIN_DEF_FORMAT_INACTIVE | VIR_DOMAIN_DEF_= FORMAT_MIGRATABLE; =20 /* Easiest to clone via a round-trip through XML. */ @@ -27921,7 +27921,7 @@ virDomainObjCopyPersistentDef(virDomainObjPtr dom, virDomainDefPtr cur; =20 cur =3D virDomainObjGetPersistentDef(caps, xmlopt, dom); - return virDomainDefCopy(cur, caps, xmlopt, NULL, false); + return virDomainDefCopy(cur, caps, xmlopt, NULL, 0); } =20 =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3c7eccb8ca..99d1aa529a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2867,11 +2867,15 @@ virDomainDefPtr virDomainObjGetOneDefState(virDomai= nObjPtr vm, bool *state); virDomainDefPtr virDomainObjGetOneDef(virDomainObjPtr vm, unsigned int fla= gs); =20 +typedef enum { + /* Set when creating a copy of a definition for the purpose of migrati= on */ + VIR_DOMAIN_DEF_COPY_MIGRATABLE =3D 1 << 0, +} virDomainDefCopyFlags; virDomainDefPtr virDomainDefCopy(virDomainDefPtr src, virCapsPtr caps, virDomainXMLOptionPtr xmlopt, void *parseOpaque, - bool migratable); + unsigned int flags); virDomainDefPtr virDomainObjCopyPersistentDef(virDomainObjPtr dom, virCapsPtr caps, virDomainXMLOptionPtr xmlopt= ); diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index d4859d6707..126d08b499 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1450,8 +1450,8 @@ libxlDomainDefCheckABIStability(libxlDriverPrivatePtr= driver, libxlDriverConfigPtr cfg =3D libxlDriverConfigGet(driver); bool ret =3D false; =20 - if (!(migratableDefSrc =3D virDomainDefCopy(src, cfg->caps, driver->xm= lopt, NULL, true)) || - !(migratableDefDst =3D virDomainDefCopy(dst, cfg->caps, driver->xm= lopt, NULL, true))) + if (!(migratableDefSrc =3D virDomainDefCopy(src, cfg->caps, driver->xm= lopt, NULL, VIR_DOMAIN_DEF_COPY_MIGRATABLE)) || + !(migratableDefDst =3D virDomainDefCopy(dst, cfg->caps, driver->xm= lopt, NULL, VIR_DOMAIN_DEF_COPY_MIGRATABLE))) goto cleanup; =20 ret =3D virDomainDefCheckABIStability(migratableDefSrc, diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 326c939c85..ed7bd0230e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6198,6 +6198,8 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr drive= r, virDomainDefPtr copy =3D NULL; virCapsPtr caps =3D NULL; virQEMUCapsPtr qemuCaps =3D NULL; + unsigned int copyFlags =3D (flags & VIR_DOMAIN_XML_MIGRATABLE) ? + VIR_DOMAIN_DEF_COPY_MIGRATABLE : 0; =20 if (!(caps =3D virQEMUDriverGetCapabilities(driver, false))) goto cleanup; @@ -6205,8 +6207,7 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr drive= r, if (!(flags & (VIR_DOMAIN_XML_UPDATE_CPU | VIR_DOMAIN_XML_MIGRATABLE))) goto format; =20 - if (!(copy =3D virDomainDefCopy(def, caps, driver->xmlopt, NULL, - flags & VIR_DOMAIN_XML_MIGRATABLE))) + if (!(copy =3D virDomainDefCopy(def, caps, driver->xmlopt, NULL, copyF= lags))) goto cleanup; =20 def =3D copy; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7484b00e23..2863508189 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15857,7 +15857,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, snap->def->current =3D true; if (snap->def->dom) { config =3D virDomainDefCopy(snap->def->dom, caps, - driver->xmlopt, NULL, true); + driver->xmlopt, NULL, + VIR_DOMAIN_DEF_COPY_MIGRATABLE); if (!config) goto endjob; } @@ -20443,7 +20444,7 @@ qemuDomainGetFSInfo(virDomainPtr dom, if (!(caps =3D virQEMUDriverGetCapabilities(driver, false))) goto endjob; =20 - if (!(def =3D virDomainDefCopy(vm->def, caps, driver->xmlopt, NULL, fa= lse))) + if (!(def =3D virDomainDefCopy(vm->def, caps, driver->xmlopt, NULL, 0)= )) goto endjob; =20 agent =3D qemuDomainObjEnterAgent(vm); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a1888c0c9f..8877a467f6 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -6434,7 +6434,7 @@ testDomainSnapshotCreateXML(virDomainPtr domain, privconn->caps, privconn->xmlopt, NULL, - true))) + VIR_DOMAIN_DEF_COPY_MIGRATABLE))) goto cleanup; =20 if (testDomainSnapshotAlignDisks(vm, def, flags) < 0) @@ -6689,7 +6689,8 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snaps= hot, =20 snap->def->current =3D true; config =3D virDomainDefCopy(snap->def->dom, privconn->caps, - privconn->xmlopt, NULL, true); + privconn->xmlopt, NULL, + VIR_DOMAIN_DEF_COPY_MIGRATABLE); if (!config) goto cleanup; =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528062994819.6583194676815; Mon, 23 Apr 2018 17:01:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B79C3DE3D; Tue, 24 Apr 2018 00:01:01 +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 A0BAE6DAF7; Tue, 24 Apr 2018 00:01:00 +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 F1EE31805972; Tue, 24 Apr 2018 00:00:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00Ydg001137 for ; Mon, 23 Apr 2018 20:00:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E26A18A55; Tue, 24 Apr 2018 00:00:34 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB81166D40 for ; Tue, 24 Apr 2018 00:00:33 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 19:59:57 -0400 Message-Id: <20180424000005.689-4-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 03/11] qemu: Add flags to qemuDomainMigratableDefCheckABIStability 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 24 Apr 2018 00:01:02 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow the caller to qemuDomainMigratableDefCheckABIStability to also provide a flag to be used for virDomainDefCheckABIStabilityFlags. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 18 ++++++++++++------ src/qemu/qemu_domain.h | 6 ++++-- src/qemu/qemu_driver.c | 7 ++++--- src/qemu/qemu_migration.c | 4 ++-- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ed7bd0230e..f584768895 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8013,12 +8013,14 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDri= verPtr driver, virDomainDefPtr src, virDomainDefPtr migratableSrc, virDomainDefPtr dst, - virDomainDefPtr migratableDst) + virDomainDefPtr migratableDst, + unsigned flags) { + flags |=3D VIR_DOMAIN_DEF_ABI_CHECK_SKIP_VOLATILE; if (!virDomainDefCheckABIStabilityFlags(migratableSrc, migratableDst, driver->xmlopt, - VIR_DOMAIN_DEF_ABI_CHECK_SKIP_= VOLATILE)) + flags)) return false; =20 /* Force update any skipped values from the volatile flag */ @@ -8034,7 +8036,8 @@ qemuDomainMigratableDefCheckABIStability(virQEMUDrive= rPtr driver, bool qemuDomainDefCheckABIStability(virQEMUDriverPtr driver, virDomainDefPtr src, - virDomainDefPtr dst) + virDomainDefPtr dst, + unsigned int flags) { virDomainDefPtr migratableDefSrc =3D NULL; virDomainDefPtr migratableDefDst =3D NULL; @@ -8046,7 +8049,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr drive= r, =20 ret =3D qemuDomainMigratableDefCheckABIStability(driver, src, migratableDefSrc, - dst, migratableDefDst); + dst, migratableDefDst, + flags); =20 cleanup: virDomainDefFree(migratableDefSrc); @@ -8058,7 +8062,8 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr drive= r, bool qemuDomainCheckABIStability(virQEMUDriverPtr driver, virDomainObjPtr vm, - virDomainDefPtr dst) + virDomainDefPtr dst, + unsigned int flags) { virDomainDefPtr migratableSrc =3D NULL; virDomainDefPtr migratableDst =3D NULL; @@ -8072,7 +8077,8 @@ qemuDomainCheckABIStability(virQEMUDriverPtr driver, =20 ret =3D qemuDomainMigratableDefCheckABIStability(driver, vm->def, migratableSrc, - dst, migratableDst); + dst, migratableDst, + flags); =20 cleanup: VIR_FREE(xml); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 2c27dfb9f3..789e7b403c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -719,11 +719,13 @@ int qemuDomainUpdateMemoryDeviceInfo(virQEMUDriverPtr= driver, =20 bool qemuDomainDefCheckABIStability(virQEMUDriverPtr driver, virDomainDefPtr src, - virDomainDefPtr dst); + virDomainDefPtr dst, + unsigned int flags); =20 bool qemuDomainCheckABIStability(virQEMUDriverPtr driver, virDomainObjPtr vm, - virDomainDefPtr dst); + virDomainDefPtr dst, + unsigned int flags); =20 bool qemuDomainAgentAvailable(virDomainObjPtr vm, bool reportError); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2863508189..61e49bea24 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3366,7 +3366,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, VIR_DOMAIN_DEF_PARSE_SKIP_VALI= DATE))) { goto endjob; } - if (!qemuDomainCheckABIStability(driver, vm, def)) { + if (!qemuDomainCheckABIStability(driver, vm, def, 0)) { virDomainDefFree(def); goto endjob; } @@ -15893,9 +15893,10 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sn= apshot, goto endjob; =20 compatible =3D qemuDomainDefCheckABIStability(driver, = vm->def, - config); + config, 0); } else { - compatible =3D qemuDomainCheckABIStability(driver, vm,= config); + compatible =3D qemuDomainCheckABIStability(driver, vm,= config, + 0); } =20 if (!compatible) { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 88b8253fa9..e1aa3a3368 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1954,7 +1954,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver, VIR_DOMAIN_DEF_PARSE_SKIP_VALI= DATE))) goto cleanup; =20 - if (!qemuDomainCheckABIStability(driver, vm, def)) + if (!qemuDomainCheckABIStability(driver, vm, def, 0)) goto cleanup; =20 rv =3D qemuDomainDefFormatLive(driver, def, NULL, false, true); @@ -2258,7 +2258,7 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, if (!newdef) goto cleanup; =20 - if (!qemuDomainDefCheckABIStability(driver, *def, newdef))= { + if (!qemuDomainDefCheckABIStability(driver, *def, newdef, = 0)) { virDomainDefFree(newdef); goto cleanup; } --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152452806161360.86367184883761; Mon, 23 Apr 2018 17:01:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6C4930015C6; Tue, 24 Apr 2018 00:00:59 +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 8A44F6B244; Tue, 24 Apr 2018 00:00:59 +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 0F7D04CAA6; Tue, 24 Apr 2018 00:00:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00bNQ001151 for ; Mon, 23 Apr 2018 20:00:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3744F18A55; Tue, 24 Apr 2018 00:00:37 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E968E18B0A for ; Tue, 24 Apr 2018 00:00:34 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 19:59:58 -0400 Message-Id: <20180424000005.689-5-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 04/11] conf: Add VM Generation ID to virDomainDef 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 24 Apr 2018 00:01:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a genid[] field to be able to store a uuid-like GUID value. Also add associated bool's to support VM Generation ID operation. Signed-off-by: John Ferlan --- src/conf/domain_conf.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 99d1aa529a..1b61fd8c03 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2325,6 +2325,11 @@ struct _virDomainDef { virDomainVirtType virtType; int id; unsigned char uuid[VIR_UUID_BUFLEN]; + + unsigned char genid[VIR_UUID_BUFLEN]; + bool genidRequested; + bool genidGenerated; + char *name; char *title; char *description; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528074364644.2688180573499; Mon, 23 Apr 2018 17:01:14 -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 65B69BDD4; Tue, 24 Apr 2018 00:01:12 +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 11DDF74952; Tue, 24 Apr 2018 00:01:12 +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 6F7F94CAA9; Tue, 24 Apr 2018 00:01:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00bNe001156 for ; Mon, 23 Apr 2018 20:00:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id A1CD518A67; Tue, 24 Apr 2018 00:00:37 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FF1218A55 for ; Tue, 24 Apr 2018 00:00:37 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 19:59:59 -0400 Message-Id: <20180424000005.689-6-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 05/11] conf: Add flag to regenerate genid for virDomainDefCopy 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.29]); Tue, 24 Apr 2018 00:01:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the VIR_DOMAIN_DEF_COPY_NEWGENID to indicate that the generated domain definition should adjust the genid value before returning the @def to the caller. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 12 ++++++++++++ src/conf/domain_conf.h | 5 +++++ src/qemu/qemu_driver.c | 3 ++- src/test/test_driver.c | 3 ++- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1411034e7c..6d4db50998 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27909,6 +27909,18 @@ virDomainDefCopy(virDomainDefPtr src, =20 ret =3D virDomainDefParseString(xml, caps, xmlopt, parseOpaque, parse_= flags); =20 + /* If we have a genid and we're being called from a path that would + * require a different genid value, then regardless of whether it was + * generated or not generate a new one. */ + if (ret && ret->genidRequested && (flags & VIR_DOMAIN_DEF_COPY_NEWGENI= D)) { + if (virUUIDGenerate(ret->genid)) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Failed to generate a new genid")); + virDomainDefFree(ret); + ret =3D NULL; + } + } + VIR_FREE(xml); return ret; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 1b61fd8c03..910b3ca4d1 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2875,6 +2875,11 @@ virDomainDefPtr virDomainObjGetOneDef(virDomainObjPt= r vm, unsigned int flags); typedef enum { /* Set when creating a copy of a definition for the purpose of migrati= on */ VIR_DOMAIN_DEF_COPY_MIGRATABLE =3D 1 << 0, + + /* Set when the copy should create a new genid value if supported + * the domain def. + */ + VIR_DOMAIN_DEF_COPY_NEWGENID =3D 1 << 1, } virDomainDefCopyFlags; virDomainDefPtr virDomainDefCopy(virDomainDefPtr src, virCapsPtr caps, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 61e49bea24..bfb7973100 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15858,7 +15858,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, if (snap->def->dom) { config =3D virDomainDefCopy(snap->def->dom, caps, driver->xmlopt, NULL, - VIR_DOMAIN_DEF_COPY_MIGRATABLE); + VIR_DOMAIN_DEF_COPY_MIGRATABLE | + VIR_DOMAIN_DEF_COPY_NEWGENID); if (!config) goto endjob; } diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 8877a467f6..7bac017e1a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -6690,7 +6690,8 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snaps= hot, snap->def->current =3D true; config =3D virDomainDefCopy(snap->def->dom, privconn->caps, privconn->xmlopt, NULL, - VIR_DOMAIN_DEF_COPY_MIGRATABLE); + VIR_DOMAIN_DEF_COPY_MIGRATABLE | + VIR_DOMAIN_DEF_COPY_NEWGENID); if (!config) goto cleanup; =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528062848398.4214918774418; Mon, 23 Apr 2018 17:01:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDE228762E; Tue, 24 Apr 2018 00:01:00 +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 6E27D18B02; Tue, 24 Apr 2018 00:01:00 +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 DC16218033EB; Tue, 24 Apr 2018 00:00:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00cGE001161 for ; Mon, 23 Apr 2018 20:00:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2EE3418B0A; Tue, 24 Apr 2018 00:00:38 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id CAC4918A55 for ; Tue, 24 Apr 2018 00:00:37 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:00 -0400 Message-Id: <20180424000005.689-7-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 06/11] conf: Add VM Generation ID parse/format support 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 24 Apr 2018 00:01:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The VM Generation ID is a mechanism to provide a unique 128-bit, cryptographically random, and integer value identifier known as the GUID (Globally Unique Identifier) to the guest OS. The value is used to help notify the guest operating system when the virtual machine is executed with a different configuration. This patch adds support for a new "genid" XML element similar to the "uuid" element. The "genid" element can have two forms "" or "$GUID". If the $GUID is not provided, libvirt will generate one. For the ABI checks add avoidance for the genid comparison if the appropriate flag is set. Since adding support for a generated GUID (or UUID like) value to be displayed only for an active guest, modifying the xml2xml test to include virrandommock.so is necessary since it will generate a "known" UUID value that can be compared against for the active test. Signed-off-by: John Ferlan --- docs/formatdomain.html.in | 29 ++++++++++++ docs/schemas/domaincommon.rng | 8 ++++ src/conf/domain_conf.c | 59 ++++++++++++++++++++= ++++ src/conf/domain_conf.h | 3 ++ tests/qemuxml2argvdata/genid-auto.xml | 32 +++++++++++++ tests/qemuxml2argvdata/genid.xml | 32 +++++++++++++ tests/qemuxml2xmloutdata/genid-active.xml | 32 +++++++++++++ tests/qemuxml2xmloutdata/genid-auto-active.xml | 32 +++++++++++++ tests/qemuxml2xmloutdata/genid-auto-inactive.xml | 32 +++++++++++++ tests/qemuxml2xmloutdata/genid-inactive.xml | 32 +++++++++++++ tests/qemuxml2xmltest.c | 5 +- 11 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/genid-auto.xml create mode 100644 tests/qemuxml2argvdata/genid.xml create mode 100644 tests/qemuxml2xmloutdata/genid-active.xml create mode 100644 tests/qemuxml2xmloutdata/genid-auto-active.xml create mode 100644 tests/qemuxml2xmloutdata/genid-auto-inactive.xml create mode 100644 tests/qemuxml2xmloutdata/genid-inactive.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index ada0df227f..6a140f3e40 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -34,6 +34,7 @@ <domain type=3D'kvm' id=3D'1'> <name>MyGuest</name> <uuid>4dea22b3-1d52-d8f3-2516-782e98ab3fa0</uuid> + <genid>43dc0cf8-809b-4adb-9bea-a9abb5f3d90e</genid> <title>A short description - title - of the domain</title> <description>Some human readable description</description> <metadata> @@ -61,6 +62,34 @@ specification. Since 0.0.1, sysinfo since 0.8.7 =20 +
genid
+
Since 4.3.0, the genid + element can be used to add a Virtual Machine Generation ID which + exposes a 128-bit, cryptographically random, integer value identif= ier, + referred to as a Globally Unique Identifier (GUID) using the same + format as the uuid. The value is used to help notify + the guest operating system when the virtual machine is executed + with a different configuration, such as: + +
    +
  • snapshot execution
  • +
  • backup recovery
  • +
  • failover in a disaster recovery environment
  • +
  • creation from template (import, copy, clone)
  • +
+ + The guest operating system notices the change and is then able to + react as appropriate by marking its copies of distributed databases + as dirty, re-initializing its random number generator, etc. + +

+ When a GUID value is not provided, e.g. using the XML syntax + <genid/>, then libvirt will automatically generate a GUID. + This is the recommended configuration since the hypervisor then + can handle changing the GUID value for specific state transitions. + Using a static GUID value may result in failures for starting from + snapshot, restoring from backup, starting a cloned domain, etc.

+
title
The optional element title provides space for a short description of the domain. The title should not contain diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4cab55f05d..1892a7c63c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -502,6 +502,14 @@ + + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6d4db50998..8c30adf850 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18793,6 +18793,34 @@ virDomainDefParseXML(xmlDocPtr xml, VIR_FREE(tmp); } =20 + /* Extract domain genid - a genid can either be provided or generated = */ + if ((n =3D virXPathNodeSet("./genid", ctxt, &nodes)) < 0) + goto error; + + if (n > 0) { + if (n !=3D 1) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("element 'genid' can only appear once")); + goto error; + } + def->genidRequested =3D true; + if (!(tmp =3D virXPathString("string(./genid[1])", ctxt))) { + if (virUUIDGenerate(def->genid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Failed to generate genid")); + goto error; + } + def->genidGenerated =3D true; + } else { + if (virUUIDParse(tmp, def->genid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("malformed genid element")); + goto error; + } + } + } + VIR_FREE(nodes); + /* Extract short description of domain (title) */ def->title =3D virXPathString("string(./title[1])", ctxt); if (def->title && strchr(def->title, '\n')) { @@ -21904,6 +21932,26 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr= src, goto error; } =20 + if (src->genidRequested !=3D dst->genidRequested) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Target domain requested genid does not match sou= rce")); + goto error; + } + + if (src->genidRequested && + !(flags & VIR_DOMAIN_DEF_ABI_CHECK_SKIP_GENID) && + memcmp(src->genid, dst->genid, VIR_UUID_BUFLEN) !=3D 0) { + char guidsrc[VIR_UUID_STRING_BUFLEN]; + char guiddst[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(src->genid, guidsrc); + virUUIDFormat(dst->genid, guiddst); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target domain genid %s does not match source %s"= ), + guiddst, guidsrc); + goto error; + } + /* Not strictly ABI related, but we want to make sure domains * don't get silently re-named through the backdoor when passing * custom XML into various APIs, since this would create havoc @@ -26541,6 +26589,17 @@ virDomainDefFormatInternal(virDomainDefPtr def, virUUIDFormat(uuid, uuidstr); virBufferAsprintf(buf, "%s\n", uuidstr); =20 + if (def->genidRequested) { + char genidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(def->genid, genidstr); + if (!def->genidGenerated || + !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)) + virBufferAsprintf(buf, "%s\n", genidstr); + else + virBufferAddLit(buf, "\n"); + } + virBufferEscapeString(buf, "%s\n", def->title); =20 virBufferEscapeString(buf, "%s\n", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 910b3ca4d1..e9248a34c2 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2952,6 +2952,9 @@ typedef enum { /* Set when domain lock must be released and there exists the possibil= ity * that some external action could alter the value, such as cur_balloo= n. */ VIR_DOMAIN_DEF_ABI_CHECK_SKIP_VOLATILE =3D 1 << 0, + + /* Set when the ABI check should skip the genid comparison */ + VIR_DOMAIN_DEF_ABI_CHECK_SKIP_GENID =3D 1 << 1, } virDomainDefABICheckFlags; =20 virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr, diff --git a/tests/qemuxml2argvdata/genid-auto.xml b/tests/qemuxml2argvdata= /genid-auto.xml new file mode 100644 index 0000000000..96ad9ddda8 --- /dev/null +++ b/tests/qemuxml2argvdata/genid-auto.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2argvdata/genid.xml b/tests/qemuxml2argvdata/geni= d.xml new file mode 100644 index 0000000000..fc41f2dd28 --- /dev/null +++ b/tests/qemuxml2argvdata/genid.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + e9392370-2917-565e-692b-d057f46512d6 + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmloutdata/genid-active.xml b/tests/qemuxml2xmlo= utdata/genid-active.xml new file mode 100644 index 0000000000..fc41f2dd28 --- /dev/null +++ b/tests/qemuxml2xmloutdata/genid-active.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + e9392370-2917-565e-692b-d057f46512d6 + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmloutdata/genid-auto-active.xml b/tests/qemuxml= 2xmloutdata/genid-auto-active.xml new file mode 100644 index 0000000000..aeca0d7fc0 --- /dev/null +++ b/tests/qemuxml2xmloutdata/genid-auto-active.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 00010203-0405-4607-8809-0a0b0c0d0e0f + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmloutdata/genid-auto-inactive.xml b/tests/qemux= ml2xmloutdata/genid-auto-inactive.xml new file mode 100644 index 0000000000..83c924395b --- /dev/null +++ b/tests/qemuxml2xmloutdata/genid-auto-inactive.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmloutdata/genid-inactive.xml b/tests/qemuxml2xm= loutdata/genid-inactive.xml new file mode 100644 index 0000000000..8bd526a7a9 --- /dev/null +++ b/tests/qemuxml2xmloutdata/genid-inactive.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + e9392370-2917-565e-692b-d057f46512d6 + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 9e77b9fb13..e999810e12 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -276,6 +276,8 @@ mymain(void) setenv("PATH", "/bin", 1); =20 DO_TEST("minimal", NONE); + DO_TEST("genid", NONE); + DO_TEST("genid-auto", NONE); DO_TEST("machine-core-on", NONE); DO_TEST("machine-core-off", NONE); DO_TEST("machine-loadparm-multiple-disks-nets-s390", NONE); @@ -1209,7 +1211,8 @@ mymain(void) } =20 VIR_TEST_MAIN_PRELOAD(mymain, - abs_builddir "/.libs/virpcimock.so") + abs_builddir "/.libs/virpcimock.so", + abs_builddir "/.libs/virrandommock.so") =20 #else =20 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528079318889.1886460368952; Mon, 23 Apr 2018 17:01:19 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 903263133E72; Tue, 24 Apr 2018 00:01:16 +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 289296794A; Tue, 24 Apr 2018 00:01:16 +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 A33B54CAAC; Tue, 24 Apr 2018 00:01:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00ceP001169 for ; Mon, 23 Apr 2018 20:00:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id ABDD318A67; Tue, 24 Apr 2018 00:00:38 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6934818B20 for ; Tue, 24 Apr 2018 00:00:38 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:01 -0400 Message-Id: <20180424000005.689-8-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 07/11] qemu: Add VM Generation ID device capability 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 24 Apr 2018 00:01:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the query of the device objects for the vmgenid device Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 5 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 833c75514c..0c1c9cbec5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -473,6 +473,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 290 */ "query-cpus-fast", "disk-write-cache", + "vmgenid", ); =20 =20 @@ -1099,6 +1100,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-mouse-ccw", QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW }, { "virtio-tablet-ccw", QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW }, { "pcie-pci-bridge", QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE }, + { "vmgenid", QEMU_CAPS_DEVICE_VMGENID }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index f08cfc2611..a56748dc9b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -457,6 +457,7 @@ typedef enum { /* 290 */ QEMU_CAPS_QUERY_CPUS_FAST, /* query-cpus-fast command */ QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cach= e param */ + QEMU_CAPS_DEVICE_VMGENID, /* -device vmgenid */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.10.0.x86_64.xml index 8dd30ccbcf..acb480d2f0 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -196,6 +196,7 @@ + 2010000 0 344938 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index d809a78380..0f53364679 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -195,6 +195,7 @@ + 2011090 0 390060 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index e1dc257a75..8bebd66860 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -191,6 +191,7 @@ + 2009000 0 320947 --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528085314340.36183200733194; Mon, 23 Apr 2018 17:01:25 -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 3745A31524D5; Tue, 24 Apr 2018 00:01:21 +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 B0F2F77440; Tue, 24 Apr 2018 00:01:20 +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 9949A180596F; Tue, 24 Apr 2018 00:01:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00dgf001177 for ; Mon, 23 Apr 2018 20:00:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 261F618A6F; Tue, 24 Apr 2018 00:00:39 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5B2418A67 for ; Tue, 24 Apr 2018 00:00:38 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:02 -0400 Message-Id: <20180424000005.689-9-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 08/11] qemu: Handle genid processing during startup/launch 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.41]); Tue, 24 Apr 2018 00:01:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Before we generate the command line for qemu, if the domain about to be launched desires to utilize the VM Generation ID functionality, then handle both the regenerating the GUID value for backup recovery (restore operation) and the startup after snapshot as well as checking that the genid value that's about to be placed on the command line doesn't duplicate some other already running domain. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 22 +++++++--- src/qemu/qemu_process.c | 110 ++++++++++++++++++++++++++++++++++++++++++++= +++- src/qemu/qemu_process.h | 1 + 3 files changed, 126 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bfb7973100..ee242720dc 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6591,7 +6591,8 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL, asyncJob, "stdio", *fd, path, NULL, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE, - VIR_QEMU_PROCESS_START_PAUSED) =3D=3D 0) + VIR_QEMU_PROCESS_START_PAUSED | + VIR_QEMU_PROCESS_START_GEN_VMID) =3D=3D 0) restored =3D true; =20 if (intermediatefd !=3D -1) { @@ -15881,6 +15882,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, * the migratable XML or it will always fail otherwise */ if (config) { bool compatible; + bool abiflags =3D VIR_DOMAIN_DEF_ABI_CHECK_SKIP_GENID; =20 /* Replace the CPU in config and put the original one in p= riv * once we're done. When we have the updated CPU def in the @@ -15894,10 +15896,19 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr s= napshot, goto endjob; =20 compatible =3D qemuDomainDefCheckABIStability(driver, = vm->def, - config, 0); + config, ab= iflags); } else { compatible =3D qemuDomainCheckABIStability(driver, vm,= config, - 0); + abiflags); + } + + /* If using VM GenID, there is no way currently to change + * the genid for the running guest, so set an error and + * mark as incompatible. */ + if (compatible && config->genidRequested) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("domain genid update requires restart= ")); + compatible =3D false; } =20 if (!compatible) { @@ -15980,7 +15991,8 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, cookie ? cookie->cpu : NULL, QEMU_ASYNC_JOB_START, NULL, -1, NULL, sn= ap, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, - VIR_QEMU_PROCESS_START_PAUSED); + VIR_QEMU_PROCESS_START_PAUSED | + VIR_QEMU_PROCESS_START_GEN_VMID); virDomainAuditStart(vm, "from-snapshot", rc >=3D 0); detail =3D VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT; event =3D virDomainEventLifecycleNewFromObj(vm, @@ -16066,7 +16078,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr sna= pshot, VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) { /* Flush first event, now do transition 2 or 3 */ bool paused =3D (flags & VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED) != =3D 0; - unsigned int start_flags =3D 0; + unsigned int start_flags =3D VIR_QEMU_PROCESS_START_GEN_VMID; =20 start_flags |=3D paused ? VIR_QEMU_PROCESS_START_PAUSED : 0; =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6a5262ae46..06ec4ddeb9 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5880,6 +5880,107 @@ qemuProcessPrepareHost(virQEMUDriverPtr driver, =20 =20 /** + * qemuProcessCheckGenID: + * @vm: Domain to be checked + * @opaque: Domain about to be started + * + * For each running domain, let's make sure the domain to be started doesn= 't + * duplicate any running domain's genid GUID value + * + * Returns 0 on success, -1 on failure w/ error message set + */ +static int +qemuProcessCheckGenID(virDomainObjPtr vm, + void *opaque) +{ + int ret =3D 0; + virDomainObjPtr startvm =3D opaque; + + /* Ignore ourselves as we're already locked */ + if (vm =3D=3D startvm) + return 0; + + virObjectLock(vm); + + if (!virDomainObjIsActive(vm)) + goto cleanup; + + if (!vm->def->genidRequested) + goto cleanup; + + if (memcmp(startvm->def->genid, vm->def->genid, VIR_UUID_BUFLEN) =3D= =3D 0) { + /* For a generated value, just change it. Perhaps a result of + * not using virDomainDefCopy which generates a new genid when + * def->genidRequested is true. */ + if (startvm->def->genidGenerated) { + if (virUUIDGenerate(startvm->def->genid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("failed to regenerate genid")); + ret =3D -1; + } + } else { + char guidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(startvm->def->genid, guidstr); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("domain '%s' already running with genid '%s'"= ), + vm->def->name, guidstr); + ret =3D -1; + } + goto cleanup; + } + + cleanup: + virObjectUnlock(vm); + return ret; +} + + +/** + * qemuProcessGenID: + * @driver: Pointer to driver + * @vm: Pointer to domain object + * @flags: qemuProcessStartFlags + * + * If this domain is requesting to use genid + */ +static int +qemuProcessGenID(virQEMUDriverPtr driver, + virDomainObjPtr vm, + unsigned int flags) +{ + qemuDomainObjPrivatePtr priv =3D vm->privateData; + + if (!vm->def->genidRequested) + return 0; + + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VMGENID)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("this QEMU does not support the 'genid' capability= ")); + return -1; + } + + /* If we are coming from a path where we must provide a new gen id + * value regardless of whether it was previously generated or provided, + * then generate a new GUID value before we build the command line. */ + if (flags & VIR_QEMU_PROCESS_START_GEN_VMID) { + if (virUUIDGenerate(vm->def->genid)) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("failed to regenerate genid")); + return -1; + } + } + + /* Now let's make sure the genid this domain has is not duplicitous + * with something else running. */ + if (virDomainObjListForEach(driver->domains, qemuProcessCheckGenID, vm= ) < 0) + return -1; + + return 0; +} + + +/** * qemuProcessLaunch: * * Launch a new QEMU process with stopped virtual CPUs. @@ -5931,7 +6032,8 @@ qemuProcessLaunch(virConnectPtr conn, virCheckFlags(VIR_QEMU_PROCESS_START_COLD | VIR_QEMU_PROCESS_START_PAUSED | VIR_QEMU_PROCESS_START_AUTODESTROY | - VIR_QEMU_PROCESS_START_NEW, -1); + VIR_QEMU_PROCESS_START_NEW | + VIR_QEMU_PROCESS_START_GEN_VMID, -1); =20 cfg =3D virQEMUDriverGetConfig(driver); =20 @@ -5955,6 +6057,9 @@ qemuProcessLaunch(virConnectPtr conn, goto cleanup; logfile =3D qemuDomainLogContextGetWriteFD(logCtxt); =20 + if (qemuProcessGenID(driver, vm, flags) < 0) + goto cleanup; + VIR_DEBUG("Building emulator command line"); if (!(cmd =3D qemuBuildCommandLine(driver, qemuDomainLogContextGetManager(logCtx= t), @@ -6315,7 +6420,8 @@ qemuProcessStart(virConnectPtr conn, =20 virCheckFlagsGoto(VIR_QEMU_PROCESS_START_COLD | VIR_QEMU_PROCESS_START_PAUSED | - VIR_QEMU_PROCESS_START_AUTODESTROY, cleanup); + VIR_QEMU_PROCESS_START_AUTODESTROY | + VIR_QEMU_PROCESS_START_GEN_VMID, cleanup); =20 if (!migrateFrom && !snapshot) flags |=3D VIR_QEMU_PROCESS_START_NEW; diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 9dd5c97642..0ebe4cdf2d 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -79,6 +79,7 @@ typedef enum { VIR_QEMU_PROCESS_START_AUTODESTROY =3D 1 << 2, VIR_QEMU_PROCESS_START_PRETEND =3D 1 << 3, VIR_QEMU_PROCESS_START_NEW =3D 1 << 4, /* internal, new VM is= starting */ + VIR_QEMU_PROCESS_START_GEN_VMID =3D 1 << 5, /* Generate a new VMID= */ } qemuProcessStartFlags; =20 int qemuProcessStart(virConnectPtr conn, --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528075455942.1985174698501; Mon, 23 Apr 2018 17:01:15 -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 D811D356D6; Tue, 24 Apr 2018 00:01:12 +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 9504182C7D; Tue, 24 Apr 2018 00:01:12 +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 1993F4CAAA; Tue, 24 Apr 2018 00:01:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00d6O001182 for ; Mon, 23 Apr 2018 20:00:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 925C918A67; Tue, 24 Apr 2018 00:00:39 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EC1418A6F for ; Tue, 24 Apr 2018 00:00:39 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:03 -0400 Message-Id: <20180424000005.689-10-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 09/11] Remove check for duplicitous GenID in another VM 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.30]); Tue, 24 Apr 2018 00:01:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Ferlan --- src/qemu/qemu_process.c | 68 ++-------------------------------------------= ---- 1 file changed, 2 insertions(+), 66 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 06ec4ddeb9..bfc22b7d07 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5880,73 +5880,14 @@ qemuProcessPrepareHost(virQEMUDriverPtr driver, =20 =20 /** - * qemuProcessCheckGenID: - * @vm: Domain to be checked - * @opaque: Domain about to be started - * - * For each running domain, let's make sure the domain to be started doesn= 't - * duplicate any running domain's genid GUID value - * - * Returns 0 on success, -1 on failure w/ error message set - */ -static int -qemuProcessCheckGenID(virDomainObjPtr vm, - void *opaque) -{ - int ret =3D 0; - virDomainObjPtr startvm =3D opaque; - - /* Ignore ourselves as we're already locked */ - if (vm =3D=3D startvm) - return 0; - - virObjectLock(vm); - - if (!virDomainObjIsActive(vm)) - goto cleanup; - - if (!vm->def->genidRequested) - goto cleanup; - - if (memcmp(startvm->def->genid, vm->def->genid, VIR_UUID_BUFLEN) =3D= =3D 0) { - /* For a generated value, just change it. Perhaps a result of - * not using virDomainDefCopy which generates a new genid when - * def->genidRequested is true. */ - if (startvm->def->genidGenerated) { - if (virUUIDGenerate(startvm->def->genid) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("failed to regenerate genid")); - ret =3D -1; - } - } else { - char guidstr[VIR_UUID_STRING_BUFLEN]; - - virUUIDFormat(startvm->def->genid, guidstr); - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("domain '%s' already running with genid '%s'"= ), - vm->def->name, guidstr); - ret =3D -1; - } - goto cleanup; - } - - cleanup: - virObjectUnlock(vm); - return ret; -} - - -/** * qemuProcessGenID: - * @driver: Pointer to driver * @vm: Pointer to domain object * @flags: qemuProcessStartFlags * * If this domain is requesting to use genid */ static int -qemuProcessGenID(virQEMUDriverPtr driver, - virDomainObjPtr vm, +qemuProcessGenID(virDomainObjPtr vm, unsigned int flags) { qemuDomainObjPrivatePtr priv =3D vm->privateData; @@ -5971,11 +5912,6 @@ qemuProcessGenID(virQEMUDriverPtr driver, } } =20 - /* Now let's make sure the genid this domain has is not duplicitous - * with something else running. */ - if (virDomainObjListForEach(driver->domains, qemuProcessCheckGenID, vm= ) < 0) - return -1; - return 0; } =20 @@ -6057,7 +5993,7 @@ qemuProcessLaunch(virConnectPtr conn, goto cleanup; logfile =3D qemuDomainLogContextGetWriteFD(logCtxt); =20 - if (qemuProcessGenID(driver, vm, flags) < 0) + if (qemuProcessGenID(vm, flags) < 0) goto cleanup; =20 VIR_DEBUG("Building emulator command line"); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528088062680.975760960668; Mon, 23 Apr 2018 17:01:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FFE931524FC; Tue, 24 Apr 2018 00:01:26 +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 865C667E54; Tue, 24 Apr 2018 00:01:25 +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 011454CAAA; Tue, 24 Apr 2018 00:01:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00egl001192 for ; Mon, 23 Apr 2018 20:00:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 364A818A6F; Tue, 24 Apr 2018 00:00:40 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5EAA18A67 for ; Tue, 24 Apr 2018 00:00:39 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:04 -0400 Message-Id: <20180424000005.689-11-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 10/11] qemu: Add VM Generation ID to qemu command line 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 24 Apr 2018 00:01:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.redhat.com/show_bug.cgi?id=3D1149445 If the domain requests usage of the genid functionality, then add the QEMU '-device vmgenid' to the command line providing either the supplied or generated GUID value. Add tests for both a generated and supplied GUID value. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 31 +++++++++++++++++++++++++++++++ tests/qemuxml2argvdata/genid-auto.args | 24 ++++++++++++++++++++++++ tests/qemuxml2argvdata/genid.args | 24 ++++++++++++++++++++++++ tests/qemuxml2argvtest.c | 4 ++++ 4 files changed, 83 insertions(+) create mode 100644 tests/qemuxml2argvdata/genid-auto.args create mode 100644 tests/qemuxml2argvdata/genid.args diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b666f3715f..1f5e79d86a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5942,6 +5942,34 @@ qemuBuildSmbiosCommandLine(virCommandPtr cmd, =20 =20 static int +qemuBuildVMGenIDCommandLine(virCommandPtr cmd, + const virDomainDef *def, + virQEMUCapsPtr qemuCaps) +{ + virBuffer opts =3D VIR_BUFFER_INITIALIZER; + char guid[VIR_UUID_STRING_BUFLEN]; + + if (!def->genidRequested) + return 0; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMGENID)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("genid is not supported with this QEMU binary")); + return -1; + } + + virUUIDFormat(def->genid, guid); + virBufferAsprintf(&opts, "vmgenid,guid=3D%s,id=3Dvmgenid0", guid); + + virCommandAddArg(cmd, "-device"); + virCommandAddArgBuffer(cmd, &opts); + + virBufferFreeAndReset(&opts); + return 0; +} + + +static int qemuBuildSgaCommandLine(virCommandPtr cmd, const virDomainDef *def, virQEMUCapsPtr qemuCaps) @@ -9869,6 +9897,9 @@ qemuBuildCommandLine(virQEMUDriverPtr driver, if (qemuBuildSmbiosCommandLine(cmd, driver, def) < 0) goto error; =20 + if (qemuBuildVMGenIDCommandLine(cmd, def, qemuCaps) < 0) + goto error; + /* * NB, -nographic *MUST* come before any serial, or monitor * or parallel port flags due to QEMU craziness, where it diff --git a/tests/qemuxml2argvdata/genid-auto.args b/tests/qemuxml2argvdat= a/genid-auto.args new file mode 100644 index 0000000000..c25b3b87e8 --- /dev/null +++ b/tests/qemuxml2argvdata/genid-auto.args @@ -0,0 +1,24 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-device vmgenid,guid=3D00010203-0405-4607-8809-0a0b0c0d0e0f,id=3Dvmgenid0 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvdata/genid.args b/tests/qemuxml2argvdata/gen= id.args new file mode 100644 index 0000000000..527e492394 --- /dev/null +++ b/tests/qemuxml2argvdata/genid.args @@ -0,0 +1,24 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-device vmgenid,guid=3De9392370-2917-565e-692b-d057f46512d6,id=3Dvmgenid0 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot c \ +-usb diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 74d930ebe2..0dd0850036 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -805,6 +805,10 @@ mymain(void) QEMU_CAPS_SECCOMP_BLACKLIST); DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); DO_TEST("minimal-msg-timestamp", QEMU_CAPS_MSG_TIMESTAMP); + + DO_TEST("genid", QEMU_CAPS_DEVICE_VMGENID); + DO_TEST("genid-auto", QEMU_CAPS_DEVICE_VMGENID); + DO_TEST("machine-aliases1", NONE); DO_TEST("machine-aliases2", QEMU_CAPS_KVM); DO_TEST("machine-core-on", NONE); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Dec 15 23:00:36 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524528094089683.335629202201; Mon, 23 Apr 2018 17:01:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7B338535D; Tue, 24 Apr 2018 00:01:30 +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 271D067E77; Tue, 24 Apr 2018 00:01:30 +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 664B34CAB0; Tue, 24 Apr 2018 00:01:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3O00elw001197 for ; Mon, 23 Apr 2018 20:00:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id A506E18A6F; Tue, 24 Apr 2018 00:00:40 +0000 (UTC) Received: from unknown54ee7586bd10.attlocal.net.com (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F6D318A67 for ; Tue, 24 Apr 2018 00:00:40 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 20:00:05 -0400 Message-Id: <20180424000005.689-12-jferlan@redhat.com> In-Reply-To: <20180424000005.689-1-jferlan@redhat.com> References: <20180424000005.689-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 11/11] docs: Add news article for VM Generation ID 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 24 Apr 2018 00:01:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Ferlan --- docs/news.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index dec3f134ce..c76844ef06 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -56,6 +56,18 @@ host-passthrough CPU model. + + + Add support for VM Generation ID + + + The VM Generatation ID exposes a 128-bit, cryptographically + random, integer value identifier, referred to as a Globally + Unique Identifier (GUID) to the guest in order to notify the + guest operating system when the virtual machine is executed + with a different configuration. + +
--=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list