]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
5 months agoqemuxmlconftest: Introduce memory-hotplug-virtio-mem-ccw-s390x.xml
Michal Privoznik [Tue, 28 Jan 2025 07:54:36 +0000 (08:54 +0100)] 
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>
5 months agoqemu: Allow virtio-mem on CCW
Michal Privoznik [Wed, 15 Jan 2025 12:00:36 +0000 (13:00 +0100)] 
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>
5 months agoqemu: Validate virtio-mem-ccw
Michal Privoznik [Wed, 15 Jan 2025 14:48:41 +0000 (15:48 +0100)] 
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>
5 months agoqemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW
Michal Privoznik [Wed, 15 Jan 2025 09:46:16 +0000 (10:46 +0100)] 
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>
5 months agoqemuxmlconftest: Introduce memory-hotplug-virtio-mem-pci-s390x.xml
Michal Privoznik [Wed, 15 Jan 2025 09:45:31 +0000 (10:45 +0100)] 
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>
5 months agoqemu_command: Use qemuBuildVirtioDevProps() to build cmd line for virtio-mem and...
Michal Privoznik [Mon, 13 Jan 2025 14:48:03 +0000 (15:48 +0100)] 
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>
5 months agoqemu: Do NOT autoadd NUMA node for s390
Michal Privoznik [Mon, 20 Jan 2025 16:10:24 +0000 (17:10 +0100)] 
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>
5 months agolibvirt.spec.in: fix indentation
Pavel Hrdina [Mon, 3 Feb 2025 17:35:13 +0000 (18:35 +0100)] 
libvirt.spec.in: fix indentation

Fixes: cf32953f5b6ec30386f71b40cf458467752a6dca
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
5 months agorpm: disable account creation for Fedora >= 42
Daniel P. Berrangé [Wed, 29 Jan 2025 15:52:02 +0000 (15:52 +0000)] 
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>
5 months agotools: add sysusers file to create 'virtlogin' group
Daniel P. Berrangé [Wed, 29 Jan 2025 15:37:46 +0000 (15:37 +0000)] 
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>
5 months agoNEWS: Document VBOX-6.1 removal
Michal Privoznik [Tue, 28 Jan 2025 12:18:02 +0000 (13:18 +0100)] 
NEWS: Document VBOX-6.1 removal

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
5 months agovbox: Drop code supporting old VBox version
Michal Privoznik [Fri, 27 Sep 2024 07:04:17 +0000 (09:04 +0200)] 
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>
5 months agovbox: Drop support for VirtualBox-6.1.x
Michal Privoznik [Fri, 27 Sep 2024 06:49:22 +0000 (08:49 +0200)] 
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>
5 months agovbox: Report an error when VBox CAPI initialization fails
Michal Privoznik [Sat, 5 Oct 2024 21:50:25 +0000 (23:50 +0200)] 
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>
5 months agovbox: Use g_autofree in tryLoadOne()
Michal Privoznik [Thu, 26 Sep 2024 08:53:01 +0000 (10:53 +0200)] 
vbox: Use g_autofree in tryLoadOne()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
5 months agoqemu: Check for valid save image format when verifying image header
Jim Fehlig via Devel [Fri, 31 Jan 2025 02:29:04 +0000 (19:29 -0700)] 
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>
5 months agoqemu: Decompose qemuSaveImageOpen
Jim Fehlig via Devel [Fri, 31 Jan 2025 02:29:03 +0000 (19:29 -0700)] 
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>
5 months agoqemu: Move unlinking corrupt save image file to caller
Jim Fehlig via Devel [Fri, 31 Jan 2025 02:29:02 +0000 (19:29 -0700)] 
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>
5 months agoremote: add sysusers file to create 'libvirt' group
Daniel P. Berrangé [Wed, 29 Jan 2025 15:37:46 +0000 (15:37 +0000)] 
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>
5 months agoglibcompat: Sync g_string_replace()
Adam Julis [Wed, 29 Jan 2025 16:02:45 +0000 (17:02 +0100)] 
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>
5 months agodocs: add missing cellNum parameter in function call
Ankush Menat [Wed, 29 Jan 2025 16:48:46 +0000 (16:48 +0000)] 
docs: add missing cellNum parameter in function call

