From nobody Sun May 5 06:17:58 2024 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154782608647984.18482538426599; Fri, 18 Jan 2019 07:41:26 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F083286675; Fri, 18 Jan 2019 15:41:23 +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 82F4919741; Fri, 18 Jan 2019 15:41:23 +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 D01D73F603; Fri, 18 Jan 2019 15:41:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0IFfLCo006797 for ; Fri, 18 Jan 2019 10:41:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 585B45D737; Fri, 18 Jan 2019 15:41:21 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 465685D6AA for ; Fri, 18 Jan 2019 15:41:17 +0000 (UTC) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09B2A81DFA for ; Fri, 18 Jan 2019 15:41:14 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id t9-v6so11995156ljh.6 for ; Fri, 18 Jan 2019 07:41:13 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id e97-v6sm806665lji.51.2019.01.18.07.41.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 07:41:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fuWWAKzWISR19cklzNTEL/T60eo2IkiZC/EXhkqwjME=; b=Dln8FBbMXktex7VqsAZr9HmcQAB0NW4w7fzEn1WwoWoHciLfKLcmOUMbx/3V2VhQCY d5MU9xOHtOyQtsvOkS0qYnB40cFs+unf8USBRJV1uaSTlJLmayjnBaFfZT1j2h2xzy+3 VyoxrBFgUvoKvvbbSalCxf5BWOlAsUr6GCdLgUVDpTBDCWGiPO+DfJJEogLg+ssSlo7a 6p639Pdn/iLV/8+Bs0Uep6ePWMzo3LwQzJQNnjKxDYPafW+QyzKT9FJPvGbN3pupSm9r WWYvM5NxF45kzCl8qLzhmCjDQQ0YzBK0P4CGeBLjY7Cc/B9qNBOkLwpkttq0glxxsXfe EAFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fuWWAKzWISR19cklzNTEL/T60eo2IkiZC/EXhkqwjME=; b=fWquB2aOVUVvBTd3RMxRQjFXMLri6aX7mHtWqVlfYtJ8Hi3+UPaZwS8TWHabqXVck5 xAy4kduLavgoNSSU88U9Dpd4iEN61t7ZKfSM0/elhmcJe4gztuuZuevhAeWuv+RLsW6c JxLxVXh1jn1YeH24L8atOh/pUkUmNjuEsSbqeV6pScrjIodKmGOtbGB0cCFi2FYPkhAR CCh6BL+jBO2Ejcn7cWlh+vD87vR143bGm1bfK1vri4JXrrcgXZuKMT6TU8Dxy0Pi0ryH zz0P88F9p0tqLN9fPUJ9jeSq7ZjQ5q2xfkjao7FtbAQX0iYv41uK8GwUV2gl/8Luky+a keOQ== X-Gm-Message-State: AJcUukdCPaenMzY9GtZtJlAH0ZPIyjSi6o8ijIBofRDcrMIMb5y1NCpI M1IZcwd3hQ+wByZV9UQZkj1aSsSN X-Google-Smtp-Source: ALg8bN5XEX+PNop9Rrh+F/xEwAPqIjMM/OEQjHXzpi44LqUVB1ZjUebP4DmZSqqVpnPLIHs9ubovLw== X-Received: by 2002:a2e:55d3:: with SMTP id g80-v6mr13629487lje.78.1547826071615; Fri, 18 Jan 2019 07:41:11 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 18 Jan 2019 19:41:00 +0400 Message-Id: <20190118154102.54368-2-bogorodskiy@gmail.com> In-Reply-To: <20190118154102.54368-1-bogorodskiy@gmail.com> References: <20190118154102.54368-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 18 Jan 2019 15:41:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 18 Jan 2019 15:41:14 +0000 (UTC) for IP:'209.85.208.194' DOMAIN:'mail-lj1-f194.google.com' HELO:'mail-lj1-f194.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.208.194 mail-lj1-f194.google.com 209.85.208.194 mail-lj1-f194.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 1/3] bhyve: implement support for commandline args 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 18 Jan 2019 15:41:24 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Implement support for passing custom command line arguments to bhyve using the 'bhyve:commandline' element: * Define virDomainXMLNamespace for the bhyve driver, which at this point supports only the 'commandline' element described above, * Update command generation code to inject these command line arguments between driver-generated arguments and the vmname positional argument. Signed-off-by: Roman Bogorodskiy Reviewed-by: John Ferlan --- docs/schemas/domaincommon.rng | 17 +++ src/bhyve/bhyve_command.c | 9 ++ src/bhyve/bhyve_conf.c | 15 +++ src/bhyve/bhyve_conf.h | 9 ++ src/bhyve/bhyve_domain.c | 107 +++++++++++++++++- src/bhyve/bhyve_domain.h | 1 + .../bhyvexml2argv-commandline.args | 9 ++ .../bhyvexml2argv-commandline.ldargs | 3 + .../bhyvexml2argv-commandline.xml | 27 +++++ tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-commandline.xml | 37 ++++++ tests/bhyvexml2xmltest.c | 1 + 12 files changed, 235 insertions(+), 1 deletion(-) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-commandline.xml create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-commandline.x= ml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index aa50eac424..7672639cb6 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -81,6 +81,9 @@ + + + @@ -6127,6 +6130,20 @@ =20 + + + + + + + + + + + diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 84fda08943..a1ae2026a0 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -28,6 +28,7 @@ #include "bhyve_capabilities.h" #include "bhyve_command.h" #include "bhyve_domain.h" +#include "bhyve_conf.h" #include "bhyve_driver.h" #include "datatypes.h" #include "viralloc.h" @@ -626,6 +627,14 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, if (bhyveBuildConsoleArgStr(def, cmd) < 0) goto error; =20 + if (def->namespaceData) { + bhyveDomainCmdlineDefPtr bhyvecmd; + + bhyvecmd =3D def->namespaceData; + for (i =3D 0; i < bhyvecmd->num_args; i++) + virCommandAddArg(cmd, bhyvecmd->args[i]); + } + virCommandAddArg(cmd, def->name); =20 return cmd; diff --git a/src/bhyve/bhyve_conf.c b/src/bhyve/bhyve_conf.c index 60baa2e848..75709801c7 100644 --- a/src/bhyve/bhyve_conf.c +++ b/src/bhyve/bhyve_conf.c @@ -25,6 +25,7 @@ #include "virlog.h" #include "virstring.h" #include "bhyve_conf.h" +#include "bhyve_domain.h" #include "configmake.h" =20 #define VIR_FROM_THIS VIR_FROM_BHYVE @@ -107,3 +108,17 @@ virBhyveDriverConfigDispose(void *obj) =20 VIR_FREE(cfg->firmwareDir); } + +void bhyveDomainCmdlineDefFree(bhyveDomainCmdlineDefPtr def) +{ + size_t i; + + if (!def) + return; + + for (i =3D 0; i < def->num_args; i++) + VIR_FREE(def->args[i]); + + VIR_FREE(def->args); + VIR_FREE(def); +} diff --git a/src/bhyve/bhyve_conf.h b/src/bhyve/bhyve_conf.h index 8da39fde7a..eb4a2e0fb8 100644 --- a/src/bhyve/bhyve_conf.h +++ b/src/bhyve/bhyve_conf.h @@ -29,4 +29,13 @@ virBhyveDriverConfigPtr virBhyveDriverGetConfig(bhyveCon= nPtr driver); int virBhyveLoadDriverConfig(virBhyveDriverConfigPtr cfg, const char *filename); =20 +typedef struct _bhyveDomainCmdlineDef bhyveDomainCmdlineDef; +typedef bhyveDomainCmdlineDef *bhyveDomainCmdlineDefPtr; +struct _bhyveDomainCmdlineDef { + size_t num_args; + char **args; +}; + +void bhyveDomainCmdlineDefFree(bhyveDomainCmdlineDefPtr def); + #endif /* LIBVIRT_BHYVE_CONF_H */ diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index e54af75f4d..554188ebeb 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -20,16 +20,21 @@ =20 #include =20 +#include "bhyve_conf.h" #include "bhyve_device.h" #include "bhyve_domain.h" #include "bhyve_capabilities.h" #include "viralloc.h" #include "virlog.h" =20 +#include + #define VIR_FROM_THIS VIR_FROM_BHYVE =20 VIR_LOG_INIT("bhyve.bhyve_domain"); =20 +#define BHYVE_NAMESPACE_HREF "http://libvirt.org/schemas/domain/bhyve/1.0" + static void * bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) { @@ -157,7 +162,8 @@ virBhyveDriverCreateXMLConf(bhyveConnPtr driver) virBhyveDriverDomainDefParserConfig.priv =3D driver; return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig, &virBhyveDriverPrivateDataCallbacks, - NULL, NULL, NULL); + &virBhyveDriverDomainXMLNamespace, + NULL, NULL); } =20 virDomainDefParserConfig virBhyveDriverDomainDefParserConfig =3D { @@ -165,3 +171,102 @@ virDomainDefParserConfig virBhyveDriverDomainDefParse= rConfig =3D { .domainPostParseCallback =3D bhyveDomainDefPostParse, .assignAddressesCallback =3D bhyveDomainDefAssignAddresses, }; + +static void +bhyveDomainDefNamespaceFree(void *nsdata) +{ + bhyveDomainCmdlineDefPtr cmd =3D nsdata; + + bhyveDomainCmdlineDefFree(cmd); +} + +static int +bhyveDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED, + xmlNodePtr root ATTRIBUTE_UNUSED, + xmlXPathContextPtr ctxt, + void **data) +{ + bhyveDomainCmdlineDefPtr cmd =3D NULL; + bool uses_bhyve_ns =3D false; + xmlNodePtr *nodes =3D NULL; + int n; + size_t i; + + if (xmlXPathRegisterNs(ctxt, BAD_CAST "bhyve", BAD_CAST BHYVE_NAMESPAC= E_HREF) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to register xml namespace '%s'"), + BHYVE_NAMESPACE_HREF); + return -1; + } + + if (VIR_ALLOC(cmd) < 0) + return -1; + + n =3D virXPathNodeSet("./bhyve:commandline/bhyve:arg", ctxt, &nodes); + if (n < 0) + goto error; + uses_bhyve_ns =3D n > 0; + + if (n && VIR_ALLOC_N(cmd->args, n) < 0) + goto error; + + for (i =3D 0; i < n; i++) { + cmd->args[cmd->num_args] =3D virXMLPropString(nodes[i], "value"); + if (cmd->args[cmd->num_args] =3D=3D NULL) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("No bhyve command-line argument specifi= ed")); + goto error; + } + cmd->num_args++; + } + + VIR_FREE(nodes); + + if (uses_bhyve_ns) + *data =3D cmd; + else + VIR_FREE(cmd); + + return 0; + + error: + VIR_FREE(nodes); + bhyveDomainDefNamespaceFree(cmd); + return -1; +} + +static int +bhyveDomainDefNamespaceFormatXML(virBufferPtr buf ATTRIBUTE_UNUSED, + void *nsdata) +{ + bhyveDomainCmdlineDefPtr cmd =3D nsdata; + size_t i; + + if (!cmd->num_args) + return 0; + + virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, 2); + + for (i =3D 0; i < cmd->num_args; i++) + virBufferEscapeString(buf, "\n", + cmd->args[i]); + + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); + + return 0; +} + +static const char * +bhyveDomainDefNamespaceHref(void) +{ + return "xmlns:bhyve=3D'" BHYVE_NAMESPACE_HREF "'"; +} + +virDomainXMLNamespace virBhyveDriverDomainXMLNamespace =3D { + .parse =3D bhyveDomainDefNamespaceParse, + .free =3D bhyveDomainDefNamespaceFree, + .format =3D bhyveDomainDefNamespaceFormatXML, + .href =3D bhyveDomainDefNamespaceHref, +}; diff --git a/src/bhyve/bhyve_domain.h b/src/bhyve/bhyve_domain.h index f34e5fe967..5f94038e89 100644 --- a/src/bhyve/bhyve_domain.h +++ b/src/bhyve/bhyve_domain.h @@ -39,5 +39,6 @@ virDomainXMLOptionPtr virBhyveDriverCreateXMLConf(bhyveCo= nnPtr); =20 extern virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks; extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig; +extern virDomainXMLNamespace virBhyveDriverDomainXMLNamespace; =20 #endif /* LIBVIRT_BHYVE_DOMAIN_H */ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args b/tests= /bhyvexml2argvdata/bhyvexml2argv-commandline.args new file mode 100644 index 0000000000..cb21b99cd6 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args @@ -0,0 +1,9 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=3D52:54:00:b9:94:02 ARGUMENT1 ARGUMENT2 b= hyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs b/tes= ts/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs new file mode 100644 index 0000000000..32538b558e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs @@ -0,0 +1,3 @@ +/usr/sbin/bhyveload \ +-m 214 \ +-d /tmp/freebsd.img bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.xml b/tests/= bhyvexml2argvdata/bhyvexml2argv-commandline.xml new file mode 100644 index 0000000000..0b222e4f8f --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.xml @@ -0,0 +1,27 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + +
+ + + + + +
+ + + + + + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index d1b486fa64..4a7f65a8e2 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -210,6 +210,7 @@ mymain(void) DO_TEST("vnc-autoport"); DO_TEST("cputopology"); DO_TEST_FAILURE("cputopology-nvcpu-mismatch"); + DO_TEST("commandline"); =20 /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-commandline.xml b/te= sts/bhyvexml2xmloutdata/bhyvexml2xmlout-commandline.xml new file mode 100644 index 0000000000..7e6b0e430f --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-commandline.xml @@ -0,0 +1,37 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + + + + +
+ + + +
+ + + + + +
+ + + + + + + diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index 6aaeab741e..ed421b8839 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -110,6 +110,7 @@ mymain(void) DO_TEST_DIFFERENT("vnc-vgaconf-off"); DO_TEST_DIFFERENT("vnc-vgaconf-io"); DO_TEST_DIFFERENT("vnc-autoport"); + DO_TEST_DIFFERENT("commandline"); =20 /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:17:58 2024 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547826099902939.0662100487883; Fri, 18 Jan 2019 07:41:39 -0800 (PST) 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 B74DF34CC; Fri, 18 Jan 2019 15:41:35 +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 543DE61B66; Fri, 18 Jan 2019 15:41:35 +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 014B71803395; Fri, 18 Jan 2019 15:41:34 +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 x0IFfGRX006591 for ; Fri, 18 Jan 2019 10:41:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 66C8A5D968; Fri, 18 Jan 2019 15:41:16 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5BD8C5D967 for ; Fri, 18 Jan 2019 15:41:16 +0000 (UTC) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C776D80467 for ; Fri, 18 Jan 2019 15:41:14 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id s5-v6so11947224ljd.12 for ; Fri, 18 Jan 2019 07:41:14 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id e97-v6sm806665lji.51.2019.01.18.07.41.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 07:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qkqeRLo3vzXntZrkHzmdnT2R75cwOG2cqcE+9FcRF/g=; b=UeuBY+40reXe5TN+dSncF/BOav0KrYF0Y6rlBE8b2vPFYRes+OpW4BRG2qOI7ot624 239b0pj6y1n7DdXVHReUprjbgehcbWl9I6lLMf2oqpg/SmVfwfkcVy1rQOXIRE+ByiYn 8ZTbGdfDQgd+b9KKoTE4f6P5mZ+LEUF9J+L/1NMJK2N7mnZJFoyoda5gq91akaYCf4e/ /GuFs8mBOMaz6+jVc/R5QadM51OKcoLLbuy/AfpCOcUukq9RrV+yK6Z6swFg/4L0QjQ3 pSkcgZoTxnwgGKljqHZ3X8cqkHlZz58TYNdA32vMYBfNyQwTcWHt5c8Uc0UUtfeE/JbS x5uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qkqeRLo3vzXntZrkHzmdnT2R75cwOG2cqcE+9FcRF/g=; b=S3Hq8IHsAx18D7nJTBllSADJzmotlVhwc1ehNVjrFUpAoPhsMzJNTw2DfRUQ3hVxCn lOjCk5CqYWC1CVKllwRx9qMnCRR7rqduLrKrGmYivm2nmYH/AEKer2lPgopTAabcQS05 VBSWnvcPbGJJx4d299nFM2sl2tE4E7/O1XV+k8P5yWQl3WZw8tEny1WpNmsseJj4MTY+ KcfJCz8PLLsG+s88OBo5uAjg1J87u2Oe2VBAo2N1mSNNo9Yu9M+7KKyuqnJWnYxHKSUX GL9UDKmT40mvR7SHioINdrFclzCe+vxr7TckBALmRIjViLnzKTu1jIQHAheY+BcBztAB 6MhQ== X-Gm-Message-State: AJcUukegDlsNLnjU+bg9TVnDo7rcd4SkNlJgoJLzALSn1EdXdyApiuD2 lGJOYMUGH5zH8+vJ+9aEENWqCDQL X-Google-Smtp-Source: ALg8bN585wj0Qcrcg/gSOEJ6oSlp9GY3fJ7WWLZ2quSlYx9BTqa7wxp41I5zVi7pStaFtlNs7qJ7tQ== X-Received: by 2002:a05:651c:14e:: with SMTP id c14mr12046285ljd.20.1547826072764; Fri, 18 Jan 2019 07:41:12 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 18 Jan 2019 19:41:01 +0400 Message-Id: <20190118154102.54368-3-bogorodskiy@gmail.com> In-Reply-To: <20190118154102.54368-1-bogorodskiy@gmail.com> References: <20190118154102.54368-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 18 Jan 2019 15:41:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 18 Jan 2019 15:41:15 +0000 (UTC) for IP:'209.85.208.196' DOMAIN:'mail-lj1-f196.google.com' HELO:'mail-lj1-f196.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.208.196 mail-lj1-f196.google.com 209.85.208.196 mail-lj1-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 2/3] docs: bhyve: document commandline element 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: , 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.29]); Fri, 18 Jan 2019 15:41:38 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Document the element which allows to inject custom command line arguments for bhyve. Signed-off-by: Roman Bogorodskiy Reviewed-by: John Ferlan --- docs/drvbhyve.html.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in index b4d7df2edb..d3c1585e33 100644 --- a/docs/drvbhyve.html.in +++ b/docs/drvbhyve.html.in @@ -460,6 +460,26 @@ Example:

