[libvirt PATCH] conf: schemas: add sysinfocommon.rng into list of installed schemas
by Pavel Hrdina
From: Pavel Hrdina <phrdina(a)redhat.com>
Fixes: 918594b419ea3944220fcbab6cf4f1ce7d81e609
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/schemas/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/schemas/meson.build b/src/conf/schemas/meson.build
index b293373085..7ec625b8db 100644
--- a/src/conf/schemas/meson.build
+++ b/src/conf/schemas/meson.build
@@ -25,6 +25,7 @@ schema_files = [
'storagepoolcaps.rng',
'storagepool.rng',
'storagevol.rng',
+ 'sysinfocommon.rng',
]
install_data(schema_files, install_dir: pkgdatadir / 'schemas')
--
2.50.1
21 hours, 42 minutes
[PATCHv2] passt: Define backend hostname and fqdn
by Enrique Llorente
This commit introduces a feature enhancement for configuring hostnames in
virtual machines (VMs) using DHCP. It adds new options to the "passt" tool
to set the hostname and fully qualified domain name (FQDN) for VMs. These
map to DHCP option 12 for the hostname and options 81 (IPv4) and 39 (IPv6)
for the FQDN.
The update enables passt to dynamically assign hostnames to DHCP-aware
VMs. To achieve this, the commit adds two fields to the passt domain XML
backend. These fields allow passt to configure the hostname and FQDN for
the virtual machine, ensuring smooth integration with the DHCP protocol.
This improvement is particularly valuable in environments where VMs need
dynamic hostname configuration, enhancing flexibility and automation in
virtualized network setups.
libvirt: Integrate passt --hostname --fqdn options
Resolves: https://issues.redhat.com/browse/RHEL-79806
Signed-off-by: Enrique Llorente <ellorent(a)redhat.com>
---
Compared to v1 this fix the mapping between backend fqdn and hostname
docs/formatdomain.rst | 8 +++++---
src/conf/domain_conf.c | 10 +++++++++-
src/conf/domain_conf.h | 2 ++
src/conf/schemas/domaincommon.rng | 6 ++++++
src/qemu/qemu_passt.c | 6 ++++++
tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml | 2 +-
tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml | 2 +-
tests/qemuxmlconfdata/net-user-passt.xml | 2 +-
.../net-vhostuser-passt.x86_64-latest.xml | 2 +-
tests/qemuxmlconfdata/net-vhostuser-passt.xml | 2 +-
10 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8753ee9c23..9c80aa9270 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -5372,10 +5372,12 @@ came from the host's IP.
There are a few other options that are configurable only for the passt
backend. For example, the ``<backend>`` attribute ``logFile`` can be
used to tell the passt process for this interface where to write its
-message log, and the ``<source>`` attribute ``dev`` can tell it a
+message log, the ``<source>`` attribute ``dev`` can tell it a
particular host interface to use when deriving the routes given to the
-guest for forwarding traffic upstream. Due to the design decisions of
-passt, when using SELinux on the host, it is recommended that the log
+guest for forwarding traffic upstream and the ``hostname`` and ``fqdn``
+will conigure the DHCP option 12 hostname and DHCP option 81 and DHCPv6
+option 39 fqdn attribute. Due to the design decisions of passt, when using
+SELinux on the host, it is recommended that the log
file reside in the runtime directory of the user under which the passt
process will run, most probably ``/run/user/$UID`` (where ``$UID`` is
the UID of that user), e.g. ``/run/user/1000``. Be aware that libvirt
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b3b0bd7329..15143f8fa2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2909,6 +2909,8 @@ virDomainNetDefFree(virDomainNetDef *def)
g_free(def->backend.tap);
g_free(def->backend.vhost);
g_free(def->backend.logFile);
+ g_free(def->backend.hostname);
+ g_free(def->backend.fqdn);
virDomainNetTeamingInfoFree(def->teaming);
g_free(def->virtPortProfile);
g_free(def->script);
@@ -9757,6 +9759,8 @@ virDomainNetBackendParseXML(xmlNodePtr node,
}
def->backend.logFile = virXMLPropString(node, "logFile");
+ def->backend.hostname = virXMLPropString(node, "hostname");
+ def->backend.fqdn = virXMLPropString(node, "fqdn");
if (tap)
def->backend.tap = virFileSanitizePath(tap);
@@ -20757,7 +20761,9 @@ virDomainNetBackendIsEqual(virDomainNetBackend *src,
if (src->type != dst->type ||
STRNEQ_NULLABLE(src->tap, dst->tap) ||
STRNEQ_NULLABLE(src->vhost, dst->vhost) ||
- STRNEQ_NULLABLE(src->logFile, dst->logFile)) {
+ STRNEQ_NULLABLE(src->logFile, dst->logFile) ||
+ STRNEQ_NULLABLE(src->hostname, dst->hostname) ||
+ STRNEQ_NULLABLE(src->fqdn, dst->fqdn)) {
return false;
}
return true;
@@ -24838,6 +24844,8 @@ virDomainNetBackendFormat(virBuffer *buf,
virBufferEscapeString(&attrBuf, " tap='%s'", backend->tap);
virBufferEscapeString(&attrBuf, " vhost='%s'", backend->vhost);
virBufferEscapeString(&attrBuf, " logFile='%s'", backend->logFile);
+ virBufferEscapeString(&attrBuf, " hostname='%s'", backend->hostname);
+ virBufferEscapeString(&attrBuf, " fqdn='%s'", backend->fqdn);
virXMLFormatElement(buf, "backend", &attrBuf, NULL);
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 58b97a2b54..79fd2f1f63 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1067,6 +1067,8 @@ struct _virDomainNetBackend {
char *vhost;
/* The following are currently only valid/used when backend type='passt' */
char *logFile; /* path to logfile used by passt process */
+ char *hostname; /* hostname of the passt process */
+ char *fqdn; /* fully qualified domain name of the passt process */
};
struct _virDomainNetPortForwardRange {
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index 5597d5a66b..f64199ca18 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -3913,6 +3913,12 @@
<ref name="absFilePath"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="hostname"/>
+ </optional>
+ <optional>
+ <attribute name="fqdn"/>
+ </optional>
</element>
</optional>
<optional>
diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c
index fcc34de384..81e5c51f6c 100644
--- a/src/qemu/qemu_passt.c
+++ b/src/qemu/qemu_passt.c
@@ -229,6 +229,12 @@ qemuPasstStart(virDomainObj *vm,
if (net->backend.logFile)
virCommandAddArgList(cmd, "--log-file", net->backend.logFile, NULL);
+ if (net->backend.hostname)
+ virCommandAddArgList(cmd, "--hostname", net->backend.hostname, NULL);
+
+ if (net->backend.fqdn)
+ virCommandAddArgList(cmd, "--fqdn", net->backend.fqdn, NULL);
+
/* Add IP address info */
for (i = 0; i < net->guestIP.nips; i++) {
const virNetDevIPAddr *ip = net->guestIP.ips[i];
diff --git a/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml b/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
index cfe07cc627..77da297936 100644
--- a/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.x86_64-7.2.0.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml b/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
index d7e0ef5f90..917a9edaa0 100644
--- a/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.x86_64-latest.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-user-passt.xml b/tests/qemuxmlconfdata/net-user-passt.xml
index 20c9f50542..80d15de2ed 100644
--- a/tests/qemuxmlconfdata/net-user-passt.xml
+++ b/tests/qemuxmlconfdata/net-user-passt.xml
@@ -47,7 +47,7 @@
<range start='443' to='344'/>
</portForward>
<model type='rtl8139'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
index 529aff11f8..5802754c4b 100644
--- a/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
@@ -53,7 +53,7 @@
<range start='443' to='344'/>
</portForward>
<model type='virtio'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<interface type='vhostuser'>
diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt.xml b/tests/qemuxmlconfdata/net-vhostuser-passt.xml
index 71b845329b..0a37511a0f 100644
--- a/tests/qemuxmlconfdata/net-vhostuser-passt.xml
+++ b/tests/qemuxmlconfdata/net-vhostuser-passt.xml
@@ -50,7 +50,7 @@
<range start='443' to='344'/>
</portForward>
<model type='virtio'/>
- <backend type='passt' logFile='/var/log/loglaw.blog'/>
+ <backend type='passt' logFile='/var/log/loglaw.blog' hostname='hostname1' fqdn='hostname1.test.local'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<interface type='vhostuser'>
--
2.49.0
1 day
[PATCH 0/5] Some parsing functions refactor
by Kirill Shchetiniuk
This patch series is supposed to refactor the existing logic of
some parsing functions, changing the previous approach of getting
the string fisrt and then parsing the string itself. Now the
parsing logic is implemented by using the appropriate virXMLProp*
functions.
In some places the error reporter was changed along with the reported
error message and this change was also reflected in exsiting test cases.
Kirill Shchetiniuk (5):
conf: virNetDevVPortProfileParse refactor
conf: virDomainHostdevSubsysMediatedDevDefParseXML refactor
util: virSecretLookupParseSecret refactor
conf: virDomainChrDefParseTargetXML refactor
qemu: qemuDomainObjPrivateXMLParseVcpu refactor
src/conf/domain_conf.c | 28 +---
src/conf/netdev_vport_profile_conf.c | 120 +++++++-----------
src/qemu/qemu_domain.c | 16 +--
src/util/virsecret.c | 19 +--
...mdev-src-address-invalid.x86_64-latest.err | 2 +-
5 files changed, 60 insertions(+), 125 deletions(-)
--
2.49.0
1 day, 8 hours
[PATCH 0/3] bhyve: TCP console support
by Roman Bogorodskiy
Roman Bogorodskiy (3):
bhyve: support serial type 'tcp'
bhyve: increase number of supported consoles to 4
docs: drvbhyve: document TCP console support
docs/drvbhyve.rst | 19 ++++++
src/bhyve/bhyve_capabilities.c | 3 +-
src/bhyve/bhyve_command.c | 42 +++++++++-----
.../bhyvexml2argv-4-consoles.args | 15 +++++
.../bhyvexml2argv-4-consoles.ldargs | 4 ++
.../bhyvexml2argv-4-consoles.xml | 35 +++++++++++
.../bhyvexml2argv-serial-invalid-port.args | 12 ++++
.../bhyvexml2argv-serial-invalid-port.ldargs | 4 ++
.../bhyvexml2argv-serial-invalid-port.xml | 28 +++++++++
.../bhyvexml2argv-serial-tcp.args | 12 ++++
.../bhyvexml2argv-serial-tcp.ldargs | 4 ++
.../bhyvexml2argv-serial-tcp.xml | 27 +++++++++
tests/bhyvexml2argvtest.c | 3 +
.../bhyvexml2xmlout-4-consoles.xml | 58 +++++++++++++++++++
.../bhyvexml2xmlout-serial-tcp.xml | 46 +++++++++++++++
tests/bhyvexml2xmltest.c | 2 +
tests/domaincapsdata/bhyve_basic.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_uefi.x86_64.xml | 1 +
19 files changed, 301 insertions(+), 16 deletions(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-4-consoles.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-invalid-port.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-4-consoles.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-tcp.xml
--
2.49.0
1 day, 14 hours
[PATCH v5 0/5] Disable Deprecated Features by Default on s390 CPU Models
by Collin Walling
Changelog
v5
- dropped the "none" test in qemuxmlactivetest (see commit for
details)
- reordered patches to introduce some tests first, then add
qemu.conf changes
v4
- added qemu.conf option to dictate the default behavior for the
deprecated_features attribute (Boris)
- added qemuxmlactivetests (Boris)
- snuck in missing documentation for deprecated_features in
formatdomain.rst
v3
- added qemu caps check to avoid breaking s390 guests trying to
default deprecated_features='off' on QEMU versions that
do not support reporting these features
v2
- changed behavior from disabling features on the host model to
instead flagging the guest CPU to disable deprecated features
- removed disabling deprecated features on host model in
virQEMUCapsInitCPUModelS390
- added flagging deprecated_feats in qemuProcessUpdateGuestCPU
- added tests for deprecated_features='on'
- split virQEMUCapsUpdateCPUDeprecatedFeatures update and
qemuProcessUpdateGuestCPU changes
The intention of reporting deprecated features and modifying the guest
CPU model was to alleviate the user from the burden of preparing a guest
with the necessary amendments to assure migration to newer hardware.
While that goal was met by way of the "deprecated_features='on|off'"
attribute, it still adds an extra step that the user must be aware to
prepare a guest for migration and the errors that stem from an
unsuccessful migration (due to feature incompatibility) is not always
clear how to resolve.
These patches make s390 CPU *host models* migration ready from the get-go
by introducing a qemu.conf option for disabling deprecated features by
default. They may still be disabled for other model types via the
respective attribute, or reenabled if desired. The configured behavior
may be overridden by explicitly providing the attribute within the
guest XML.
Boris Fiuczynski (2):
tests: new qemuxmlactive tests for s390x
qemu: add default_cpu_deprecated_features configuration option
Collin Walling (3):
docs: domain: document deprecated_features attribute
qemu: caps: add virCPUFeaturePolicy param to
virQEMUCapsUpdateCPUDeprecatedFeatures
qemu: process: refactor deprecated features code
docs/formatdomain.rst | 8 ++++
src/qemu/libvirtd_qemu.aug | 3 ++
src/qemu/qemu.conf.in | 14 ++++++
src/qemu/qemu_capabilities.c | 6 +--
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_conf.c | 33 +++++++++++++
src/qemu/qemu_conf.h | 12 +++++
src/qemu/qemu_driver.c | 3 +-
src/qemu/qemu_process.c | 46 +++++++++++++++----
src/qemu/test_libvirtd_qemu.aug.in | 1 +
...cated-features-off-active.s390x-latest.xml | 25 ++++++++++
...ted-features-off-inactive.s390x-latest.xml | 25 ++++++++++
...ecated-features-on-active.s390x-latest.xml | 25 ++++++++++
...ated-features-on-inactive.s390x-latest.xml | 25 ++++++++++
tests/qemuxmlactivetest.c | 10 +++-
...deprecated-features-none.s390x-latest.args | 32 +++++++++++++
...-deprecated-features-none.s390x-latest.xml | 25 ++++++++++
.../cpu-model-deprecated-features-none.xml | 15 ++++++
...l-deprecated-features-on.s390x-latest.args | 32 +++++++++++++
...el-deprecated-features-on.s390x-latest.xml | 25 ++++++++++
.../cpu-model-deprecated-features-on.xml | 15 ++++++
...default-video-type-s390x.s390x-latest.args | 2 +-
...vfio-zpci-ccw-memballoon.s390x-latest.args | 2 +-
.../launch-security-s390-pv.s390x-latest.args | 2 +-
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 2 +-
.../s390-defaultconsole.s390x-latest.args | 2 +-
.../s390-panic.s390x-latest.args | 2 +-
tests/qemuxmlconftest.c | 2 +
28 files changed, 375 insertions(+), 22 deletions(-)
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-active.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-off-inactive.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-active.s390x-latest.xml
create mode 100644 tests/qemuxmlactive2xmldata/cpu-model-deprecated-features-on-inactive.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-none.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-on.xml
--
2.49.0
1 day, 17 hours
[PATCH 0/3] sysinfotest: rename output XMLs with .xml suffix and introduce schema testing
by Peter Krempa
As noticed in:
https://gitlab.com/libvirt/libvirt-go-xml-module/-/issues/10#note_2608097257
This series:
- renames the output files with .xml suffix
- refactors the schema for the domain <sysinfo> to be reusable
- introduces schema to validate the host sysinfo document and tests the
output files in virschematest
Peter Krempa (3):
sysinfotest: Use '.xml' suffix for output files
conf: schemas: Split out common parts of 'sysinfo' schema
schema: Schema validate host '<sysinfo>' XML test documents
src/conf/schemas/domaincommon.rng | 126 +----------
src/conf/schemas/sysinfo.rng | 34 +++
src/conf/schemas/sysinfocommon.rng | 204 ++++++++++++++++++
...nfo.expect => aarch64-gigabytesysinfo.xml} | 0
...o.expect => aarch64-hpe-apollosysinfo.xml} | 0
...nfo.expect => aarch64-moonshotsysinfo.xml} | 0
...rch64sysinfo.expect => aarch64sysinfo.xml} | 0
...rpi2sysinfo.expect => arm-rpi2sysinfo.xml} | 0
.../{armsysinfo.expect => armsysinfo.xml} | 0
.../{ppcsysinfo.expect => ppcsysinfo.xml} | 0
...reqsysinfo.expect => s390-freqsysinfo.xml} | 0
.../{s390sysinfo.expect => s390sysinfo.xml} | 0
.../{x86sysinfo.expect => x86sysinfo.xml} | 0
tests/sysinfotest.c | 2 +-
tests/virschematest.c | 5 +
15 files changed, 251 insertions(+), 120 deletions(-)
create mode 100644 src/conf/schemas/sysinfo.rng
create mode 100644 src/conf/schemas/sysinfocommon.rng
rename tests/sysinfodata/{aarch64-gigabytesysinfo.expect => aarch64-gigabytesysinfo.xml} (100%)
rename tests/sysinfodata/{aarch64-hpe-apollosysinfo.expect => aarch64-hpe-apollosysinfo.xml} (100%)
rename tests/sysinfodata/{aarch64-moonshotsysinfo.expect => aarch64-moonshotsysinfo.xml} (100%)
rename tests/sysinfodata/{aarch64sysinfo.expect => aarch64sysinfo.xml} (100%)
rename tests/sysinfodata/{arm-rpi2sysinfo.expect => arm-rpi2sysinfo.xml} (100%)
rename tests/sysinfodata/{armsysinfo.expect => armsysinfo.xml} (100%)
rename tests/sysinfodata/{ppcsysinfo.expect => ppcsysinfo.xml} (100%)
rename tests/sysinfodata/{s390-freqsysinfo.expect => s390-freqsysinfo.xml} (100%)
rename tests/sysinfodata/{s390sysinfo.expect => s390sysinfo.xml} (100%)
rename tests/sysinfodata/{x86sysinfo.expect => x86sysinfo.xml} (100%)
--
2.50.0
1 day, 21 hours
[RFC 0/4] Implement automatic attachment of the vhostuser port
by yong.huang@smartx.com
From: Hyman Huang <yong.huang(a)smartx.com>
This series offer an automated method to configure a vhostuser interface
in server mode, simplifying integration with DPDK-enabled Open vSwitch
bridges.
To ensure simplicity and forward compatibility, we introduce openvswitch
backend support for vhostuser interfaces in XML configuration, with an
optional 'autoiface' attribute.
Here is an example of the config for a vhostuser interface that attached
to bridge automatically:
<interface type='vhostuser'>
<mac address='52:54:00:3b:83:1b'/>
<source type='unix' path='/tmp/vhost2.sock' mode='server'/>
<virtualport type='openvswitch'>
<parameters interfaceid='9317d6b7-5fae-4464-a7e9-87d90eff2204'/>
</virtualport>
<backend type='openvswitch' autoiface='yes'>
<parameters bridge='ovsbr-ddpbxnhaq'/>
</backend>
<model type='virtio'/>
<driver queues='5'/>
</interface>
The backend element specifies the backend implementation of the vhostuser
interface type. The type attribute is required and currently supports
supports openvswitch and passt.
If type is openvswitch, the autoiface attribute may be specified (yes
or no), if autoiface is yes, the parameters element bridge attribute
is mandatory. Libvirt will derive the interface name by extracting the
substring after the '/' character in the vhostuser server path, and
attach it to the bridge specified by the bridge attribute.
Please review. Thanks.
Yong
Hyman Huang (4):
qemu_passt: Make logFile backend-specific
conf: Introduce autoiface attribute for vhostuser interface
util: Add iface argument to virNetDevOpenvswitchAddPort
qemu: Implement automatic attachment of the vhostuser port
docs/formatdomain.rst | 37 ++++++++-
src/conf/domain_conf.c | 75 +++++++++++++++++--
src/conf/domain_conf.h | 13 +++-
src/conf/domain_postparse.c | 46 ++++++++++++
src/conf/domain_validate.c | 24 ++++++
src/conf/schemas/domaincommon.rng | 20 +++++
src/lxc/lxc_process.c | 3 +-
src/qemu/qemu_command.c | 3 +
src/qemu/qemu_hotplug.c | 4 +
src/qemu/qemu_interface.c | 46 ++++++++++++
src/qemu/qemu_interface.h | 3 +
src/qemu/qemu_passt.c | 4 +-
src/qemu/qemu_process.c | 4 +
src/util/virnetdevopenvswitch.c | 36 ++++++++-
src/util/virnetdevopenvswitch.h | 10 ++-
src/util/virnetdevtap.c | 3 +-
.../net-vhostuser.x86_64-latest.xml | 10 +++
tests/qemuxmlconfdata/net-vhostuser.xml | 10 +++
18 files changed, 336 insertions(+), 15 deletions(-)
--
2.27.0
1 day, 23 hours
[PATCH v2 0/1] network: introduce Packet Filter firewall backend
by Roman Bogorodskiy
Changes since v1:
- Left only firewall backend changes
- Build network_pf.c only on FreeBSD
- pfAddIPSpecificFirewallRules: error message for lack of IPv6 support
I have also added a basic docs/drvnetwork.rst, but I think it would make
more sense to include it in the follow up series with the bridge driver
changes as with this patch alone pf backend cannot be used just yet.
Roman Bogorodskiy (1):
network: introduce Packet Filter firewall backend
meson.build | 2 +
po/POTFILES | 1 +
src/network/bridge_driver_conf.c | 4 +
src/network/bridge_driver_linux.c | 2 +
src/network/meson.build | 4 +
src/network/network_pf.c | 326 ++++++++++++++++++++++++++++++
src/network/network_pf.h | 26 +++
src/util/virfirewall.c | 4 +-
src/util/virfirewall.h | 2 +
9 files changed, 370 insertions(+), 1 deletion(-)
create mode 100644 src/network/network_pf.c
create mode 100644 src/network/network_pf.h
--
2.49.0
2 days, 20 hours
Support cloning of VMs - part 2
by Mark Cave-Ayland
Hi all,
I'm currently looking at how libvirt can be used to clone a saved VM,
and have been focusing on the previous thread on this topic at
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/YX....
My understanding from reading the thread is that the best way to
approach this is 1) add uuid properties to the relevant objects/devices
in QEMU where the UUID is user-visible, and 2) update libvirt to handle
these properties via XML.
Does this sound correct, or is there any more recent thinking about the
best approach to take?
ATB,
Mark.
4 days, 19 hours
[PATCH] build: prohibit realpath() by syntax-check
by Michal Privoznik
From: Michal Privoznik <mprivozn(a)redhat.com>
We have virFileCanonicalizePath() which calls realpath() but
also is present in our mocks (in contrast to realpath()).
Introduce a syntax-check rule to enforce use of our wrapper.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
build-aux/syntax-check.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 1303a0ce7e..27eabe6565 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -247,6 +247,12 @@ sc_prohibit_canonicalize_file_name:
halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \
$(_sc_search_regexp)
+sc_prohibit_realpath:
+ @prohibit='\<realpath\(' \
+ exclude='exempt from syntax-check' \
+ halt='use virFileCanonicalizePath() instead of realpath()' \
+ $(_sc_search_regexp)
+
# qsort from glibc has unstable sort ordering for "equal" members
sc_prohibit_qsort:
@prohibit='\<(qsort|qsort_r) *\(' \
@@ -1420,6 +1426,9 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \
exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \
^(build-aux/syntax-check\.mk|tests/virfilemock\.c)$$
+exclude_file_name_regexp--sc_prohibit_realpath = \
+ ^(build-aux/syntax-check\.mk|src/cpu_map/sync_qemu_features_i386\.py|tests/virfilemock\.c)$$
+
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
^(docs/advanced-tests\.rst|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c|tools/nss/libvirt_nss(_leases|_macs)?\.[ch])$$
--
2.49.0
4 days, 20 hours