Signed-off-by: Ankush Menat <ankushmenat@gmail.com>
5 months agoqemuSnapshotDeleteValidate: Fix crash when disk is not found in VM definition
kaihuan [Fri, 29 Nov 2024 14:56:45 +0000 (22:56 +0800)] 
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>
5 months agoqemu: Check empty drives in block I/O throttle API
Fabian Leditzky [Tue, 21 Jan 2025 14:33:25 +0000 (14:33 +0000)] 
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>
5 months agoSupport IDE/SATA disk 'product' parameter
Adam Julis [Sat, 18 Jan 2025 10:30:20 +0000 (11:30 +0100)] 
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>
5 months agoqemu_snapshot: allow reverting to external disk only snapshot
Pavel Hrdina [Wed, 31 Jan 2024 16:14:28 +0000 (17:14 +0100)] 
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>
5 months agotools: Move libvirt-guests lock file out of subsys directory
Bronek Kozicki [Mon, 16 Dec 2024 11:15:26 +0000 (11:15 +0000)] 
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>
5 months agovirsh: pool-list: remove unnecessary spaces to align behavior
Philipp Schuster [Wed, 8 Jan 2025 16:38:15 +0000 (17:38 +0100)] 
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] https://gitlab.com/libvirt/libvirt/-/commit/415b14903e816aeb98d6f9c16fba045686cb0765

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
5 months agodocs: Document that 'vcpu.delay' statistic is in nanoseconds
Assaf Admi [Tue, 7 May 2024 08:58:06 +0000 (11:58 +0300)] 
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>
5 months agoTranslated using Weblate (Romanian)
Remus-Gabriel Chelu [Tue, 28 Jan 2025 17:19:42 +0000 (18:19 +0100)] 
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>
5 months agoTranslated using Weblate (Korean)
김인수 [Tue, 28 Jan 2025 17:19:41 +0000 (18:19 +0100)] 
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>
5 months agoTranslated using Weblate (Spanish)
Nicolás Gal [Tue, 28 Jan 2025 17:19:41 +0000 (18:19 +0100)] 
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>
5 months agoTranslated using Weblate (Italian)
Salvatore Cocuzza [Tue, 28 Jan 2025 17:19:40 +0000 (18:19 +0100)] 
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>
5 months agoqemuProcessHandleIOError: Refactor to extract 'priv' instead of 'driver'
Peter Krempa [Fri, 24 Jan 2025 16:16:35 +0000 (17:16 +0100)] 
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>
5 months agobuild: Bump minimum glib2 version to 2.66.0
Peter Krempa [Mon, 27 Jan 2025 16:42:34 +0000 (17:42 +0100)] 
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>
5 months agoconf: check size of secret file for secret object
Adam Julis [Wed, 15 Jan 2025 13:27:20 +0000 (14:27 +0100)] 
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>
5 months agoch: Include unistd.h in ch_events.c
Michal Privoznik [Mon, 27 Jan 2025 15:51:55 +0000 (16:51 +0100)] 
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>
5 months agoqemu: Allow virDomainBlockJobSetSpeed during migration
Jiri Denemark [Fri, 24 Jan 2025 12:26:39 +0000 (13:26 +0100)] 
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>
5 months agoqemu: Add support for avail-switchover-bandwidth migration parameter
Jiri Denemark [Thu, 23 Jan 2025 09:26:09 +0000 (10:26 +0100)] 
qemu: Add support for avail-switchover-bandwidth migration parameter

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 months agovirsh migrate: Add --available-switchover-bandwidth option
Jiri Denemark [Thu, 23 Jan 2025 09:25:10 +0000 (10:25 +0100)] 
virsh migrate: Add --available-switchover-bandwidth option

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 months agoAdd a migration parameter for available bandwidth in switchover
Jiri Denemark [Thu, 23 Jan 2025 09:21:10 +0000 (10:21 +0100)] 
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>
5 months agorpm: Unify handling of directories used for loadable modules
Andrea Bolognani [Tue, 21 Jan 2025 13:45:17 +0000 (14:45 +0100)] 
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>
5 months agorpm: Add missing Requires
Andrea Bolognani [Tue, 21 Jan 2025 14:06:10 +0000 (15:06 +0100)] 
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>
5 months agomeson: Unify handling of directories used for loadable modules
Andrea Bolognani [Tue, 21 Jan 2025 10:27:13 +0000 (11:27 +0100)] 
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>
6 months agoch: implement domainInterfaceAddresses
Anirudh Rayabharam [Thu, 12 Dec 2024 22:31:04 +0000 (16:31 -0600)] 
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>
6 months agoNEWS: Mention event handling support in ch driver
Purna Pavan Chandra Aekkaladevi [Fri, 17 Jan 2025 17:11:09 +0000 (17:11 +0000)] 
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>
6 months agoch: events: facilitate lifecycle events handling
Purna Pavan Chandra Aekkaladevi [Fri, 17 Jan 2025 17:11:08 +0000 (17:11 +0000)] 
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>
6 months agoch: events: Read and parse cloud-hypervisor events
Purna Pavan Chandra Aekkaladevi [Fri, 17 Jan 2025 17:11:07 +0000 (17:11 +0000)] 
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>
6 months agoch: start a new thread for handling ch events
Purna Pavan Chandra Aekkaladevi [Fri, 17 Jan 2025 17:11:06 +0000 (17:11 +0000)] 
ch: start a new thread for handling ch events