</cpu> ... </domain> + + +

Pass-through of arbitrary bhyve commands + +

Since 5.1.0, it's possible to pass additio= nal command-line +arguments to the bhyve process when starting the domain using the +<bhyve:commandline> element under domain. +This element could be repeated multiple times. To use this XML addition, i= t is necessary +to issue an XML namespace request (the special xmlns:name attribute) +that pulls in http://libvirt.org/schemas/domain/bhyve/1.0; +typically, the namespace is given the name of bhyve. +

+

Example:

+
+<domain type=3D"bhyve" xmlns:bhyve=3D"http://libvirt.org/schemas/domain=
/bhyve/1.0">
+  ...
+  <bhyve:commandline>
+    <bhyve:arg value=3D'-somebhyvearg'/>
+  </bhyve:commandline>
+</domain>
 
=20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 06:17:58 2024 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547826102011433.1992771947208; Fri, 18 Jan 2019 07:41:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4659CA36D; Fri, 18 Jan 2019 15:41:39 +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 89CD7101E597; Fri, 18 Jan 2019 15:41: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 31C783CB0; Fri, 18 Jan 2019 15:41:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0IFfII8006779 for ; Fri, 18 Jan 2019 10:41:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id D8E0119747; Fri, 18 Jan 2019 15:41:18 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD70819741 for ; Fri, 18 Jan 2019 15:41:18 +0000 (UTC) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D6E07F3EA for ; Fri, 18 Jan 2019 15:41:16 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id v15-v6so11948551ljh.13 for ; Fri, 18 Jan 2019 07:41:16 -0800 (PST) Received: from kloomba.my.domain ([213.147.206.177]) by smtp.gmail.com with ESMTPSA id e97-v6sm806665lji.51.2019.01.18.07.41.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 07:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FOF2lSFGilJXEWUx9T6gASRFpt/EMCv1pU1uIOVeMhA=; b=b/+YyzTGEAp8oXLyq+EHWNN8KHFBKCPWoOV1Tdpfz9Md7ltSMolfwXtLcURURJB2IC O3UMJmcnuP73lWKsoMtB167nRKZsd9Emi0MlRw/QK7ZxO95LWyjmCR6fssOLdN5qP9zj Bnrqc99yS4jWFgTvbGm/VxXxDFnVsoKQ+rSWQQxP4Fk0l8vxWGiQuiIXsPG4u/kd6pDt Hp49rFMQSzMwDsQCYrAvqK+qfeCKULYyn5Wts/NPVnOBHkwl1ajfPryskh9+QrwDkgTF I6P9KoNOrOk9Lz3D8YiI7gdrWmzs9pSP4RnfukRzH4L28XZ4bHiTaKTUTqZ0bLzleE7/ 4hmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FOF2lSFGilJXEWUx9T6gASRFpt/EMCv1pU1uIOVeMhA=; b=VyH4AvNi4IGSenKgputtZvD/6D8o6WXskDJq+smy7pBr2m6auMkzSz8UwJ/miVYIDA H8RXGrVuIQTNuQt2YmtXMjE4v7SJgvaKUOY24t1KUPY2U0yTXW3kHSNPYcepvkup2sa9 nD+LrPqYGTuDolixHuoyw6/7/a9gkBhC3HQFavBEgluEFxqFHtQc1rAMkoq0130lAQpl 3RGPp+Vf3t84Reff1eIvFtKpjc1ls5P3RLBsoJTyBDJJvNoGZJNjHDwYcpfvwRHpOK72 4KX2ULwV6m+fVAySg7/p8x8a1p+MNA4Kd6fCRC6iy1o4h4eOp4PwDG/P+8bZT3KQA0x6 UShg== X-Gm-Message-State: AJcUukempVSyDUbjTQdWHfGnq3goH2Kz5IZQKfV9AGsrgyfdw6+omAxC L6G9nGKI1q8tYAfSoEUAFSk3orpC X-Google-Smtp-Source: ALg8bN5J1tC/hcCpl+XnJxZtd44WOL5w/Z8XF2xHPxrK6Ikk0nD0rpzYGhL8vEBa1t+msUsFaTLZ5Q== X-Received: by 2002:a2e:917:: with SMTP id 23-v6mr12030838ljj.1.1547826074175; Fri, 18 Jan 2019 07:41:14 -0800 (PST) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 18 Jan 2019 19:41:02 +0400 Message-Id: <20190118154102.54368-4-bogorodskiy@gmail.com> In-Reply-To: <20190118154102.54368-1-bogorodskiy@gmail.com> References: <20190118154102.54368-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 18 Jan 2019 15:41:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 18 Jan 2019 15:41:16 +0000 (UTC) for IP:'209.85.208.193' DOMAIN:'mail-lj1-f193.google.com' HELO:'mail-lj1-f193.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.208.193 mail-lj1-f193.google.com 209.85.208.193 mail-lj1-f193.google.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH 3/3] news: document bhyve custom commandline 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 18 Jan 2019 15:41:40 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Roman Bogorodskiy Reviewed-by: John Ferlan --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index bc11791d03..5759a9e178 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,17 @@
+ + + bhyve: Add support for additional command-line arguments + + + The bhyve driver now supports passing additional command-line + arguments to the bhyve process using the new + <bhyve:commandline> element in domain + configuration. + +
--=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list