[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 months
[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 months
[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 months
[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 months
[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 months
[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 months
[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 months
[PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix
by Kirill Shchetiniuk
When the new storage was created using virsh with --validate option
following errors occurred:
# virsh vol-create default --file vol-def.xml --validate
error: Failed to create vol from vol-def.xml
error: unsupported flags (0x4) in function virStorageVolDefParseXML
and after virStorageVolDefParse fix:
# virsh vol-create default --file vol-def.xml --validate
error: Failed to create vol from vol-def.xml
error: unsupported flags (0x4) in function storageBackendCreateQemuImg
Clear the VIR_STORAGE_VOL_CREATE_VALIDATE flag before
virStorageVolDefParseXML and backend->buildVol (traces down to
storageBackendCreateQemuImg) calls, as the XML schema validation is
already complete within previous steps and there is no validation later.
Signed-off-by: Kirill Shchetiniuk <kshcheti(a)redhat.com>
---
NEWS.rst | 5 +++++
src/conf/storage_conf.c | 2 ++
src/storage/storage_driver.c | 4 +++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/NEWS.rst b/NEWS.rst
index e2dc4e508b..dd345bad7b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -28,6 +28,11 @@ v11.3.0 (unreleased)
* **Bug fixes**
+ * storage: Fix new volume creation
+
+ No more errors occur when new storage volume is being created
+ using ``vol-create`` with ``--validate`` option.
+
v11.2.0 (2025-04-01)
====================
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 68842004b7..f6d804bb39 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -1409,6 +1409,8 @@ virStorageVolDefParse(virStoragePoolDef *pool,
"volume", &ctxt, "storagevol.rng", validate)))
return NULL;
+ flags &= ~(VIR_STORAGE_VOL_CREATE_VALIDATE);
+
return virStorageVolDefParseXML(pool, ctxt, flags);
}
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 86c03762d2..2f5a26bbef 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1877,6 +1877,7 @@ storageVolCreateXML(virStoragePoolPtr pool,
virStorageVolPtr vol = NULL, newvol = NULL;
g_autoptr(virStorageVolDef) voldef = NULL;
unsigned int parseFlags = VIR_VOL_XML_PARSE_OPT_CAPACITY;
+ unsigned int buildFlags = flags;
virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA |
VIR_STORAGE_VOL_CREATE_VALIDATE, NULL);
@@ -1953,8 +1954,8 @@ storageVolCreateXML(virStoragePoolPtr pool,
voldef->building = true;
virObjectUnlock(obj);
- buildret = backend->buildVol(obj, buildvoldef, flags);
+ buildFlags &= ~(VIR_STORAGE_VOL_CREATE_VALIDATE);
+ buildret = backend->buildVol(obj, buildvoldef, buildFlags);
VIR_FREE(buildvoldef);
--
2.48.1
2 months
[PATCH 0/4] qemu: Remove legacy 'nbd-export-add' code and deprecate corresponding capabilities
by Peter Krempa
Peter Krempa (4):
qemu: block: Always assume support for 'block-export-add'
qemu: monitor: Drop wrappers for 'nbd-server-add'
qemu: capabilities: Retire QEMU_CAPS_BLOCK_EXPORT_ADD
qemu: capabilities: Retire QEMU_CAPS_NBD_BITMAP
src/qemu/qemu_block.c | 7 -----
src/qemu/qemu_capabilities.c | 6 ++--
src/qemu/qemu_capabilities.h | 4 +--
src/qemu/qemu_monitor.c | 17 -----------
src/qemu/qemu_monitor.h | 5 ----
src/qemu/qemu_monitor_json.c | 28 -------------------
src/qemu/qemu_monitor_json.h | 6 ----
.../caps_10.0.0_s390x.xml | 2 --
.../caps_10.0.0_x86_64+amdsev.xml | 2 --
.../caps_10.0.0_x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_6.2.0_ppc64.xml | 2 --
.../caps_6.2.0_x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_7.0.0_ppc64.xml | 2 --
.../caps_7.0.0_x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 2 --
.../caps_7.1.0_x86_64.xml | 2 --
tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 2 --
.../caps_7.2.0_x86_64+hvf.xml | 2 --
.../caps_7.2.0_x86_64.xml | 2 --
.../caps_8.0.0_x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_8.1.0_s390x.xml | 2 --
.../caps_8.1.0_x86_64.xml | 2 --
.../caps_8.2.0_aarch64.xml | 2 --
.../caps_8.2.0_armv7l.xml | 2 --
.../caps_8.2.0_loongarch64.xml | 2 --
.../qemucapabilitiesdata/caps_8.2.0_s390x.xml | 2 --
.../caps_8.2.0_x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_9.0.0_sparc.xml | 2 --
.../caps_9.0.0_x86_64.xml | 2 --
.../caps_9.1.0_riscv64.xml | 2 --
.../qemucapabilitiesdata/caps_9.1.0_s390x.xml | 2 --
.../caps_9.1.0_x86_64.xml | 2 --
.../caps_9.2.0_aarch64+hvf.xml | 2 --
.../qemucapabilitiesdata/caps_9.2.0_s390x.xml | 2 --
.../caps_9.2.0_x86_64+amdsev.xml | 2 --
.../caps_9.2.0_x86_64.xml | 2 --
tests/qemumonitorjsontest.c | 2 --
37 files changed, 4 insertions(+), 129 deletions(-)
--
2.49.0
2 months
[PATCH] docs: drvqemu: Fix required minimum qemu version to 6.2.0
by Peter Krempa
From: Peter Krempa <pkrempa(a)redhat.com>
Commit 8824af826d3 (and also commit 073bf167843 before it) which bumped
minimu, qemu version forgot to update the qemu driver documentation page
Fixes: 8824af826d3
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/drvqemu.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/drvqemu.rst b/docs/drvqemu.rst
index e52d9ffd47..796aae587c 100644
--- a/docs/drvqemu.rst
+++ b/docs/drvqemu.rst
@@ -5,7 +5,7 @@
QEMU/KVM/HVF hypervisor driver
==============================
-The libvirt KVM/QEMU driver can manage any QEMU emulator from version 4.2.0 or
+The libvirt KVM/QEMU driver can manage any QEMU emulator from version 6.2.0 or
later.
It supports multiple QEMU accelerators: software
--
2.49.0
2 months