Use a FIFO(named pipe) for --event-monitor option in CH. Introduce a new
thread, `virCHEventHandlerLoop`, to continuously monitor and handle
events from cloud-hypervisor.

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>
6 months agoch: pass --event-monitor option to cloud-hypervisor
Purna Pavan Chandra Aekkaladevi [Fri, 17 Jan 2025 17:11:05 +0000 (17:11 +0000)] 
ch: pass --event-monitor option to cloud-hypervisor

The `--event-monitor` option in cloud-hypervisor outputs events to a
specified file. This file can then be used to monitor VM lifecycle,
other vmm events and trigger appropriate actions.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months ago.mailmap: add my contact info
Daniel Henrique Barboza [Thu, 23 Jan 2025 11:07:49 +0000 (08:07 -0300)] 
.mailmap: add my contact info

Most of my historical libvirt contributions are PowerPC related but at
this moment I'm working with RISC-V enablement (mostly on the QEMU
side).

Feel free to reach out for RISC-V related matters w.r.t libvirt and
QEMU-KVM support.

Suggested-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 months agoqemu: add RISC-V 'aia' command line
Daniel Henrique Barboza [Wed, 23 Oct 2024 21:27:42 +0000 (18:27 -0300)] 
qemu: add RISC-V 'aia' command line

The 'aia' feature is added as a machine type option for the 'virt'
RISC-V machine, e.g. "-machine virt,aia=<val>".

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 months agoconf,qemu: implement RISC-V 'aia' virt domain feature
Daniel Henrique Barboza [Wed, 23 Oct 2024 20:40:58 +0000 (17:40 -0300)] 
conf,qemu: implement RISC-V 'aia' virt domain feature

This feature is implemented as a string that can range from "none",
"aplic" and "aplic-imsic".

If the feature isn't present in the domain XML the hypervisor default
will be used. For QEMU, at least up to 9.2, the default is "none".

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 months agoqemu: add capability for RISC-V AIA feature
Daniel Henrique Barboza [Wed, 23 Oct 2024 17:54:33 +0000 (14:54 -0300)] 
qemu: add capability for RISC-V AIA feature

AIA (Advanced Interrupt Architecture) support was introduced in QEMU 7.0
for the 'virt' machine type. It allows the guest to choose from a more
modern interrupt model than the default (CLINT - Core Logical Interrupt
Controller).

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 months agovirsysinfo: fix RISC-V detection
Heinrich Schuchardt [Wed, 22 Jan 2025 11:20:08 +0000 (12:20 +0100)] 
virsysinfo: fix RISC-V detection

The correct compiler define to detect the RISC-V architecture is __riscv.

