51616 Commits

Author SHA1 Message Date
Peter Krempa
2d6bd6f05f qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling
The field is named 'device' in the event so unify our naming.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
Peter Krempa
2f8359f827 qemu: Handle quirks of 'device' field of BLOCK_IO_ERROR event in monitor code
BLOCK_IO_ERROR's 'device' field is an empty string in case when it isn't
applicable as it was originally mandatory in the qemu API docs.

Move the logic that convert's empty string back to NULL from
'qemuProcessHandleIOError()' to 'qemuMonitorJSONHandleIOError()'

This also fixes a hypothetical NULL-dereference if qemu would indeed
report an IO error without the 'device' field present.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
Michal Privoznik
22e90a3b17 NEWS: Document virtio-mem-ccw
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
f23f8ff91a qemuxmlconftest: Introduce memory-hotplug-virtio-mem-ccw-s390x.xml
This is similar to emuxmlconfdata/memory-hotplug-virtio-mem-pci-s390x.xml
except the explicit placement of virtio-mem onto a PCI bus is removed.
This results in virtio-mem being placed onto CCW "bus" this demonstrating
previous commits working as expected.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
ee0320a7fc qemu: Allow virtio-mem on CCW
After previous commits, we can allow virtio-mem to live on CCW
channel.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
541dfe40bc qemu: Validate virtio-mem-ccw
There are basically two differences between virtio-mem-ccw and
virtio-mem-pci. s390 doesn't allow mixing different page sizes
and there's no NUMA support in QEMU.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
a46e33a925 qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW
This capability tracks whether QEMU supports virtio-mem-ccw
device. Introduced in QEMU commit v9.2.0-492-gaa910c20ec only
upcoming release of QEMU supports the device.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
621373d8a8 qemuxmlconftest: Introduce memory-hotplug-virtio-mem-pci-s390x.xml
As of v9.2.0-1413-gd77ae821e8 QEMU supports virtio-mem-pci on
s390 too. Let's add a test case for that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
89d56c41ac qemu_command: Use qemuBuildVirtioDevProps() to build cmd line for virtio-mem and virtio-pmem
Both, virtio-mem and virtio-pmem devices follow traditional QEMU
naming convention: their suffix determines what bus they live on.
For instance, virtio-mem-pci, virtio-mem-ccw, virtio-pmem-pci.
We already have a function that constructs device name following
this convention: qemuBuildVirtioDevGetConfigDev().

While there's no virtio-pmem-ccw device yet, the function can
still be used.

Another advantage of using the function is - it'll be easier in
future when we want to configure various virtio aspects of memory
devices (like ats, iommu_platform, etc.).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Michal Privoznik
a8ed747b9a qemu: Do NOT autoadd NUMA node for s390
In some cases, we might automatically add a NUMA node. But this
doesn't work for s390 really, because in its commit
v2.12.0-rc0~41^2~6 QEMU forbade specifying NUMA nodes for s390.
Suppress automatic adding of NUMA node on our side.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-02-04 09:15:45 +01:00
Pavel Hrdina
17f3a9114c libvirt.spec.in: fix indentation
Fixes: cf32953f5b6ec30386f71b40cf458467752a6dca
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2025-02-03 18:35:13 +01:00
Daniel P. Berrangé
cf32953f5b rpm: disable account creation for Fedora >= 42
In Fedora >= 42, support for user/group account creation based on
sysusers files has been enabled in RPM. Manually running useradd/
groupadd is thus obsolete.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-03 14:45:26 +00:00
Daniel P. Berrangé
2dd4f594ea tools: add sysusers file to create 'virtlogin' group
We previously added a sysusers file, but missed the 'virtlogin' group.
This group is used to make the virt-login-shell binary setgid, so we
shoudl be registering that too. It must be done in a separate sysusers
file, however, since it is packaged separately from the daemons.

