[PATCH 0/6] ch: handle events from cloud-hypervisor
by Purna Pavan Chandra Aekkaladevi
cloud-hypervisor raises various events, including VM lifecylce operations
such as boot, shutdown, pause, resume, etc. Libvirt will now read these
events and take the necessary actions, such as correctly updating the
domain state. A FIFO file is passed to `--event-monitor` option of
cloud-hypervisor. Libvirt creates a new thread that acts as the reader
of the fifo file and continuously monitors for new events. Currently,
shutdown events are handled by updating the domain state appropriately.
Purna Pavan Chandra Aekkaladevi (6):
utils: Implement virFileIsNamedPipe
ch: pass --event-monitor option to cloud-hypervisor
ch: start a new thread for handling ch events
ch: events: Read and parse cloud-hypervisor events
ch: events: facilitate lifecycle events handling
NEWS: Mention event handling support in ch driver
NEWS.rst | 7 +
po/POTFILES | 1 +
src/ch/ch_events.c | 337 +++++++++++++++++++++++++++++++++++++++
src/ch/ch_events.h | 54 +++++++
src/ch/ch_monitor.c | 48 +++++-
src/ch/ch_monitor.h | 11 ++
src/ch/meson.build | 2 +
src/libvirt_private.syms | 1 +
src/util/virfile.c | 8 +
src/util/virfile.h | 1 +
10 files changed, 466 insertions(+), 4 deletions(-)
create mode 100644 src/ch/ch_events.c
create mode 100644 src/ch/ch_events.h
--
2.34.1
2 months
Release of libvirt-10.8.0
by Jiri Denemark
The 10.8.0 release of both libvirt and libvirt-python is tagged and
signed tarballs are available at
https://download.libvirt.org/
https://download.libvirt.org/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* Improvements
* network: make networks with ``<forward mode='open'/>`` more useful
It is now permissable to have a ``<forward mode='open'>`` network that
has no IP address assigned to the host's port of the bridge. This
is the only way to create a libvirt network where guests are
unreachable from the host (and vice versa) and also 0 firewall
rules are added on the host.
It is now also possible for a ``<forward mode='open'/>`` network to
use the ``zone`` attribute of ``<bridge>`` to set the firewalld zone of
the bridge interface (normally it would not be set, as is done
with other forward modes).
* storage: Lessen dependancy on the ``showmount`` program
Libvirt now automatically detects presence of ``showmount`` during runtime
as we do with other helper programs and also the
``daemon-driver-storage-core`` RPM package now doesn't strongly depend on it
if the users wish for a more minimal deployment.
* Switch from YAJL to json-c for JSON parsing and formatting
The parser and formatter in the libvirt library, as well
as the parsers in the nss plugin were rewritten to use json-c
instead of YAJL, which is effectively dead upstream.
* Relax restrictions for memorytune settings
It should now be possible to use resctrl on AMD CPUs as well as Intel CPUs
when the resctrl filesystem is mounted with ``mba_MBps`` option.
* Bug fixes
* virsh: Fix script-friedly output of ``virsh list --uuid``
The script-friendly output of just 1 UUID per line was mistakenly replaced
by the full human-targetted table view full of redundant information
and very hard to parse. Users who wish to see the UUIDs in the tabular
output need to use ``virsh list --table --uuid`` as old behaviour was
reverted.
Note that this also broke the ``libvirt-guests`` script. The bug was
introduced in `v10.7.0 (2024-09-02)`_.
* network/qemu: fix some cases where ``device-update`` of a network
interface was failing:
* If the interface was connected to a libvirt network that was
providing a pool of VFs to be used with macvtap passthrough
mode, then *any* update to the interface would fail, even
changing the link state. Updating (the updateable parts of) a
macvtap passthrough interface will now succeed.
* It previously was not possible to move an interface from a Linux
host bridge to an OVS bridge. This (and the opposite direction)
now works.
* qemu: backup: Fix possible crashes when running monitoring commands during backup job
The qemu monitor code was fixed to not crash in specific cases when
monitoing APIs are called during a backup job.
* Fix various memleaks and overflows
Multiple memory leaks and overflows in corner cases were fixed based on
upstream issues reported.
* network: Better cleanup after disappeared networks
If a network disappeared while virtnetworkd was not running not all clean up
was done properly once the daemon was started, especially when only the
network interface disappeared. This could have in some cases resulted in
the network being shown as inactive, but not being able to start.
* qemu: Remember memory backing directory for domains
If ``memory_backing_dir`` is changed during the lifetime of a domain with
file backed memory, files in the old directory would not be cleaned up once
the domain is shut down. Now the directory that was used during startup is
remembered for each running domain.
Enjoy.
Jirka
2 months
[PATCH] (for 10.8.0? undecided) qemu: fix regression in update-device for interfaces
by Laine Stump
Commit a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f eliminated a failure
to update *any* change in an interface that was connected via a
network that consisted of a pool of VFs using macvtap passthrough
mode. Unfortunately it caused a regression that results in failure to
update changes to bandwidth/vlan/trustGuestRxFilters in any interface
connected via a network that uses a bridge to connect tap devices.
This fixes that problem by narrowing the usage of the fix in the
earlier patch to only be done in the case that the the interface is
connected via a macvtap+passthrough network.
Signed-off-by: Laine Stump <laine(a)redhat.com>
Fixes: a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f
---
The alternatives to this are:
1) revert a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f (but I haven't
checked yet if that will cause problems with the other patches in
that same series) to eliminate the regression but also unfix the
bug that was fixed, or
2) Do nothing and release with the regression.
Wish I'd found this a couple days earlier :-/
src/qemu/qemu_hotplug.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 09a37caf85..4d4bcde1bc 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3918,12 +3918,19 @@ qemuDomainChangeNet(virQEMUDriver *driver,
* free it if we fail for any reason
*/
if (newdev->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if (olddev->type == VIR_DOMAIN_NET_TYPE_NETWORK
- && STREQ(olddev->data.network.name, newdev->data.network.name)) {
+ if (olddev->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
+ oldType == VIR_DOMAIN_NET_TYPE_DIRECT &&
+ virDomainNetGetActualDirectMode(olddev) == VIR_NETDEV_MACVLAN_MODE_PASSTHRU &&
+ STREQ(olddev->data.network.name, newdev->data.network.name)) {
/* old and new are type='network', and the network name
- * hasn't changed. In this case we *don't* want to get a
- * new port ("actual device") from the network because we
- * can use the old one (since it hasn't changed).
+ * hasn't changed *and* this is a network where each
+ * connection is allocated exclusive use of a VF
+ * device. In this case we *don't* want to get a new port
+ * ("actual device") from the network because attempting
+ * to allocate a new device would also allocate a
+ * new/different VF, causing the update to fail. And
+ * anyway we can use olddev's actualNetDef (since it
+ * hasn't changed).
*
* So instead we just duplicate *the pointer to* the
* actualNetDef from olddev to newdev so that comparisons
--
2.46.1
2 months
[PATCH 0/2] qemu: blockjob: Fix ordering of operations when concluding a block copy
by Peter Krempa
Modify the ordering so that the VM definition stays in a state allowing
us to format a valid XML for the virt-aa-helper.
Peter Krempa (2):
qemu: blockjob: Update 'mirror' of a copy job before removing images
qemu: blockjob: Clean out disk mirror data after concluding the job
src/qemu/qemu_blockjob.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
--
2.46.0
2 months