Fixes: b902cfece0db ("virsysinfo: Try reading DMI table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 months agotests: add capabilities for QEMU 10.0.0 on s390x
Shalini Chellathurai Saroja [Tue, 21 Jan 2025 13:51:28 +0000 (14:51 +0100)] 
tests: add capabilities for QEMU 10.0.0 on s390x

Let us introduce the xml and reply files for QEMU 10.0.0 on s390x.

Notable changes:
    - new s390-ccw-virtio-10.0 machine type
    - old machine types (2.4 - 2.8) dropped
    - new CPU models
    - New devices:
      - virtio-mem-ccw
      - chardev now supports qemu-vdagent

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Suggested-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoqemu: Fix hang when migration is canceled at the last moment
Jiri Denemark [Mon, 20 Jan 2025 15:28:20 +0000 (16:28 +0100)] 
qemu: Fix hang when migration is canceled at the last moment

When a migration is canceled very late once virtual CPUs are already
stopped, QEMU will automatically resume them. If this happens after we
exited a waiting loop in qemuMigrationSrcWaitForCompletion, but before a
loop that tries to make sure CPUs are stopped by waiting for the
appropriate event, we may end up waiting forever because the CPUs are
running (they were resumed by migrate_cancel), but the STOP event is
already gone.

This is possible because we enter monitor for fetching migration
statistics at which point other APIs can be processed and migration may
change its state. We should recheck the state when we get back from the
monitor code.

https://issues.redhat.com/browse/RHEL-52493

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agotools: ssh-proxy: Check for domain status before parsing its CID
Michal Privoznik [Tue, 21 Jan 2025 11:36:48 +0000 (12:36 +0100)] 
tools: ssh-proxy: Check for domain status before parsing its CID

Inactive domain XML can be wildly different to the live XML. For
instance, it can have VSOCK CID of that from another (running)
domain. Since domain status is not checked for, attempting to ssh
into an inactive domain may in fact result in opening a
connection to a different live domain that listens on said CID
currently.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/737
Resolves: https://issues.redhat.com/browse/RHEL-75577

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
6 months agonss: Skip empty files and avoid use of uninitialized value
Jiang XueQian [Sat, 18 Jan 2025 08:32:10 +0000 (16:32 +0800)] 
nss: Skip empty files and avoid use of uninitialized value

JSON parser isn't called when reading empty files so `jerr` will be used
uninitialized in the original code. Empty files appear when a network
has no dhcp clients.

This patch checks for such files and skip them.

Fixes: a8d828c88bbdaf83ae78dc06cdd84d5667fcc424
Signed-off-by: Jiang XueQian <jiangxueqian@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agolibvirt.spec: do not build ch driver on mingw
Ján Tomko [Mon, 20 Jan 2025 17:12:59 +0000 (18:12 +0100)] 
libvirt.spec: do not build ch driver on mingw

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 months agomeson: error out when ch driver is requested but unsupported
Ján Tomko [Mon, 20 Jan 2025 09:14:03 +0000 (10:14 +0100)] 
meson: error out when ch driver is requested but unsupported

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 months agospec: Only build ch driver on x86_64 and aarch64
Cole Robinson [Fri, 17 Jan 2025 16:47:08 +0000 (11:47 -0500)] 
spec: Only build ch driver on x86_64 and aarch64

This matches the cpu_family() check in `meson.build`

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
6 months agostorage_file_backend_fs: Compile out 'chown' backend on mingw
Peter Krempa [Mon, 20 Jan 2025 14:35:53 +0000 (15:35 +0100)] 
storage_file_backend_fs: Compile out 'chown' backend on mingw

Otherwise build on mingw complains:

  src/storage_file/storage_file_backend_fs.c:142:12: error: implicit declaration of function 'chown

Fixes: f8558a87ac8525b16f4cbba4f24e0885fde2b79e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
6 months agolibvirt.spec: Move ownership of 'storage-file' backends directory to gluster
Peter Krempa [Mon, 20 Jan 2025 14:14:39 +0000 (15:14 +0100)] 
libvirt.spec: Move ownership of 'storage-file' backends directory to gluster

Commit f8558a87ac8525b16f4cbba4f24e0885fde2b79e de-modularized the
'storage-file' backend for local files, and thus now the only
possibility to have the directory is when compiling with gluster.

This breaks RPM builds when building without gluster as the backend
directory no longer exists in such case. Move the stanza requiring the
directory under the gluster driver declarations.

Fixes: f8558a87ac8525b16f4cbba4f24e0885fde2b79e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
6 months agoqemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases
Michal Privoznik [Tue, 14 Jan 2025 11:16:06 +0000 (12:16 +0100)] 
qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases

In its upstream commit [1], qemu dropped s390-2.7 machine type,
then in commit [2] the s390-2.8 machine type was dropped. But as
Thomas Huth pointed out, any machine type that's older than 6
years is subject to removal [3]. This means, any machine type
older than 4.1 is going to be removed eventually.

We have two test cases that assumes existence of 2.7 machine type.
While they could be switched to 4.1 machine type, we also have
another test case that already check 4.2 machine type.
Therefore, just drop the 2.7 ones.

1: https://gitlab.com/qemu-project/qemu/-/commit/3199c7ee76089fb6844f6b2bed1f5d3d99a7527c
2: https://gitlab.com/qemu-project/qemu/-/commit/66924fe36977d9d9e45ba3e0b6e851ee170507f6
3: https://gitlab.com/qemu-project/qemu/-/commit/ce80c4fa6ff0f5c379bba7db74d04593e9fb12f2
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
6 months agoNEWS: Mention de-modularization of the 'fs' storage file backend
Peter Krempa [Thu, 9 Jan 2025 09:00:34 +0000 (10:00 +0100)] 
NEWS: Mention de-modularization of the 'fs' storage file backend

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agostorage_file: de-modularize the local file backend
Peter Krempa [Thu, 9 Jan 2025 08:52:36 +0000 (09:52 +0100)] 
storage_file: de-modularize the local file backend

The 'storage_file' infrastructure serves as an abstraction on top of
file-looking storage technologies. Apart from local file it currently
implements also a backend for 'gluster'.

Historically it was all modularized and the local file module was
usually packaged with the 'core' part of the storage driver. Now with
split daemons one can install e.g. 'virqemud' without the storage driver
core which contains the 'fs' backend module. Since the qemu driver uses
the storage file backends to e.g. create storage for snapshots and
backups this allows users to create a deployment where some things will
not work properly.

As the 'fs' backend doesn't use any code that wouldn't be linked
directly anyways there's no point in actually shipping it as a module.

Let's compile it in so that all deployments can use it.

To achieve that, compile the source directly into the
'virt_storage_file_lib' static library and remove the loading code. Also
adjust the spec file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agovirstoragetest: Add case for qcow2 image with empty string as 'data_file'
Peter Krempa [Thu, 9 Jan 2025 14:18:58 +0000 (15:18 +0100)] 
virstoragetest: Add case for qcow2 image with empty string as 'data_file'

Add an example image formatted by:

 qemu-img create -f qcow2 -o data_file=nbd+unix:///datafile?socket=/tmp/nbd,data_file_raw=true /tmp/nbddatastore.qcow2 10M -u

serving as an example when qemu records an empty string as the
'data_file' field.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agostorage_file: Refuse qcow2 images with empty string as 'data_file'
Peter Krempa [Thu, 9 Jan 2025 13:53:49 +0000 (14:53 +0100)] 
storage_file: Refuse qcow2 images with empty string as 'data_file'

In certain buggy conditions qemu can create an image which has empty
string stored as 'data_file'. While probing libvirt would consider the
empty string as a relative file name and construct the path using the
path of the parent image stripping the last component and appending the
empty string. This results into attempting to using a directory as an
image and thus the following error when attempting to start VM with such
an image:

 error: unsupported configuration: storage type 'dir' requires use of storage format 'fat'

Reject empty strings passed in as 'data_file'.

Note that we do not have the same problem with 'backing store' as an
empty string there is interpreted as no backing file both by qemu and
libvirt.

Resolves: https://issues.redhat.com/browse/RHEL-70627
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoutil: avoid overflow in hextable buffer
Daniel P. Berrangé [Mon, 20 Jan 2025 10:06:52 +0000 (10:06 +0000)] 
util: avoid overflow in hextable buffer

The assigned string is 17 chars long once the trailing nul is taken
into account. This triggers a warning with GCC 15

 src/util/virsystemd.c: In function ‘virSystemdEscapeName’:
 src/util/virsystemd.c:59:38: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
    59 |     static const char hextable[16] = "0123456789abcdef";
       |                                      ^~~~~~~~~~~~~~~~~~

Switch to a dynamically sized array as used in all the other places
we have a hextable array.

See also: https://gcc.gnu.org/PR115185
Reported-by: Yaakov Selkowitz <yselkowi@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 months agoTranslated using Weblate (Spanish)
Nicolas Gal [Fri, 17 Jan 2025 10:25:43 +0000 (11:25 +0100)] 
Translated using Weblate (Spanish)

Currently translated at 47.6% (5137 of 10781 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
6 months agocpu_x86: Probe host CPU for all MSR features
Jiri Denemark [Thu, 16 Jan 2025 12:43:35 +0000 (13:43 +0100)] 
cpu_x86: Probe host CPU for all MSR features

The list of CPU features we probe from various MSR grew significantly
over time and the CPU map currently mentions 11 distinct MSR indexes.
But the code for directly probing host CPU features was still reading
only the original 0x10a index. Thus the CPU model in host capabilities
was missing a lot of features.

Instead of specifying a static list of indexes to read (which we would
forget to update in the future), let's just read all indexes found in
the CPU map.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoqemu_migration: Do not automatically resume domain after I/O error
Jiri Denemark [Wed, 15 Jan 2025 15:02:00 +0000 (16:02 +0100)] 
qemu_migration: Do not automatically resume domain after I/O error

When an I/O error happens (causing a domain to be paused) during live
migration which is later cancelled by a user, trying to resume the
domain doesn't make sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoqemu_migration: Refactor qemuMigrationSrcRestoreDomainState
Jiri Denemark [Wed, 15 Jan 2025 14:59:22 +0000 (15:59 +0100)] 
qemu_migration: Refactor qemuMigrationSrcRestoreDomainState

None of the callers really care about the return value so we can drop it
and simplify the code a bit.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoqemu: Report error from both sides of migration
Jiri Denemark [Tue, 14 Jan 2025 12:30:52 +0000 (13:30 +0100)] 
qemu: Report error from both sides of migration

When migration fails in Perform phase, we call Finish on the destination
host with cancelled=1 and get the error from there and report it to the
user. This works well if the error on the destination caused the
migration to fail. But in other cases the main error may reported by the
source and the destination would just be complaining about broken
migration stream.

In other words, we don't really know which error caused the migration to
fail and we have no way of detecting that. So instead of choosing one
error, this patch will combine the error messages from both sides of
migration into a single message and report it to the user. The result
would be, for example:

    operation failed: migration failed. Message from the source host:
    operation failed: job 'migration out' failed: Certificate does not
    match the hostname ble.bla. Message from the destination host:
    operation failed: job 'migration in' failed: load of migration
    failed: Invalid argument

And yes, this is ugly, but I wasn't able to come up with a better way of
fixing this issue.

https://issues.redhat.com/browse/RHEL-58933

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agoTranslated using Weblate (Georgian)
Temuri Doghonadze [Wed, 15 Jan 2025 15:56:38 +0000 (16:56 +0100)] 
Translated using Weblate (Georgian)

Currently translated at 4.3% (464 of 10781 strings)

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

Signed-off-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
6 months agoTranslated using Weblate (Georgian)
Weblate [Wed, 15 Jan 2025 15:56:38 +0000 (16:56 +0100)] 
Translated using Weblate (Georgian)

Currently translated at 4.3% (464 of 10781 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
6 months agoPost-release version bump to 11.1.0
Jiri Denemark [Wed, 15 Jan 2025 08:12:52 +0000 (09:12 +0100)] 
Post-release version bump to 11.1.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6 months agoRelease of libvirt-11.0.0 v11.0.0
Jiri Denemark [Wed, 15 Jan 2025 08:06:33 +0000 (09:06 +0100)] 
Release of libvirt-11.0.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6 months agonews: document support for mdev <-> SRIOV VF vGPU live migration
Laine Stump [Sun, 12 Jan 2025 01:22:20 +0000 (20:22 -0500)] 
news: document support for mdev <-> SRIOV VF vGPU live migration

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agonews: note addition of vlan tagging support for Linux host bridges
Laine Stump [Sun, 12 Jan 2025 01:18:18 +0000 (20:18 -0500)] 
news: note addition of vlan tagging support for Linux host bridges

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Tue, 14 Jan 2025 14:38:44 +0000 (15:38 +0100)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10781 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
6 months agoTranslated using Weblate (Spanish)
Nicolas Gal [Tue, 14 Jan 2025 14:38:44 +0000 (15:38 +0100)] 
Translated using Weblate (Spanish)

Currently translated at 47.1% (5085 of 10781 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
6 months agoNEWS: Document some of my fixes in this release
Jiri Denemark [Tue, 14 Jan 2025 15:46:45 +0000 (16:46 +0100)] 
NEWS: Document some of my fixes in this release

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agoNEWS: Add few things I changed this release
Martin Kletzander [Tue, 14 Jan 2025 15:14:39 +0000 (16:14 +0100)] 
NEWS: Add few things I changed this release

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agoNEWS: document bug fix for snapshots
Pavel Hrdina [Tue, 14 Jan 2025 15:09:40 +0000 (16:09 +0100)] 
NEWS: document bug fix for snapshots

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
6 months agoNEWS: Document features/improvements/bug fixes I've participated in
Michal Privoznik [Tue, 14 Jan 2025 14:55:52 +0000 (15:55 +0100)] 
NEWS: Document features/improvements/bug fixes I've participated in

There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agoNEWS: document fix for starting transient domains
Ján Tomko [Tue, 14 Jan 2025 12:56:17 +0000 (13:56 +0100)] 
NEWS: document fix for starting transient domains

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
6 months agoconf: Do not parse hyperv features with passthrough mode
Martin Kletzander [Fri, 10 Jan 2025 14:56:34 +0000 (15:56 +0100)] 
conf: Do not parse hyperv features with passthrough mode

The schema does not allow that anyway and we then format them all back
which leads to libvirt producing an invalid XML.

Resolves: https://issues.redhat.com/browse/RHEL-70656
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agomeson: Replace meson.source_root() with meson.project_source_root() v11.0.0-rc2
Michal Privoznik [Mon, 13 Jan 2025 08:22:41 +0000 (09:22 +0100)] 
meson: Replace meson.source_root() with meson.project_source_root()

The source_root() method is deprecated in 0.56.0 and we're
recommended to use project_source_root() instead.

This is similar to commit v8.9.0-rc1~70 but somehow, the old
method sneaked in.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 months agoqemu_migration: Do not consider post-copy active in postcopy-recover
Jiri Denemark [Fri, 10 Jan 2025 17:25:20 +0000 (18:25 +0100)] 
qemu_migration: Do not consider post-copy active in postcopy-recover

The postcopy-recover migration state in QEMU means a connection for the
migration stream was established. Depending on the schedulers on both
hosts a relative timing of the corresponding MIGRATION event on the
source host and the destination host may differ. Specifically it's
possible that the source sees postcopy-recover while the destination is
still in postcopy-paused.

Currently the Perform phase on the source host ends when we get
postcopy-recover event and the Finish phase on the destination host is
called. If this is fast enough we can still see postcopy-paused state
when the Finish phase starts waiting for migration to complete. This is
interpreted as a failure and reported back to the caller. Even though
the recovery may actually start just a few moments later.

To avoid this race we now don't consider post-copy migration active in
postcopy-recover state and keep waiting for postcopy-active event (in
the success path). Thus the Finish phase is entered only after the
migration switches to postcopy-active. In this state QEMU guarantees the
destination already switched at least to postcopy-recover and we won't
be confused be seeing an old postcopy-failed state.

https://issues.redhat.com/browse/RHEL-73085

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com
6 months agoTranslated using Weblate (Korean)
Weblate [Mon, 13 Jan 2025 07:01:24 +0000 (08:01 +0100)] 
Translated using Weblate (Korean)

Currently translated at 98.4% (10610 of 10781 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
6 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Mon, 13 Jan 2025 07:01:23 +0000 (08:01 +0100)] 
Translated using Weblate (Ukrainian)

Currently translated at 99.2% (10697 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
Translated using Weblate (Ukrainian)

Currently translated at 98.0% (10575 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
Translated using Weblate (Ukrainian)

Currently translated at 97.6% (10531 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
6 months agoTranslated using Weblate (Korean)
김인수 [Mon, 13 Jan 2025 07:01:22 +0000 (08:01 +0100)] 
Translated using Weblate (Korean)

Currently translated at 98.3% (10602 of 10781 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
6 months agoUpdate translation files
Weblate [Mon, 13 Jan 2025 07:01:20 +0000 (08:01 +0100)] 
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
6 months agoaccess: fix po_check when polkit is disabled
Daniel P. Berrangé [Thu, 9 Jan 2025 10:30:07 +0000 (10:30 +0000)] 
access: fix po_check when polkit is disabled

The generated org.libvirt.api.policy.in file was recently added to the
POTFILES list as it contains translatable messages.

It is only generated when WITH_POLKIT && WITH_LIBVIRTD is satisfied
though, resulting in the 'po_check' syntax rule failing if either of
those conditions are not met.

It is harmless to unconditionally generate this file, as a separate
rule takes care of of installing it, and the latter remains under
the build conditions.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
6 months agoqemu: support vlan change for linux host bridge during update-device
Laine Stump [Sun, 12 Jan 2025 02:10:40 +0000 (21:10 -0500)] 
qemu: support vlan change for linux host bridge during update-device

Since we previously only supported vlan tagging for interfaces
connected to an OVS bridge [*], the code in qemuChangeNet() (used by
the update-device API) assumed an interface with modified vlan config
was on an OVS bridge, and would call the OVS-specific
virNetDevOpenvswitchUpdateVlan().

Now that we support vlan tagging for interfaces connected to a
standard Linux host bridge, we must check the type of connection and
only call the OVS function when connected to an OVS bridge *both
before and after the update*. Otherwise we just set the flag to
re-connect to the bridge, which has the side effect of redoing the
vlan setup.

([*] or an SRIOV VF assigned using VFIO, but we don't support *any
runtime changes to that type of netdev so it's irrelevant here.)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 months agodocs: standard linux bridges now support vlans
Leigh Brown [Wed, 8 Jan 2025 13:31:30 +0000 (13:31 +0000)] 
docs: standard linux bridges now support vlans

Update domain XML and network XML documentation to describe how
standard linux bridges support the VLAN configuration.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Reviewed-by: Laine Stump <laine@redhat.com>
6 months agoqemu: snapshot: delete disk image only if parent snapshot is external
Pavel Hrdina [Thu, 9 Jan 2025 15:23:44 +0000 (16:23 +0100)] 
qemu: snapshot: delete disk image only if parent snapshot is external

When we are deleting external snapshot that is not active we only need
to delete overlay disk image of the parent snapshot. This works
correctly even if parent snapshot is external and active as it will have
another overlay created when user reverted to that snapshot.

In case the parent snapshot is internal there are no overlay disk images
created as everything is stored internally within the disk image. In
this case we would delete the actual disk image storing internal
snapshots and most likely the original disk image as well resulting in
data loss once the VM is shutoff.

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/734
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
6 months agodocs: Clarify documentation of host-model CPU mode
Jiri Denemark [Thu, 9 Jan 2025 14:06:24 +0000 (15:06 +0100)] 
docs: Clarify documentation of host-model CPU mode

The host-model CPU mode was described as similar to copying the host CPU
definition from capabilities, which has not been the case for ages. The
host-model definition from domain capabilities is used instead.

Only the first sentence changed, but it required reformatting
essentially the whole paragraph so I used this as an opportunity to
reformat it a little bit more and split the long paragraph into several
smaller ones for better readability.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 months agopo: Refresh potfile for v11.0.0 v11.0.0-rc1
Jiri Denemark [Thu, 9 Jan 2025 10:48:26 +0000 (11:48 +0100)] 
po: Refresh potfile for v11.0.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>