Fixes: a2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-03 14:45:09 +00:00
Michal Privoznik
ff77c2d596 NEWS: Document VBOX-6.1 removal
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-31 10:54:13 +01:00
Michal Privoznik
da9a804f4e vbox: Drop code supporting old VBox version
Now that only supported version of VirtualBox is 7.0.x the code
that supports older versions can be dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-31 10:54:09 +01:00
Michal Privoznik
335bceb115 vbox: Drop support for VirtualBox-6.1.x
According to VirtualBox download page [1] the support for version
6.1.x was terminated a year ago. Drop support for it.

1: https://www.virtualbox.org/wiki/Download_Old_Builds_6_1

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-31 10:54:06 +01:00
Michal Privoznik
5ca7f27f75 vbox: Report an error when VBox CAPI initialization fails
If initialization of VBOX fails inside of _pfnInitialize an
negative value is returned to signal an error condition to a
caller but no error message is printed out. Reporting an error
may shed more light into why VBOX failed to initialize.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-31 10:54:03 +01:00
Michal Privoznik
10320ad526 vbox: Use g_autofree in tryLoadOne()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-31 10:53:47 +01:00
Jim Fehlig via Devel
4118e79f3e qemu: Check for valid save image format when verifying image header
When attempting to restore a saved image, the check for a valid save image
format does not occur until the qemu process is about to be executed. Move
the check earlier in the restore process, along with the other checks that
verify a valid save image header.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-31 08:53:51 +01:00
Jim Fehlig via Devel
517248e239 qemu: Decompose qemuSaveImageOpen
Split the reading of libvirt's save image metadata from the opening
of the fd that will be passed to QEMU. This allows improved error
handling and provides more flexibility users of qemu_saveimage.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-31 08:53:51 +01:00
Jim Fehlig via Devel
50d65b94ef qemu: Move unlinking corrupt save image file to caller
qemuDomainObjRestore is the only caller of qemuSaveImageOpen that
requests an unlink of a corrupted save image. Provide a function to
check for a corrupt image and move unlinking it to qemuDomainObjRestore.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-31 08:53:51 +01:00
Daniel P. Berrangé
18f0160994 remote: add sysusers file to create 'libvirt' group
We previously added a sysusers file, but missed the 'libvirt' group.
This group is referenced in the polkit rules, so we should be
registering that too. It must be done in a separate sysusers file,
however, since it is common to all daemons.

Fixes: a2c3e390f7bedf36f4ddc544d09fe3b8772c5c6f
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-30 15:19:35 +00:00
Adam Julis
1e88b8983c glibcompat: Sync g_string_replace()
Ever since its introduction, g_string_replace() has received
various bugfies and improvements, e.g.:

  0a8c7e57a g_string_replace: Don't replace empty string more than once per location
  b13777841 g_string_replace: Document behaviour of zero-length match pattern
  e8517e777 remove quadratic behavior in g_string_replace
  c9e48947e gstring: Fix a heap buffer overflow in the new g_string_replace() code

to name a few. Sync our implementation with the one from current
main branch of glib. Some code style adjustments have been made
to match our coding style.

Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-30 12:08:30 +01:00
Ankush Menat
8cf042d983 docs: add missing cellNum parameter in function call
Signed-off-by: Ankush Menat <ankushmenat@gmail.com>
2025-01-29 22:30:56 +05:30
kaihuan
c1166be347 qemuSnapshotDeleteValidate: Fix crash when disk is not found in VM definition
qemuDomainDiskByName() can return a NULL pointer on failure.
But this returned value in qemuSnapshotDeleteValidate is not checked.It will make libvirtd crash.

Signed-off-by: kaihuan <jungleman759@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 16:15:30 +01:00
Fabian Leditzky
00f9f2ca1f qemu: Check empty drives in block I/O throttle API
Provide a proper user facing error when attempting to query block
I/O throttling settings for an empty drive. Without this patch, a less
meaningful internal error produced by qemuMonitorJSONBlockIoThrottleInfo
would be propagated to the user.

