From nobody Mon Dec 15 11:07:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1752061168; cv=none; d=zohomail.com; s=zohoarc; b=YphiUsrtqu8qoMcnJwEy9PMdVrQAR/S4heZXnYSfbwyZ4DnVrEE6Z/OPybLUojPSMTuOorVwSZzKSYsY19v9ht1+lGdrunIqxkdXP2wKdntrSwC1Ng0A/HbYnpz7GVoNsjgHSV3ncsaBnCupi2z3vtQE3Raw6E4Z9LrqluVvqEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752061168; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id; bh=wxam2C3JclTPsJZTnY9orNQNcdUuuYj+bY7WT1PZ7Jw=; b=d+c58dUrnao/3EE/2f+xelDBZg5OdLJgDSh6pyPz3BESJ9/HkNBIQHqDI4Io97AZhAIwtjtnVuwoXj4P4H/jGfHiTj8kmdQHMMiIhOPvJJc+G/hz5aisn+A1Kymv0ICEAVxByuvgwm7UPoESTjo7YqkfkNj+qmMwI/f7svCKlDY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1752061168264992.3126706189037; Wed, 9 Jul 2025 04:39:28 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2EB64142C; Wed, 9 Jul 2025 07:39:27 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2A89213E2; Wed, 9 Jul 2025 07:38:27 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 216C91291; Wed, 9 Jul 2025 07:38:23 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C14571291 for ; Wed, 9 Jul 2025 07:38:21 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-20-D_gNMiD3Pweuh26HG_dqNw-1; Wed, 09 Jul 2025 07:38:20 -0400 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4F2B61944A83 for ; Wed, 9 Jul 2025 11:38:19 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.44.33.247]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DFD611955E95; Wed, 9 Jul 2025 11:38:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752061101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0xH832sORcpeBAiKE+qLNk2My625+MgGTeNuoZfFCA=; b=inrbV/L49EPx1c+anap102WzqvkBmY7yEsBKau1G0ets0D0B7mUQx8sf0fEVnQIO6/HiHL Vm/2ptO1Fk/t4DnDjvrZKwjNsPB3G/rJi5ENzz/uH1b3Fj6lvaUtP4tEYSJoPbiSeaf5lP A7rUecf3qP2Y5aK759A43YK74RRz79w= X-MC-Unique: D_gNMiD3Pweuh26HG_dqNw-1 X-Mimecast-MFC-AGG-ID: D_gNMiD3Pweuh26HG_dqNw_1752061099 To: devel@lists.libvirt.org Subject: [PATCH v3] qemu: passt: add support for custom command line arguments Date: Wed, 9 Jul 2025 13:38:12 +0200 Message-ID: <20250709113812.409546-1-ellorent@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: eMYhpAGImWC7cxC3Bf28I61IKxuQa8Yx0qOxxwqKl3c_1752061099 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NFU2BPKAKUDWYO62WVJZQSUHZX5TIACC X-Message-ID-Hash: NFU2BPKAKUDWYO62WVJZQSUHZX5TIACC X-MailFrom: ellorent@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Enrique Llorente X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Enrique Llorente via Devel Reply-To: Enrique Llorente X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1752061171498116600 Content-Type: text/plain; charset="utf-8"; x-default="true" This adds support for custom command line arguments for the passt backend, similar to qemu:commandline. The feature allows passing additional arguments to the passt process for development and testing purposes. The implementation: - Adds a passt XML namespace for custom arguments - Properly taints the domain when custom args are used - Includes comprehensive test coverage - Adds documentation for the new feature Usage example: Signed-off-by: Enrique Llorente --- v3: - Fix all test problems - Refactor domain_conf.c to use libvirt xml constructs to have proper indent - Rework documentation and make it more concise - Add domainpassttest.c to check that arguments are passed to passt docs/formatdomain.rst | 38 ++++ src/conf/domain_conf.c | 61 ++++++- src/conf/domain_conf.h | 6 + src/conf/schemas/domaincommon.rng | 15 ++ src/qemu/qemu_passt.c | 9 + tests/meson.build | 1 + tests/qemupassttest.c | 162 ++++++++++++++++++ ...-user-passt-custom-args.x86_64-latest.args | 35 ++++ ...t-user-passt-custom-args.x86_64-latest.xml | 67 ++++++++ .../net-user-passt-custom-args.xml | 64 +++++++ tests/qemuxmlconftest.c | 1 + 11 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 tests/qemupassttest.c create mode 100644 tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64= -latest.args create mode 100644 tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64= -latest.xml create mode 100644 tests/qemuxmlconfdata/net-user-passt-custom-args.xml diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 9a2f065590..4c01a07135 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -5464,6 +5464,44 @@ ports **with the exception of some subset**. ... =20 +Custom passt commandline arguments +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. warning:: + + **This is an unsupported feature for development and testing only.** + Using it will taint the domain. Users are strongly advised to use the + proper libvirt XML elements for configuring passt instead. + + +:since:`Since 11.7.0` For development and testing purposes, it is +sometimes useful to be able to pass additional command-line arguments +directly to the passt process. This can be accomplished using a +special passt namespace in the domain XML that is similar to the qemu +commandline namespace: + +:: + + ... + + ... + + + + + + + + + + ... + +Any arguments provided using this method will be appended to the passt +command line, and will therefore override any default options set by +libvirt in the case of conflicts. **This can lead to unexpected behavior +and libvirt cannot guarantee functionality when its default configuration +is overridden.** + Generic ethernet connection ^^^^^^^^^^^^^^^^^^^^^^^^^^^ =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1e24e41a48..9721763622 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2918,6 +2918,10 @@ virDomainNetDefFree(virDomainNetDef *def) g_free(def->backend.tap); g_free(def->backend.vhost); g_free(def->backend.logFile); + if (def->backend.passtCommandline) { + g_strfreev(def->backend.passtCommandline->args); + g_free(def->backend.passtCommandline); + } virDomainNetTeamingInfoFree(def->teaming); g_free(def->virtPortProfile); g_free(def->script); @@ -9772,6 +9776,7 @@ virDomainNetBackendParseXML(xmlNodePtr node, { g_autofree char *tap =3D virXMLPropString(node, "tap"); g_autofree char *vhost =3D virXMLPropString(node, "vhost"); + xmlNodePtr cur; =20 /* In the case of NET_TYPE_USER, backend type can be unspecified * (i.e. VIR_DOMAIN_NET_BACKEND_DEFAULT) and that means 'use @@ -9808,6 +9813,38 @@ virDomainNetBackendParseXML(xmlNodePtr node, def->backend.vhost =3D virFileSanitizePath(vhost); } =20 + /* Parse passt namespace commandline */ + cur =3D node->children; + while (cur !=3D NULL) { + if (cur->type =3D=3D XML_ELEMENT_NODE) { + if (cur->ns && + STREQ((const char *)cur->ns->href, "http://libvirt.org/sch= emas/domain/passt/1.0") && + STREQ((const char *)cur->name, "commandline")) { + xmlNodePtr arg_node =3D cur->children; + g_autoptr(GPtrArray) args =3D g_ptr_array_new(); + + while (arg_node !=3D NULL) { + if (arg_node->type =3D=3D XML_ELEMENT_NODE && + arg_node->ns && + STREQ((const char *)arg_node->ns->href, "http://li= bvirt.org/schemas/domain/passt/1.0") && + STREQ((const char *)arg_node->name, "arg")) { + g_autofree char *value =3D virXMLPropString(arg_no= de, "value"); + if (value) + g_ptr_array_add(args, g_strdup(value)); + } + arg_node =3D arg_node->next; + } + + if (args->len > 0) { + def->backend.passtCommandline =3D g_new0(virDomainNetB= ackendPasstCommandline, 1); + g_ptr_array_add(args, NULL); /* NULL-terminate */ + def->backend.passtCommandline->args =3D (char **)g_ptr= _array_steal(args, NULL); + } + } + } + cur =3D cur->next; + } + return 0; } =20 @@ -20802,6 +20839,7 @@ virDomainNetBackendIsEqual(virDomainNetBackend *src, STRNEQ_NULLABLE(src->logFile, dst->logFile)) { return false; } + return true; } =20 @@ -24921,11 +24959,29 @@ virDomainNetTeamingInfoFormat(virDomainNetTeaming= Info *teaming, } =20 =20 +static void +virDomainNetBackendPasstCommandLineFormat(virBuffer *buf, + virDomainNetBackend *backend) +{ + g_auto(virBuffer) attrBuf =3D VIR_BUFFER_INITIALIZER; + g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); + GStrv n; + + if (backend->passtCommandline && backend->passtCommandline->args) { + for (n =3D backend->passtCommandline->args; n && *n; n++) + virBufferEscapeString(&childBuf, "\n"= , *n); + virBufferAddLit(&attrBuf, " xmlns:passt=3D'http://libvirt.org/sche= mas/domain/passt/1.0'"); + virXMLFormatElement(buf, "passt:commandline", &attrBuf, &childBuf); + } + +} + static void virDomainNetBackendFormat(virBuffer *buf, virDomainNetBackend *backend) { g_auto(virBuffer) attrBuf =3D VIR_BUFFER_INITIALIZER; + g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); =20 if (backend->type) { virBufferAsprintf(&attrBuf, " type=3D'%s'", @@ -24934,7 +24990,10 @@ virDomainNetBackendFormat(virBuffer *buf, virBufferEscapeString(&attrBuf, " tap=3D'%s'", backend->tap); virBufferEscapeString(&attrBuf, " vhost=3D'%s'", backend->vhost); virBufferEscapeString(&attrBuf, " logFile=3D'%s'", backend->logFile); - virXMLFormatElement(buf, "backend", &attrBuf, NULL); + + virDomainNetBackendPasstCommandLineFormat(&childBuf, backend); + + virXMLFormatElement(buf, "backend", &attrBuf, &childBuf); } =20 =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 6997cf7c09..1f51bad546 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1070,12 +1070,18 @@ struct _virDomainActualNetDef { unsigned int class_id; /* class ID for bandwidth 'floor' */ }; =20 +typedef struct _virDomainNetBackendPasstCommandline virDomainNetBackendPas= stCommandline; +struct _virDomainNetBackendPasstCommandline { + char **args; /* NULL-terminated array of arguments */ +}; + struct _virDomainNetBackend { virDomainNetBackendType type; char *tap; char *vhost; /* The following are currently only valid/used when backend type=3D'pa= sst' */ char *logFile; /* path to logfile used by passt process */ + virDomainNetBackendPasstCommandline *passtCommandline; /* for passt o= verrides */ }; =20 struct _virDomainNetPortForwardRange { diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 183dd5db5e..e176073c6a 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3908,6 +3908,9 @@ + + + @@ -8877,6 +8880,18 @@ =20 + + + + + + + + + + + + diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index fcc34de384..0163553cee 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c @@ -317,6 +317,15 @@ qemuPasstStart(virDomainObj *vm, virCommandAddArg(cmd, virBufferCurrentContent(&buf)); } =20 + /* Add custom passt arguments from namespace */ + if (net->backend.passtCommandline && net->backend.passtCommandline->ar= gs) { + for (i =3D 0; net->backend.passtCommandline->args[i]; i++) { + virCommandAddArg(cmd, net->backend.passtCommandline->args[i]); + } + + /* Taint the domain when using custom passt arguments */ + qemuDomainObjTaint(driver, vm, VIR_DOMAIN_TAINT_CUSTOM_ARGV, NULL); + } =20 if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0) return -1; diff --git a/tests/meson.build b/tests/meson.build index 0d76d37959..fe9013b600 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -269,6 +269,7 @@ tests +=3D [ { 'name': 'networkxml2xmlupdatetest' }, { 'name': 'nodedevxml2xmltest' }, { 'name': 'nwfilterxml2xmltest' }, + { 'name': 'qemupassttest' }, { 'name': 'seclabeltest' }, { 'name': 'secretxml2xmltest' }, { 'name': 'sockettest' }, diff --git a/tests/qemupassttest.c b/tests/qemupassttest.c new file mode 100644 index 0000000000..84f4c1510a --- /dev/null +++ b/tests/qemupassttest.c @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2024 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#include + +#include "testutils.h" +#include "conf/domain_conf.h" +#include "viralloc.h" +#include "virstring.h" +#include "virlog.h" + +#define VIR_FROM_THIS VIR_FROM_QEMU + +VIR_LOG_INIT("tests.qemupassttest"); + +struct testPasstData { + const char *name; + const char *xmlfile; + const char * const *expectedArgs; + size_t nExpectedArgs; + bool expectCustomArgs; +}; + +static virDomainDef * +testParseDomainXML(const char *xmlfile) +{ + g_autofree char *xmlpath =3D NULL; + g_autofree char *xmldata =3D NULL; + virDomainDef *def =3D NULL; + g_autoptr(virDomainXMLOption) xmlopt =3D NULL; + + xmlpath =3D g_strdup_printf("%s/qemuxmlconfdata/%s", abs_srcdir, xmlfi= le); + + if (virTestLoadFile(xmlpath, &xmldata) < 0) + return NULL; + + if (!(xmlopt =3D virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL, N= ULL))) + return NULL; + + def =3D virDomainDefParseString(xmldata, xmlopt, NULL, + VIR_DOMAIN_DEF_PARSE_INACTIVE); + + return def; +} + +static int +testPasstParseCustomArgs(const void *opaque) +{ + const struct testPasstData *data =3D opaque; + g_autoptr(virDomainDef) def =3D NULL; + virDomainNetDef *net =3D NULL; + size_t i; + + if (!(def =3D testParseDomainXML(data->xmlfile))) { + VIR_TEST_DEBUG("Failed to parse domain XML"); + return -1; + } + + /* Find the interface with passt backend */ + for (i =3D 0; i < def->nnets; i++) { + if (def->nets[i]->backend.type =3D=3D VIR_DOMAIN_NET_BACKEND_PASST= ) { + net =3D def->nets[i]; + break; + } + } + + if (!net) { + VIR_TEST_DEBUG("No passt interface found in domain XML"); + return -1; + } + + /* Check if we have custom arguments */ + if (data->expectCustomArgs) { + char **args; + + if (!net->backend.passtCommandline || !net->backend.passtCommandli= ne->args) { + VIR_TEST_DEBUG("Expected custom args but none found"); + return -1; + } + + args =3D net->backend.passtCommandline->args; + + if (g_strv_length(args) !=3D data->nExpectedArgs) { + VIR_TEST_DEBUG("Expected %zu arguments but found %u", + data->nExpectedArgs, g_strv_length(args)); + return -1; + } + + /* Verify all expected arguments are present */ + for (i =3D 0; i < data->nExpectedArgs; i++) { + if (!g_strv_contains((const char * const *)args, data->expecte= dArgs[i])) { + VIR_TEST_DEBUG("Missing expected argument: %s", data->expe= ctedArgs[i]); + return -1; + } + } + } else { + /* Should not have custom arguments */ + if (net->backend.passtCommandline && + net->backend.passtCommandline->args && + *net->backend.passtCommandline->args) { + VIR_TEST_DEBUG("Found custom args but none expected"); + return -1; + } + } + + return 0; +} + +static int +mymain(void) +{ + int ret =3D 0; + + static const char * const customArgsExpected[] =3D { + "--debug", + "--verbose", + "--socket=3D/tmp/foo.socket" + }; + + struct testPasstData customArgsData =3D { + .name =3D "custom-args", + .xmlfile =3D "net-user-passt-custom-args.xml", + .expectedArgs =3D customArgsExpected, + .nExpectedArgs =3D G_N_ELEMENTS(customArgsExpected), + .expectCustomArgs =3D true, + }; + + struct testPasstData noCustomArgsData =3D { + .name =3D "no-custom-args", + .xmlfile =3D "net-user-passt.xml", + .expectedArgs =3D NULL, + .nExpectedArgs =3D 0, + .expectCustomArgs =3D false, + }; + + if (virTestRun("passt XML parsing with custom args", + testPasstParseCustomArgs, &customArgsData) < 0) + ret =3D -1; + + if (virTestRun("passt XML parsing without custom args", + testPasstParseCustomArgs, &noCustomArgsData) < 0) + ret =3D -1; + + return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; +} + +VIR_TEST_MAIN(mymain) diff --git a/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest= .args b/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest.args new file mode 100644 index 0000000000..48d2596594 --- /dev/null +++ b/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-stor= age","id":"ide0-0-0","bootindex":1}' \ +-netdev '{"type":"stream","addr":{"type":"unix","path":"/var/run/libvirt/q= emu/passt/-1-QEMUGuest1-net0.socket"},"server":false,"reconnect-ms":5000,"i= d":"hostnet0"}' \ +-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:= 22:33:44:55","bus":"pci.0","addr":"0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest= .xml b/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest.xml new file mode 100644 index 0000000000..6718893a52 --- /dev/null +++ b/tests/qemuxmlconfdata/net-user-passt-custom-args.x86_64-latest.xml @@ -0,0 +1,67 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +