[libvirt PATCH] ch: fix double space in error message
by Ján Tomko
From: Ján Tomko <jtomko(a)redhat.com>
Make it match the errors in bhyve and QEMU drivers, where it was copied
from.
Fixes: 9d6e2d127e673642b0fb135b6d58539a8e332e08
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
Pushed as trivial.
src/ch/ch_monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c
index 78b6551d6c..2a6638db4f 100644
--- a/src/ch/ch_monitor.c
+++ b/src/ch/ch_monitor.c
@@ -674,7 +674,7 @@ virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg, int logfile)
if ((rv = virPidFileReadPath(priv->pidfile, &vm->pid)) < 0) {
virReportSystemError(-rv,
- _("Domain %1$s didn't show up"),
+ _("Domain %1$s didn't show up"),
vm->def->name);
return NULL;
}
--
2.49.0
2 weeks, 3 days
[PATCH 0/3] qemu: block copy fixes
by Peter Krempa
Three patches fixing various bits in block copy job setup.
Peter Krempa (3):
qemu: domain: Unexport
'qemuDomainPrepareStorageSourceBlockdevNodename'
qemuDomainBlockCopyCommon: Reorder setup of 'mirror' data
qemuDomainBlockCopyCommon: Don't revoke access to file twice on
failure
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain.h | 5 -----
src/qemu/qemu_driver.c | 18 ++++++++----------
3 files changed, 9 insertions(+), 16 deletions(-)
--
2.49.0
2 weeks, 3 days
[PATCH 0/2] Fix migration with TPM on shared storage
by Jiri Denemark
Jiri Denemark (2):
qemu: Rename outgoingMigration parameter in various TPM functions
qemu: Properly propagate migration state to TPM cleanup code
src/qemu/qemu_domain.c | 8 ++++----
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_driver.c | 7 +++++--
src/qemu/qemu_extdevice.c | 8 ++++----
src/qemu/qemu_extdevice.h | 4 ++--
src/qemu/qemu_migration.c | 6 +++---
src/qemu/qemu_process.c | 8 ++------
src/qemu/qemu_tpm.c | 19 +++++++++----------
src/qemu/qemu_tpm.h | 4 ++--
9 files changed, 32 insertions(+), 34 deletions(-)
--
2.49.0
2 weeks, 4 days
[PATCH 0/2] Silence more DBus errors
by Michal Privoznik
This is basically a follow up to [1] as new places were identified which
suffer the same problem.
1: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/WG...
Michal Prívozník (2):
virinhibitor: Suppress reporting an error when D-Bus is unavailable in
virInhibitorAcquire()
network: Suppress reporting an error when D-Bus is unavailable in
networkStateInitialize()
src/network/bridge_driver.c | 3 ++-
src/util/virinhibitor.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
2.49.0
2 weeks, 4 days
[PATCH] esx: Accept empty "path" URI component same way as "/"
by Peter Krempa
From: Peter Krempa <pkrempa(a)redhat.com>
When connecting to "esx://" URI there's code which prints a warning that
the path is not "empty". The check validates that "uri->path" is "/".
In case when the user uses URI such as:
esx://hostname
the warning is printed as well. Since there is no effective difference
betweeen the two allow empty strings as well.
Resolves: https://issues.redhat.com/browse/RHEL-86459
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/esx/esx_driver.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 6ae4ef9658..512ca6c028 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -687,7 +687,9 @@ esxConnectToVCenter(esxPrivate *priv,
g_autofree char *url = NULL;
if (!hostSystemIPAddress &&
- (!priv->parsedUri->path || STREQ(priv->parsedUri->path, "/"))) {
+ (!priv->parsedUri->path ||
+ STREQ(priv->parsedUri->path, "") ||
+ STREQ(priv->parsedUri->path, "/"))) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Path has to specify the datacenter and compute resource"));
return -1;
@@ -799,6 +801,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
if (STRCASENEQ(conn->uri->scheme, "vpx") &&
+ STRNEQ(conn->uri->path, "") &&
STRNEQ(conn->uri->path, "/")) {
VIR_WARN("Ignoring unexpected path '%s' for non-vpx scheme '%s'",
conn->uri->path, conn->uri->scheme);
--
2.49.0
2 weeks, 4 days
[PATCH 0/5] virNodeGetInfo: Fix docs and propagate them to 'virsh nodeinfo'
by Peter Krempa
Patches 1,2 cleanup the code the rest deals with docs.
Peter Krempa (5):
virHostCPUGetInfoPopulateLinux: Use automatic memory freeing
virHostCPUGetInfoPopulateLinux: Remove 'cleanup'
libvirt-host: Clarify/fix description of the CPU frequency field
virNodeGetInfo: Improve description of the case when fake data is
reported
manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh
nodeinfo'
docs/manpages/virsh.rst | 23 ++++++++++++++++----
src/libvirt-host.c | 21 ++++++++++--------
src/util/virhostcpu.c | 47 +++++++++++++++++------------------------
3 files changed, 50 insertions(+), 41 deletions(-)
--
2.49.0
2 weeks, 4 days
[PATCH] bhyve: support interface type 'network'
by Roman Bogorodskiy
Add support for interface type 'network'. While bridge remains the only
supported options for networks in bhyve, supporting interface type
'network' allows easier configuration and makes domain XMLs more
compatible with the other drivers.
While here, update the error message for the unsupported interface type
to print the requested network type string instead of an integer to make
it more user-friendly.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
src/bhyve/bhyve_command.c | 44 ++++++++++++++++++++++++++++++++++-----
src/bhyve/bhyve_process.c | 30 +++++++++++++++++++-------
2 files changed, 62 insertions(+), 12 deletions(-)
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index bc287307c8..123d81699f 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -2,6 +2,7 @@
* bhyve_command.c: bhyve command generation
*
* Copyright (C) 2014 Roman Bogorodskiy
+ * Copyright (C) 2025 The FreeBSD Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,6 +27,7 @@
#include "bhyve_domain.h"
#include "bhyve_conf.h"
#include "bhyve_driver.h"
+#include "domain_validate.h"
#include "datatypes.h"
#include "viralloc.h"
#include "virfile.h"
@@ -40,7 +42,7 @@
VIR_LOG_INIT("bhyve.bhyve_command");
static int
-bhyveBuildNetArgStr(const virDomainDef *def,
+bhyveBuildNetArgStr(virDomainDef *def,
virDomainNetDef *net,
struct _bhyveConn *driver,
virCommand *cmd,
@@ -52,6 +54,7 @@ bhyveBuildNetArgStr(const virDomainDef *def,
char *nic_model = NULL;
int ret = -1;
virDomainNetType actualType = virDomainNetGetActualType(net);
+ g_autoptr(virConnect) netconn = NULL;
if (net->model == VIR_DOMAIN_NET_MODEL_VIRTIO) {
nic_model = g_strdup("virtio-net");
@@ -69,12 +72,43 @@ bhyveBuildNetArgStr(const virDomainDef *def,
return -1;
}
- if (actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) {
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
+ if (!netconn && !(netconn = virGetConnectNetwork()))
+ goto cleanup;
+ if (virDomainNetAllocateActualDevice(netconn, def, net) < 0)
+ goto cleanup;
+ }
+ /* final validation now that actual type is known */
+ if (virDomainActualNetDefValidate(net) < 0)
+ return -1;
+
+ switch (actualType) {
+ case VIR_DOMAIN_NET_TYPE_NETWORK:
+ case VIR_DOMAIN_NET_TYPE_BRIDGE:
brname = g_strdup(virDomainNetGetActualBridgeName(net));
- } else {
+ if (!brname) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("No bridge name specified"));
+ goto cleanup;
+ }
+ break;
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
+ case VIR_DOMAIN_NET_TYPE_DIRECT:
+ case VIR_DOMAIN_NET_TYPE_USER:
+ case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
+ case VIR_DOMAIN_NET_TYPE_SERVER:
+ case VIR_DOMAIN_NET_TYPE_CLIENT:
+ case VIR_DOMAIN_NET_TYPE_MCAST:
+ case VIR_DOMAIN_NET_TYPE_UDP:
+ case VIR_DOMAIN_NET_TYPE_INTERNAL:
+ case VIR_DOMAIN_NET_TYPE_HOSTDEV:
+ case VIR_DOMAIN_NET_TYPE_VDPA:
+ case VIR_DOMAIN_NET_TYPE_NULL:
+ case VIR_DOMAIN_NET_TYPE_VDS:
+ case VIR_DOMAIN_NET_TYPE_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Network type %1$d is not supported"),
- virDomainNetGetActualType(net));
+ _("Unsupported network type %1$s"),
+ virDomainNetTypeToString(actualType));
goto cleanup;
}
diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c
index 3e6f678cf5..a17994e2a0 100644
--- a/src/bhyve/bhyve_process.c
+++ b/src/bhyve/bhyve_process.c
@@ -2,6 +2,7 @@
* bhyve_process.c: bhyve process management
*
* Copyright (C) 2014 Roman Bogorodskiy
+ * Copyright (C) 2025 The FreeBSD Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -71,18 +72,23 @@ static void
bhyveNetCleanup(virDomainObj *vm)
{
size_t i;
+ g_autoptr(virConnect) conn = NULL;
for (i = 0; i < vm->def->nnets; i++) {
virDomainNetDef *net = vm->def->nets[i];
virDomainNetType actualType = virDomainNetGetActualType(net);
- if (actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) {
- if (net->ifname) {
- ignore_value(virNetDevBridgeRemovePort(
- virDomainNetGetActualBridgeName(net),
- net->ifname));
- ignore_value(virNetDevTapDelete(net->ifname, NULL));
- }
+ if (net->ifname) {
+ ignore_value(virNetDevBridgeRemovePort(
+ virDomainNetGetActualBridgeName(net),
+ net->ifname));
+ ignore_value(virNetDevTapDelete(net->ifname, NULL));
+ }
+ if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK) {
+ if (conn || (conn = virGetConnectNetwork()))
+ virDomainNetReleaseActualDevice(conn, net);
+ else
+ VIR_WARN("Unable to release network device '%s'", NULLSTR(net->ifname));
}
}
}
@@ -437,6 +443,8 @@ virBhyveProcessReconnect(virDomainObj *vm,
char **proc_argv;
char *expected_proctitle = NULL;
bhyveDomainObjPrivate *priv = vm->privateData;
+ g_autoptr(virConnect) conn = NULL;
+ size_t i;
int ret = -1;
if (!virDomainObjIsActive(vm))
@@ -469,6 +477,14 @@ virBhyveProcessReconnect(virDomainObj *vm,
}
}
+ for (i = 0; i < vm->def->nnets; i++) {
+ virDomainNetDef *net = vm->def->nets[i];
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK && !conn)
+ conn = virGetConnectNetwork();
+
+ virDomainNetNotifyActualDevice(conn, vm->def, net);
+ }
+
cleanup:
if (ret < 0) {
/* If VM is reported to be in active state, but we cannot find
--
2.49.0
2 weeks, 4 days
[PATCH 0/3] bhyve: support random number generator device
by Roman Bogorodskiy
Roman Bogorodskiy (3):
bhyve: support random number generator device
bhyve: argv2xml: support virtio-rnd devices
bhyve: extend RNG device validation
src/bhyve/bhyve_capabilities.c | 15 ++++++++
src/bhyve/bhyve_capabilities.h | 2 +
src/bhyve/bhyve_command.c | 23 ++++++++++++
src/bhyve/bhyve_device.c | 11 ++++++
src/bhyve/bhyve_domain.c | 21 +++++++++++
src/bhyve/bhyve_parse_command.c | 29 +++++++++++++++
.../bhyveargv2xml-virtio-rnd.args | 8 ++++
.../bhyveargv2xml-virtio-rnd.xml | 20 ++++++++++
tests/bhyveargv2xmltest.c | 1 +
...yvexml2argv-virtio-rnd-backend-builtin.xml | 26 +++++++++++++
...io-rnd-backend-random-non-default-file.xml | 26 +++++++++++++
.../bhyvexml2argv-virtio-rnd-transitional.xml | 26 +++++++++++++
.../bhyvexml2argv-virtio-rnd.args | 11 ++++++
.../bhyvexml2argv-virtio-rnd.ldargs | 4 ++
.../bhyvexml2argv-virtio-rnd.xml | 26 +++++++++++++
tests/bhyvexml2argvtest.c | 6 +++
.../bhyvexml2xmlout-virtio-rnd.xml | 37 +++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
18 files changed, 293 insertions(+)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-rnd.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-rnd.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd-backend-builtin.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd-backend-random-non-default-file.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd-transitional.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-virtio-rnd.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-virtio-rnd.xml
--
2.49.0
2 weeks, 4 days
[PATCH] NEWS: Mention fix for 'qemu-rdp' error being logged
by Peter Krempa
From: Peter Krempa <pkrempa(a)redhat.com>
Add the news entry stating that it's safe to ignore the error.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 2608086717..18b873abe9 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -34,6 +34,16 @@ v11.3.0 (unreleased)
installed and thus every attempt to start an ARM domain with custom
CPU definition would fail.
+ * Don't spam logs with with error about ``qemu-rdp`` when starting a qemu VM
+
+ On hosts where the ``qemu-rdp`` binary is not installed a start of a VM
+ would cause an error such as ::
+
+ error : qemuRdpNewForHelper:103 : 'qemu-rdp' is not a suitable qemu-rdp helper name: No such file or directory
+
+ To be logged in the system log. It is safe to ignore the error. The code
+ was fixed to avoid the message when probing for support.
+
v11.2.0 (2025-04-01)
====================
--
2.49.0
2 weeks, 5 days