Signed-off-by: Fabian Leditzky <fabian@ldsoft.dev>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 16:15:29 +01:00
Adam Julis
fce24e433b Support IDE/SATA disk 'product' parameter
Since we supported 'product' parameter for SCSI, just expanded existing
solution makes IDE/SATA parameter works too. QEMU requires parameter 'model'
in case of IDE/SATA (instead of 'product'), so the process of making JSON
object is slightly modified. Length of the 'product' parameter is
different in SCSI (16 chars) and ATA/SATA (40 chars).

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/697
Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 16:15:29 +01:00
Pavel Hrdina
443ae4adec qemu_snapshot: allow reverting to external disk only snapshot
When snapshot is created with disk-only flag it is always external
snapshot without memory state. Historically when there was not support
to revert external snapshots this produced error message.

    error: Failed to revert snapshot s1
    error: internal error: Invalid target domain state 'disk-snapshot'. Refusing snapshot reversion

Now we can simply consider this as reverting to offline snapshot as the
possible damage to file system is already done at the point of snapshot
creation.

Resolves: https://issues.redhat.com/browse/RHEL-21549
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 15:50:19 +01:00
Bronek Kozicki
2c79c42477 tools: Move libvirt-guests lock file out of subsys directory
This directory might not exist on systems not supporting old SystemV interfaces.

Signed-off-by: Bronek Kozicki <brok@incorrekt.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 12:42:27 +01:00
Philipp Schuster
1cc990a1d0 virsh: pool-list: remove unnecessary spaces to align behavior
By removing the unnecessary spaces, the behavior is aligned with
`virsh list --all --name` and `virsh net-list --all --name`.

Without this change, one can't do something like the following easily:

`virsh pool-list --all --name | xargs -I {} virsh pool-start \"{}\"`

as no pool `"foo    "` (with all the spaces) actually exist.

Although the removed comment states that the additional spaces were kept
to maintain backwards compatibility, the commit [0] and the old behavior
are from 2010 when libvirt was at version 0.8.1. For the sake of sanity,
the behavior should be aligned with other parts of the CLI.

[0] 415b14903e

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 12:42:27 +01:00
Assaf Admi
f6d76aad80 docs: Document that 'vcpu.delay' statistic is in nanoseconds
Add nanoseconds units for vcpu.delay doc, as it's based on
'/proc/<pid>/task/<tid>/schedstat' (see 'qemuGetSchedstatDelay()').

'schedstat' is in nanoseconds, according to
https://docs.kernel.org/scheduler/sched-stats.html#proc-pid-schedstat.

Signed-off-by: aadmi <aadmi@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-29 12:42:27 +01:00
Remus-Gabriel Chelu
0264a7704a Translated using Weblate (Romanian)
Currently translated at 14.9% (1611 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ro/

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2025-01-28 18:19:42 +01:00
김인수
879ee4aee8 Translated using Weblate (Korean)
Currently translated at 100.0% (10781 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Signed-off-by: 김인수 <simmon@nplob.com>

Translated using Weblate (Korean)

Currently translated at 99.6% (10745 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Signed-off-by: 김인수 <simmon@nplob.com>

Translated using Weblate (Korean)

Currently translated at 98.4% (10619 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Signed-off-by: 김인수 <simmon@nplob.com>
2025-01-28 18:19:41 +01:00
Nicolás Gal
c4c05c8655 Translated using Weblate (Spanish)
Currently translated at 50.0% (5400 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 50.0% (5395 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 50.0% (5391 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 49.6% (5357 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 49.0% (5287 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 48.3% (5212 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolás Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 47.9% (5173 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolas Gal <nialegal@yandex.com>

Translated using Weblate (Spanish)

Currently translated at 47.7% (5149 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-28 18:19:41 +01:00
Salvatore Cocuzza
008560b0b2 Translated using Weblate (Italian)
Currently translated at 21.4% (2315 of 10781 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/it/

Signed-off-by: Salvatore Cocuzza <info@salvatorecocuzza.it>
2025-01-28 18:19:40 +01:00
Peter Krempa
72142dcde3 qemuProcessHandleIOError: Refactor to extract 'priv' instead of 'driver'
The VM private data will be used in a sub-sequent patch. To minimize
churn, refactor the function before changing the logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-28 17:04:39 +01:00
Peter Krempa
420c39d6bd build: Bump minimum glib2 version to 2.66.0
Per our supported platforms the minimum available versions are:

         CentOS Stream 9: 2.68.4
               Debian 11: 2.66.8
               Fedora 39: 2.78.6
      openSUSE Leap 15.6: 2.78.6
            Ubuntu 22.04: 2.72.4
           FreeBSD ports: 2.80.5
          macOS homebrew: 2.82.4
          macOS macports: 2.78.4

Bump to 2.66 which is limited by Debian 11. While ideally we'd bump to
2.68 which would give us 'g_strv_builder' and friends 2.66 is enough for
g_ptr_array_steal() which can be used to emulate the former with almost
no extra code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-01-28 17:04:39 +01:00
Adam Julis
62b961d64c conf: check size of secret file for secret object
Since the empty file with a .base64 value wasn't recognized during the loading
process (starting of libvirtd), attempting to get a value for the UUID resulted
in an undefined error. This patch resolves the issue by checking the size of
the file and ensuring that the stored value is as expected (NULL).

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Adam Julis <ajulis@redhat.com>
2025-01-28 11:08:58 +00:00
Michal Privoznik
4819a14fec ch: Include unistd.h in ch_events.c
There's a call to read() in the file but corresponding include of
unistd.h is missing causing a build failure.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-01-27 17:35:53 +01:00
Jiri Denemark
8b1578ab4b qemu: Allow virDomainBlockJobSetSpeed during migration
When a migration with non-shared storage is started with
VIR_MIGRATE_PARAM_BANDWIDTH set, it will be applied to both memory
migration and each block job started for storage migration. Once the
migration is running virDomainMigrateSetMaxSpeed may be used to change
the bandwidth used by memory migration, but there was no way of changing
storage migration speed. Let's allow virDomainBlockJobSetSpeed during
migration to enable the missing functionality.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 16:32:57 +01:00
Jiri Denemark
d9fca42e40 qemu: Add support for avail-switchover-bandwidth migration parameter
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 16:32:57 +01:00
Jiri Denemark
4bd103dde6 virsh migrate: Add --available-switchover-bandwidth option
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 16:32:57 +01:00
Jiri Denemark
c417ebf660 Add a migration parameter for available bandwidth in switchover
The new VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER parameter can be
used to override the estimated bandwidth that can be used for
transferring guest memory and device state once virtual CPUs are
stopped.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 16:32:57 +01:00
Andrea Bolognani
32cf090b84 rpm: Unify handling of directories used for loadable modules
Now that meson ensures these directories always exist, we can
move them to the daemon-common package where they belong.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 11:30:32 +01:00
Andrea Bolognani
40b5c302ab rpm: Add missing Requires
All loadable modules should depend on the daemon-common package.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 11:30:30 +01:00
Andrea Bolognani
676453a0a7 meson: Unify handling of directories used for loadable modules
Currently the directories that are searched for each possible
kind of loadable module are created as a side effect of
installing the corresponding module, which means that their
availability depends on the exact list of features that have
been enabled.

Create them explicitly ahead of time instead, ensuring
consistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-27 11:30:21 +01:00
Anirudh Rayabharam
e797c3e3b3 ch: implement domainInterfaceAddresses
Implement domainInterfaceAddresses for the Cloud Hypervisor driver.
Support VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE and
VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP sources. Implementation is
similar to other drivers.

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:18:35 +01:00
Purna Pavan Chandra Aekkaladevi
a9c73ac255 NEWS: Mention event handling support in ch driver
Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
Purna Pavan Chandra Aekkaladevi
90299b0c6c ch: events: facilitate lifecycle events handling
Implement `virCHProcessEvent` that maps event string to corresponding
event type and take appropriate actions. As part of this, handle the
shutdown event by correctly updating the domain state. This change also
facilitates the handling of other VM lifecycle events, such as booting,
rebooting, pause, resume, etc.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
Purna Pavan Chandra Aekkaladevi
104b0036ad ch: events: Read and parse cloud-hypervisor events
Implement `chReadProcessEvents` and `chProcessEvents` to read events from
event monitor FIFO file and parse them accordingly.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00