1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-05 07:33:51 +03:00

Compare commits

...

854 Commits

Author SHA1 Message Date
Jiri Denemark
74249df557 Release of libvirt-11.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-10-01 12:46:01 +02:00
Américo Monteiro
ade9dcf6c1 Translated using Weblate (Portuguese)
Currently translated at 89.2% (9788 of 10962 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 89.1% (9768 of 10962 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-10-01 04:39:34 +02:00
Michal Privoznik
a993609f46 NEWS: Fix format of XML elements/attributes in v11.8.0 section
It's a good practice to use a different style of formatting for
literal values like XML element/attribute names, functions, etc.
In this specific case, the 'acpi' and 'nodeset' names should be
formatted using two single quotes instead of double quote.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-29 13:26:10 +02:00
Michal Privoznik
c2c08056a1 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>
2025-09-29 13:26:10 +02:00
zhanchun li
9b7cfb7886 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 97.6% (10705 of 10962 strings)

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

Signed-off-by: zhanchun li <lzc777@126.com>
2025-09-29 02:36:59 +02:00
김인수
9324a2ca05 Translated using Weblate (Korean)
Currently translated at 100.0% (10962 of 10962 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-09-29 02:36:58 +02:00
Américo Monteiro
227ec18c98 Translated using Weblate (Portuguese)
Currently translated at 88.5% (9704 of 10962 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 88.1% (9665 of 10962 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 87.7% (9616 of 10962 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-29 02:36:58 +02:00
Roman Bogorodskiy
9d57b562bd bhyve: hooks: improve process start error handling
When the virBhyveProcessStart() fails early, make sure to execute
the "stopped" and "release" hooks.

Spotted while running TCK hooks tests against the bhyve driver.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-09-26 17:50:04 +02:00
Weblate
3a3ee77682 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>
2025-09-25 11:51:25 +02:00
Jiri Denemark
2ffcadbf7c po: Refresh potfile for v11.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-25 11:46:12 +02:00
Américo Monteiro
dcd5915030 Translated using Weblate (Portuguese)
Currently translated at 87.2% (9557 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-24 19:06:42 +02:00
Weblate
c925705fc9 Translated using Weblate (Spanish)
Currently translated at 76.9% (8426 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-09-24 19:06:42 +02:00
Fco. Javier F. Serrador
7c49321678 Translated using Weblate (Spanish)
Currently translated at 76.9% (8426 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-09-24 19:06:41 +02:00
Ján Tomko
c3d08ce65e tests: qemuxmlconftest: test locking with older virtiofsd
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
90b4a24870 tests: qemuxmlconftests: test virtiofsd command line too
Fake the capabilities based on the QEMU version so that we can test
the command line for both the C version of virtiofsd (removed in QEMU
8.0.0) and the Rust version.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
bab8033bcc tests: qemuxmlconf: virtiofs: remove locking from the readonly test case
The combination of locking + readonly is bogus, because there has never
been a virtiofsd release that supported both.

Locking was a feature of the C-based virtiofsd that was living in the
QEMU tree until v8.0.0 and the readonly feature was only introduced
in the Rust version of virtiofsd.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
0a33b7954c tests: qemuxmlconftest: test passt command line too
Introduce testing of the generated command line arguments
of helper binaries too, not just QEMU.

Start with passt.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
43c2cd1d08 export qemuVirtioFSBuildCommandLine
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
41eea2fe89 tests: qemuxmlconftest: Introduce testQemuConfMarkUsed
Make the code readable enough to not need a comment.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
94a15c3e68 tests: qemuxmlconftests: store suffix in testQemuInfo
Next patch will need this to construct the path to the output
file in a deeper level of nesting.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Ján Tomko
fc1e4eb008 qemu: passt: split out qemuPasstBuildCommand
Separate the command line building to make it testable.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-24 15:11:18 +02:00
Andrea Bolognani
b1983d96f5 news: Update for firmware selection fixes
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 14:15:26 +02:00
Andrea Bolognani
2800ce3620 qemu: Fix matching for read/write firmware
We currently always pick a read-only firmware unless we are
explicitly asked for a read/write one, which is probably what
most people expect anyway but doesn't really make sense
otherwise: if no specific requirement has been provided by the
user, both read-only and read/write firmwares should be
allowed to match.

This won't result in any change in practice, since distros are
not shipping read/write builds of edk2 anyway. If they started
doing that, it would be their responsibility to ensure that
they are ordered after the read-only builds.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 14:15:26 +02:00
Andrea Bolognani
0b8daf9f68 qemu: Fix matching for stateless/combined firmware
The current code assumes that a stateless firmware has to be
explicitly requested by the user, and should never be picked
otherwise. This means that, for example, domains configured to
use SEV-SNP are forced to explicitly request for the firmware
to be stateless.

Additionally, we assume that only split firmware is suitable
for the stateful use case, whereas a combined firmware image
would also do the job.

As a result of these changes, the failing SEV-SNP test case
that was added recently passes, and so do the test cases
requesting read/write firmware.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 14:15:26 +02:00
Andrea Bolognani
20813b87b7 tests: Add tests for SEV firmware selection
One of the new test cases demonstrates how firmware
autoselection doesn't currently work correctly for domains
using SEV-SNP: the descriptor for a suitable firmware exists,
and yet it doesn't get picked up.

Another test cases shows that, while firmware autoselection
succeeds for non-SNP SEV domains, the results are not the
expected ones: the generic (stateful) edk2 build is used
instead of the SEV-specific (stateless) one. This will be
addressed in a future patch by updating the descriptors.

Finally, one test case provides coverage for the uncommon
scenario of stateful firmware being explicitly requested by
the user.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 14:05:12 +02:00
Jim Fehlig
6d35a0b554 tests: Improve AMD SEV-related tests
SEV and SEV-ES guests should use q35 machine type and uefi. Adjust
existing tests accordingly.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-09-24 13:59:53 +02:00
Andrea Bolognani
05b67b8cde tests: Minimize SEV tests
Removing all unnecessary devices and elements makes it easier
to focus on the actual purpose of these tests (configuring
the SEV-specific bits).

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 13:59:53 +02:00
Andrea Bolognani
f2dbd14342 tests: Tweak descriptor for combined firmware
This kind of firmware build is not shipped in Fedora, where
most descriptors in our test suite come from, so we had to
make it up. It was based off the Secure Boot-enabled edk2
build, and the filename it points to is the same.

That has been fine so far since it's not actually being picked
up by any of the test cases, but that's going to change soon
and when it does we want to be able to avoid any confusion.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-24 13:59:53 +02:00
Peter Krempa
2d6e21885f qemuMigrationSrcIsSafeDisk: Allow non-shared qcow2's with raw data file
A qcow2 image which uses a data file and the 'data_file_raw' flag is
effectively a raw image with the qcow2 wrapper used only to store
metadata (block dirty bitmaps).

Since the dirty bitmaps are always migrated using the migration stream
it's technically not required that the qcow2 overlay itself is shared
between the destinations.

Management tools like Kubevirt want to migrate VMs which have a qcow2
overlay with the above config stored in a location that is not shared,
but the data file itself is.

This patch adds code that skips the validation of the overlay since it's
not needed to ensure data consistency in that very specific case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Peter Krempa
6e5a3334b2 qemuBlockGetNamedNodeData: Extract 'data_file_raw' flag
The 'data_file_raw' flag of qcow2 notifies that all data inside the
'data_file' is a raw image so can be used standalone without the
metadata without any problem (except for not updating the dirty
bitmaps).

Our migration safety checks will allow skipping the migration safety
check for these files as during migration we know it's safe to re-create
this on the destination in a location that isn't shared.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Peter Krempa
f8201b0032 qemuMigrationSrcIsSafeDisk: Check also data file properties for migrability
If the qcow2 data file feature (which separates the data into a separate
file from the metadata) is in use the migration safety check ought to
consider both the metadata and the data file for safe migration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Peter Krempa
0ca45005d7 qemuMigrationSrcIsSafeDisk: Extract safe migration checks for one storage source
Further split up the code originally in 'qemuMigrationSrcIsSafe' to
separate checks concerning a single storage source.

The code will then be reused to check the safe migration state also for
the data file (qcow2 feature that allows store of data separated from
the qcow2 metadata).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Peter Krempa
60899fc8fc qemuMigrationSrcIsSafe: Extract code for checking safe migrability of one disk
Extract the code which checks a source of a single disk for safe
migratability into 'qemuMigrationSrcIsSafeDisk'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Peter Krempa
9bf19c09a4 qemuMigrationSrcIsSafe: Drop 'DEBUG' message about qemu supporting cache dropping
The feature exists for a long time, no need to add extra notice about
it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 18:57:00 +02:00
Michal Privoznik
07a40de613 ci: regenerate with 'lcitool manifest'
This pulls in the fix for generating ENV vars in Dockerfile
according to latest standard.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 15:57:05 +02:00
Sebastian Jensen
970fead068 docs/apps: Remove "Cuckoo Sandbox"
Link pointed to a squatted domain, and the upstream repository on
GitHub has been archived since Apr 27, 2021:

https://github.com/cuckoosandbox/cuckoo
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-09-23 12:45:56 +02:00
Américo Monteiro
04c1f45831 Translated using Weblate (Portuguese)
Currently translated at 87.0% (9534 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 86.7% (9493 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 86.4% (9466 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-21 11:59:49 +02:00
Américo Monteiro
8e8f496d87 Translated using Weblate (Portuguese)
Currently translated at 86.0% (9423 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-18 02:51:58 +02:00
jianqing yan
c1f742fe69 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 97.8% (10711 of 10948 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
2025-09-16 11:31:30 +02:00
Américo Monteiro
229f9e8ee8 Translated using Weblate (Portuguese)
Currently translated at 86.0% (9419 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 85.5% (9371 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 85.2% (9336 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 85.0% (9311 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-16 11:31:29 +02:00
Fco. Javier F. Serrador
4eb9cc83c8 Translated using Weblate (Spanish)
Currently translated at 75.7% (8294 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-09-16 11:31:29 +02:00
Ján Tomko
1d1e316152 util: remove glibcompat.c
There are no functions reimplemented here anymore.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-15 12:40:12 +02:00
Ján Tomko
48f04627c8 build: bump minimum glib version to 2.68
We removed support for Debian 11 which only had 2.66.8.
Next stop: 2.72 after we drop Ubuntu 22.04

For libvirt, the update to the 2.68 GLib release:
* introduces g_string_replace
* deprecates g_memdup in favor of g_memdup2
* removes the need for some warning workarounds
* deprecates g_time_zone_new in favor of g_time_zone_new_identifier
  which returns NULL on error instead of returning UTC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-15 12:40:12 +02:00
Michal Privoznik
a9bd4c1e0b ch: Implement virConnectDomainEventDeregister()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-12 12:23:13 +02:00
Michal Privoznik
5c04a84638 ch: Implement virConnectDomainEventRegister()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-12 12:23:03 +02:00
Michal Privoznik
76adad0b01 ch: Propagate lifecycle events
We already have a thread that listens on cloud-hypervisor's
monitor for incoming events and processes them. What is missing
though, is emitting of corresponding lifecycle events.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-12 12:23:00 +02:00
Michal Privoznik
f9c1b910bf ch: Emit event on device attach
When a device is detached from a running guest we ought to emit the
VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-12 12:22:57 +02:00
Michal Privoznik
9c767752f2 ch: Emit event on device attach
When a device is attached to a running guest we ought to emit the
VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-12 12:22:34 +02:00
Michal Privoznik
06802eeceb ch: Unlock domain in virCHEventStopProcess() on all exit paths
The aim of virCHEventStopProcess() is to clean up after stopped
domain by calling virCHProcessStop(). But in order to do that it
needs to acquire a job and in order to do that it needs to lock
the domain object. Well, the object is not unlocked in all exit
paths, i.e. when job acquiring fails the domain object is left
locked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-11 16:31:11 +02:00
Michal Privoznik
cd00c70695 ch: Avoid memory leak in virCHProcessEvents()
The aim of virCHProcessEvents() is to read data (in JSON format)
from CH monitor and then process them. To parse incoming data
virJSONValueFromString() is used. But the corresponding
virJSONValue is freed only when processing of an even succeeds.
If processing an event fails, then the memory is not freed
leading to a memory leak.

334 (24 direct, 310 indirect) bytes in 1 blocks are definitely lost in loss record 1,975 of 2,040
   at 0x4919EF3: calloc (vg_replace_malloc.c:1675)
   by 0x4FEB249: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x4A66162: virJSONValueNewObject (virjson.c:533)
   by 0x4A67E74: virJSONValueFromJsonC (virjson.c:1413)
   by 0x4A681A5: virJSONValueFromString (virjson.c:1484)
   by 0xB8CD9D7: virCHProcessEvents (ch_events.c:179)
   by 0xB8CDCDC: virCHReadProcessEvents (ch_events.c:251)
   by 0xB8CDEBB: virCHEventHandlerLoop (ch_events.c:284)
   by 0x4AC1EB4: virThreadHelper (virthread.c:256)
   by 0x5441DE3: start_thread (in /usr/lib64/libc.so.6)
   by 0x54C25F3: clone (in /usr/lib64/libc.so.6)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-11 16:31:11 +02:00
Américo Monteiro
39a0374d13 Translated using Weblate (Portuguese)
Currently translated at 84.2% (9223 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 84.1% (9216 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 84.1% (9210 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 83.9% (9188 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 83.1% (9108 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 82.1% (8991 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 81.1% (8887 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 80.6% (8831 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-11 11:29:04 +02:00
Fco. Javier F. Serrador
addb80ef41 Translated using Weblate (Spanish)
Currently translated at 73.5% (8050 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 73.4% (8037 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 72.6% (7957 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-09-11 11:29:03 +02:00
Weblate
bbe7b999ff Translated using Weblate (Spanish)
Currently translated at 72.6% (7957 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Spanish)

Currently translated at 72.6% (7957 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-09-11 11:29:03 +02:00
joo es
0a77a035fd Added translation using Weblate (Arabic)
Signed-off-by: joo es <jonnyse@users.noreply.translate.fedoraproject.org>
2025-09-11 11:29:02 +02:00
Laine Stump
96d1bfee3e conf: auto-add a pcie-root-port when needed while plugging in pcie-to-pci-bridge
This will almost surely never come up during any normal operation[*],
which is likely why this wasn't done when pcie-to-pci-bridge support
was added back in the before-fore times. It's pretty simple to support
though - a pcie-to-pci-bridge plugs into a pcie-root-port just like
any other pcie device, and if there isn't an open slot on an existing
pcie-root-port, we can just add one.

([*] in real life, a pcie-to-pci-bridge is only auto-added by libvirt
itself, while this function is dealing with the followup to *user
added* devices. Also each pcie-to-pci-bridge has 32 slots, and it's
unlikely a domain with pcie support would be wanting more than 32
conventional PCI (i.e. not PCIe) devices)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 13:12:41 -04:00
Laine Stump
698aea684a conf: improve error message when a PCI controller can't be auto-added
Log a slightly different message when the missing-but-required slot is
conventional PCI vs PCIe. Also correct/improve the comments about why
auto-add of a PCI controller isn't supported when we're trying to
create a slot for various different pci controllers.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 13:12:41 -04:00
Laine Stump
ce74632a61 conf: add forgotten clause to virDomainPCIControllerConectTypeToModel()
When building the PCI topology of a domain that has PCI devices with
no assigned PCI addresses, the function virDomainPCIAddressSetGrow()
will attempt to add a new PCI controller with the appropriate type of
slot to connect a device that doesn't have a PCI address.

In some cases this isn't possible (for example, if the device you are
attempting to add to the topology requires a type of connection only
provided by some controller that *itself* requires a connection of a
type not available for the given architecture/machinetype, e.g. if you
want to add a pcie-root-port to a domain with a machine type that has
a pci-root (no PCIE)). In those cases, an error message is logged by
using virDomainPCIControllerConectTypeToModel() to extract the type of
device from the "flags" that are sent to virDomainPCIAddressSetGrow().
However, if virDomainPCIControllerConectTypeToModel() doesn't find a
device type in the connection flags, it will return -1, and
virDomainPCIAddressSetGrow() will log the very generic:

   Cannot automatically add a new PCI bus for a device with connect flags nnnn

Both of these functions were written prior to libvirt adding support
for the pcie-to-pci-bridge controller, and when that support was added
(in 2018), a new if() clause wasn't added to
virDomainPCIControllerConectTypeToModel(). Seven (!) years later, this
omission was noticed by someone adding a new test case to regression
testing.

This patches remedies the earlier omission, so that now when someone
tries to add a pcie-to-pci-bridge controller to a domain that doesn't
have PCIE, the message will be:

  a PCI slot is needed to connect a PCI controller model='pcie-to-pci-bridge', but none is available, and it cannot be automatically added

This is still not an ideal error message, but is arguably better.

(NB: Unfortunately it isn't possible to use a switch() statement with
no default case (in order to catch a similar error in the future),
since we are converting from bitmapped flags. Fortunately, we haven't
needed to add a new PCI controller type in the last 7 1/2 years :-)

Resolves: https://issues.redhat.com/browse/RHEL-62032
Fixes: 542f05e775
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 13:12:41 -04:00
Laine Stump
82b794ca12 qemu: fix multiple missing setup/teardown of passt process for interface type='vhostuser'
passt networking support was originally added only for <interface
type='user'>, and all of the codepaths leading to qemuPasst*()
functions were protected with

   if (net->type == VIR_DOMAIN_NET_TYPE_USER &&
       net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST)

When support was later added to use a vhost-user socket to connect
between the passt process and qemu process, *some* of the conditionals
similar to the above were changed to be

   if ((net->type == VIR_DOMAIN_NET_TYPE_USER ||
        net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER) &&
       net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST)

As a matter of fact, enough of these places were changed to make
passt+vhostuser work. However I missed a few places that resulted in
the passt process not being properly shutdown/cleaned up when the
interface type was vhostuser, and also as far as I can see from
examining the code, the passt process wasn't being added to the cgroup
for the domain.

We could fix these problems by adding the extra condition to all the
missing places (checking for either 'user' or 'vhostuser' as well as
for backend type of 'passt'), but since validation already guarantees
that if backend type='passt' then the interface type MUST be either
'user' or 'vhostuser', it's really just adding extra code for no good
purpose (and would leave open the possibility of the same problem
recurring in the future if a different interface type begins using
passt as well). So the better solution is to not bother checking
net->type at all in those locations - if backend type is 'passt' then
we call the passt-related code.

Resolves: https://issues.redhat.com/browse/RHEL-80285
Resolves: https://issues.redhat.com/browse/RHEL-92842
Fixes: 1e9054b9c7
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-09-10 13:12:41 -04:00
Enrique Llorente via Devel
cca246e0cb qemu: support setting guest hostname/fqdn using DHCP on passt-backed interfaces
This commit introduces support for configuring hostnames in virtual
machines (VMs) using DHCP via an interface backed by the passt
transport. This is done with the new 'hostname' and 'fqdn' (Fully
Qualified Domain Name) attributes in the <backend> subelement of
<interface>. The values set in these attributes are added to the passt
commandline for the interface (with the --hostname and --fqdn
options), and passt will then send the settings to the guest by adding
options to the DHCP response when the interface is started - for IPv4,
hostname will be sent in option 12, or the FQDN will be sent in option
81, and for IPv6 the FQDN will be sent using option 39.

This will enable a management application to easily configure guest
hostnames without intervening in the guest's disk image (as long as
the guest uses DHCP for it's network interface configuration).

Here is an example of setting the hostname and fqdn for a guest (in
practice, you would only use one or the other, since according to the
RFC if option 81 is sent to the guest, option 12 should not be sent).

   <interface type='vhostuser'>
     <backend type='passt' hostname='bob' fqdn='bob.example.com'/>
     ...

Resolves: https://issues.redhat.com/browse/RHEL-79806
Signed-off-by: Enrique Llorente <ellorent@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-09-10 13:12:41 -04:00
Michal Privoznik
f2a6c2d39d ch: Avoid memleak on disk detach in chDomainRemoveDevice()
The aim of chDomainRemoveDevice() is to remove device from
virDomainDef. Well, in case of disks this is done by calling
virDomainDiskRemove() which merely just removes it from the array
of virDomainDiskDef-s but leaves it up to the caller to actually
free the disk def.

1,286 (560 direct, 726 indirect) bytes in 1 blocks are definitely lost in loss record 2,005 of 2,041
   at 0x4919EF3: calloc (vg_replace_malloc.c:1675)
   by 0x4FEB249: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x4AFD9A4: virDomainDiskDefNewSource (domain_conf.c:2409)
   by 0x4B10ACA: virDomainDiskDefParseXML (domain_conf.c:8509)
   by 0x4B24F07: virDomainDeviceDefParse (domain_conf.c:14631)
   by 0xB8D8881: chDomainAttachDeviceLiveAndUpdateConfig (ch_hotplug.c:135)
   by 0xB8CCFE0: chDomainAttachDeviceFlags (ch_driver.c:2376)
   by 0xB8CD057: chDomainAttachDevice (ch_driver.c:2394)
   by 0x4DC1C7D: virDomainAttachDevice (libvirt-domain.c:8951)
   by 0x405E545: remoteDispatchDomainAttachDevice (remote_daemon_dispatch_stubs.h:3763)
   by 0x405E495: remoteDispatchDomainAttachDeviceHelper (remote_daemon_dispatch_stubs.h:3742)
   by 0x4BF3164: virNetServerProgramDispatchCall (virnetserverprogram.c:423)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 11:45:07 +02:00
Michal Privoznik
6751994950 ch: Drop useless variable in chDomainFindDisk()
The 'disk' variable inside of chDomainFindDisk() is not used
really. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 11:45:01 +02:00
Michal Privoznik
7b70c1868c ch: Drop deadcode from chDomainDetachDeviceLive()
At the end of chDomainDetachDeviceLive() there's a code that
tries to remove the disk that's being detached from the domain
definition. Well, it's a leftover from the original patch which I
forgot to remove when rewriting it to use chDomainRemoveDevice().
The disk is removed there so this code has no chance in removing
it again. Drop the code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 11:44:51 +02:00
Michal Privoznik
3bd17ffe97 ch: Actually remove device in chDomainDetachDeviceLive()
Inside of chDomainDetachDeviceLive() there are two variables that
are important in this case: 'match' and 'detach'. The first one
contains device definition as parsed from user provided XML, the
other contains pointer to the device definition inside
virDomainDef (as returned by chDomainFindDisk()).

Now, when chDomainRemoveDevice() is called, it looks up the
device inside virDomainDef and removes it (using pointer
comparison). Well, that means 'detach' must be passed as an
argument instead of 'match'.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 11:44:24 +02:00
Michal Privoznik
20d5c61cb4 ch: Avoid memleak in virCHDriverConfigDispose()
When virCHDriverConfig struct is initialized in
virCHDriverConfigNew() the 'configDir' member is allocated but
corresponding free is missing in virCHDriverConfigDispose().
While at it, reorder the free calls to match the order in which
they are declared in the struct so it's easier to spot missing
free call.

20 bytes in 1 blocks are definitely lost in loss record 667 of 2,033
   at 0x4912888: malloc (vg_replace_malloc.c:446)
   by 0x5436747: __vasprintf_internal (in /usr/lib64/libc.so.6)
   by 0x503EC81: g_vasprintf (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x500805B: g_strdup_vprintf (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0x5008124: g_strdup_printf (in /usr/lib64/libglib-2.0.so.0.8400.3)
   by 0xB8C2B70: virCHDriverConfigNew (ch_conf.c:181)
   by 0xB8C9DDA: chStateInitialize (ch_driver.c:1456)
   by 0x4D9E316: virStateInitialize (libvirt.c:667)
   by 0x40539DB: daemonRunStateInit (remote_daemon.c:581)
   by 0x4AC1EB4: virThreadHelper (virthread.c:256)
   by 0x5441DE3: start_thread (in /usr/lib64/libc.so.6)
   by 0x54C25F3: clone (in /usr/lib64/libc.so.6)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-09-10 09:56:50 +02:00
Michal Privoznik
f35a1def9d ch: Implement VIR_DOMAIN_DESTROY_GRACEFUL flag support
The virDomainDestroyFlags() API has several flags, including
VIR_DOMAIN_DESTROY_GRACEFUL which is documented to send only
SIGTERM to the emulator process. Implement its support into CH
driver.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 08:35:25 +02:00
Michal Privoznik
e635b6a6f7 ch: Introduce flags to virCHProcessStop()
A caller (e.g. chDomainDestroyFlags()) might want to chose
whether to kill emulator process forcefully or gracefully (the
@force argument of virProcessKillPainfully()). Invent a flag to
virCHProcessStop() for this. And to keep consistent behaviour,
pass the flag everywhere for now.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 08:35:17 +02:00
Michal Privoznik
fc56f7279f ch: Make sure the cloud-hypervisor process is killed in virCHProcessStop()
Currently, virCHProcessStop() is called either when the
cloud-hypervisor process dies gracefully (e.g. on shutdown
initiated from within the guest) or when virDomainDestroy() is
called (or on failed start attempt, but that's not important
right now).

At any rate, if the cloud-hypervisor process is running it's not
a child process of libvirtd rather than the init (per
virCommandDaemonize() called inside of virCHMonitorNew()). This
distinction is important because virCHProcessStop() then calls
virProcessAbort() thinking it'll kill the process. Well,
virProcessAbort() works only on child processes.

Switch to virProcessKillPainfully() which does work in such
cases.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 08:34:52 +02:00
Michal Privoznik
5a89be0611 virprocess: Report errno if virProcessAbort() fails
The aim of virProcessAbort() is to reap a child process. It does
so by waitpid()-ing and possibly sending SIGTERM/SIGKILL to the
child process (and waitpid()-ing again). Nevertheless, if
everything fails a debug message is printed. But the message
mentions only the PID and not errno (set by previous waitpid())
which may be useful. For instance when virProcessAbort() is
called over a PID that's not our child:

  failed to reap child 16325, abandoning it: No child processes

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-10 08:32:14 +02:00
Daniel P. Berrangé
7afc0388b8 conf: clear the acpiNodeset field after freeing
The virDomainDeviceInfoClear method does not free the struct, only
its contents, so all pointer fields must be explicitly set to NULL
after releasing to avoid disk of double-free.

Reported by coverity:

  *** CID 895678:         Memory - corruptions  (USE_AFTER_FREE)
  /src/conf/domain_conf.c: 5926             in virDomainDeviceInfoParseXML()
  5920             goto cleanup;
  5921
  5922
  5923         ret = 0;
  5924      cleanup:
  5925         if (ret < 0)
  >>>     CID 895678:         Memory - corruptions  (USE_AFTER_FREE)
  >>>     Calling "virDomainDeviceInfoClear" frees pointer "info->acpiNodeset" which has already been freed.
  5926             virDomainDeviceInfoClear(info);
  5927         return ret;
  5928     }
  5929
  5930     static int
  5931     virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-09-09 10:56:59 +01:00
Peter Krempa
e7d1a3e2fe qemu: block: Always enable discard forwarding for 'throttle' filter layer
Discards ought to be forwarded to the protocol nodes where we control
if discard actually happens.

Unconditionally enable discard='unmap' for the intermediate layer.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/810
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-09 10:37:11 +02:00
Peter Krempa
bfc08fcfe5 datatypes: Refactor rest of 'virGet*' helpers
Similarly to the refactor of 'virGetDomain' done in commit 3de56902d3
rework the code to assume that 'virObjectNew' can't return NULL and use
the 'virCheck*Return' helpers to avoid an 'error:' label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-09 10:36:35 +02:00
Peter Krempa
3abc707b2c datatypes: virGetStream: Add missing 'virCheckConnectReturn' check
The 'virGet*' helpers check that the passed objects which are used to
construct the new object are valid. The check that the 'conn' object in
'virStreamGet' was missing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-09 10:36:35 +02:00
Andrea Righi
c3bdec1af0 NEWS: Mention new acpi-generic-initiator support
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
d983a6bf3b docs: Document acpi nodeset in hostdev
Add documentation for the new <acpi nodeset="..."> element in hostdev,
which allows associating devices with ACPI Generic Initiator objects in
QEMU.

A typical use case is NVIDIA Multi-Instance GPU (MIG), where a physical
GPU is partitioned into multiple isolated instances, each tied to one or
more virtual NUMA nodes. The documentation includes an example showing
how to configure <numa> cells together with a MIG device.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
d12d0b160d qemu: Add acpi-generic-initiator unit test
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
9c24784933 qemu: Generate acpi-generic-initiator command from acpi nodeset
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
7032eb24e6 qemu: Validate acpi nodeset
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
8275408276 conf: Add nodeset attribute to the <acpi> element
This enables partitioning of PCI devices into multiple isolated
instances, each requiring a dedicated virtual NUMA node definition.

Link: https://mail.gnu.org/archive/html/qemu-arm/2024-03/msg00358.html
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 19:12:35 +01:00
Andrea Righi
b21822a29c qemu: Allow to define NUMA nodes without memory or CPUs assigned
Allow to define NUMA nodes without memory or CPUs assigned to properly
support the new acpi-generic-initiator device.

This is required because the NUMA nodes passed to the
acpi-generic-initiator object must be independent and not be shared with
other resources, such as CPU or memory.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 18:06:33 +01:00
Andrea Righi
daccea611d qemu: capabilies: Introduce QEMU_CAPS_ACPI_GENERIC_INITIATOR
This capability tracks whether QEMU supports the acpi-generic-initiator
object type.

This object has been introduced in QEMU with the commit:
b64b7ed8bb ("qom: new object to associate device to NUMA node").

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
2025-09-08 18:06:30 +01:00
Stefan Kober
d0752fafdb NEWS: announce disk hotplug support for ch
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
fc7a3099bb ch: implement disk device detach in public API
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
62330a66d3 ch: add disk detach helper functions
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
f9cd2cf238 ch: add virCHMonitorRemoveDevice function
The function calls the respective CH API to remove a device of any type
from a VM.

On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
4ba796ab74 ch: add virCHMonitorBuildKeyValueJson
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
37f4fc95f3 ch: implement disk attach in public API
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
98c995bdf4 ch: add disk attach helper functions
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
ce7b66a48a ch: add monitor disk attach logic
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
eb9906468f ch: add/use virCHMonitorPut function
This allows users to call API endpoints that require passing data in a
generic way. Previously, only virCHMonitorPutNoContent was offered.

On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
e285053dc7 ch: refactor virCHMonitorBuildDiskJson
Refactor BuildDiskJson to return a virJSONValue instead of adding the
disk json to an json array. This makes the function reusable for
hotplugging disks.

On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
c90b6ff46a ch: pass disk alias to CHV
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
c5f743c44e ch: assign aliases in ProcessPrepareDomain
This is required to have unique device aliases for devices throughout
the domain lifecycle.

On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
40b3321a70 ch: add ch_alias.{c,h} for device alias handling
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Stefan Kober
00db172987 ch: add ch_hotplug.{h,c} files to CH build
The files are meant to contain all device hotplug related code. The
first implementation will be live storage attach and detach.

On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-08 16:40:08 +02:00
Ján Tomko
6d912238ca esx: pass 'long' to curl_easy_setopt when needed
The include header got its type checks fixed in curl 8.14:
79b4e56b3f
https://github.com/curl/curl/pull/17143

This causes a warning on rawhide with clang:
../src/esx/esx_vi.c:318:5: error: call to '_curl_easy_setopt_err_long'
declared with 'warning' attribute: curl_easy_setopt expects a long
argument [-Werror,-Wattribute-warning]
  318 |     curl_easy_setopt(curl->handle, CURLOPT_NOSIGNAL, 1);
      |     ^

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-09-08 16:12:40 +02:00
Jiri Denemark
d05443820e qemu: Don't query unavailable-features if qom-list-get is supported
With qom-list-get we already have the value of unavailable-features
property in the returned object (just like we have all values of all
bool properties). Let's use the value from there instead of querying for
it separately using qom-get.

After this patch only a single QMP command is used for getting all the
required info about guest CPUs created by QEMU 10.1 or newer.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:48 +02:00
Jiri Denemark
e18bc30236 qemu: Let qemuMonitorJSONGetCPUProperties also return disabled features
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:48 +02:00
Jiri Denemark
5b88383e21 qemu: Merge qemuMonitorJSONGetCPUDataDisabled in qemuMonitorJSONGetGuestCPU
The qemuMonitorJSONGetCPUDataDisabled function is just a wrapper around
two function calls and it is only used by qemuMonitorJSONGetGuestCPU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:48 +02:00
Jiri Denemark
74261b249f qemu: Always fetch disabled features in qemuMonitorJSONGetGuestCPU
The function is always called with both enabled and disabled pointers
set.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:48 +02:00
Jiri Denemark
ffdbbc4138 qemu: Merge qemuMonitorJSONGetCPUData in qemuMonitorJSONGetGuestCPU
The qemuMonitorJSONGetCPUData function is just a wrapper around two
function calls and it is only used by qemuMonitorJSONGetGuestCPU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
1dee4afb14 qemu: Add qemuMonitorJSONCPUDataAddFeatures helper
The function translates a list of CPU feature names retrieved from QEMU
and adds them to virCPUData.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
53eb546519 tests: Test qemuMonitorJSONGetGuestCPU with qom-get-list
The test cases show both the legacy method and the new one produce
identical results.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
b21b211923 qemu: Use qom-list-get for checking enabled CPU features
qom-list-get is a new QMP command (since QEMU 10.1) that combines
qom-list for listing properties of a specified object with qom-get for
getting a value of a given property. The new command provides an array
of all properties and their values, which allows us to dramatically
reduce the number of QMP commands we have to call when starting a domain
to check which CPU features were actually enabled.

A simple domain with no disk can now be started with only 15 QMP
commands in about 200 ms compared to 485 commands and 400 ms startup
time without this patch.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
a5322a0a4c qemu: Introduce QEMU_CAPS_QOM_LIST_GET capability
The new capability signals support for qom-list-get QMP command.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
a9fad838f2 qemu: Parse properties list from any JSON array
The qemuMonitorJSONParsePropsList API expected a QMP reply as an input.
By generalizing it to work on any JSON array, we can reuse the API even
for commands which return the array of properties nested in an object.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
3c25adb289 qemu: Move feature filtering to qemuMonitorJSONGetCPUProperties
When getting enabled CPU features (qemuMonitorJSONGetCPUData), we used
to call qemuMonitorJSONGetCPUProperties to get the list of all boolean
properties and then queried their values and ignored properties that
were not true. By moving the filtering inside
qemuMonitorJSONGetCPUProperties we don't need to even add disabled
features to any list and also get ready for better QMP interface.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
001769452b qemu: Generalize filtering in qemuMonitorJSONParsePropsList
qemuMonitorJSONParsePropsList supported filtering based on type. Let's
replace it with a callback supplied by the caller to allow for more
advanced filtering.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
5935abb72c tests: Test qemuMonitorJSONGetGuestCPU with empty unavailable-features
The key point here is that the unavailable-features property reports an
empty array.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:47 +02:00
Jiri Denemark
4b7304cfe8 tests: Add a test for qemuMonitorJSONGetGuestCPU
The SierraForest CPU was just randomly chosen and it doesn't mean we
should have test cases for all CPU models.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:46 +02:00
Jiri Denemark
cab77b7a14 qemu: Drop legacy probing of CPU features
The legacy probing which reads CPUID registers from QEMU and interprets
the individual bits is not used with any QEMU version currently
supported by libvirt. The code would only be used if
QEMU_CAPS_CPU_UNAVAILABLE_FEATURES capability (detected by probing the
presence of 'unavailable-features') was missing on x86, but all QEMU
release we care about report unavailable-features on x86.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-08 15:32:46 +02:00
Claudio Fontana
55583ae429 libvirt-host: VIR_NODE_CPU_STATS_GUEST: clarify "guest" time
clarify that "guest" time is time spent running VCPUs specifically.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-09-05 09:09:20 -06:00
Jiri Denemark
814bec16ee tests: Drop unused vm variable in testQemuMonitorCPUInfo
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-04 16:19:35 +02:00
Hector Cao
62a40b89b7 docs : add doc on cpu model and features
Add documentation on the way libvirt displays the Host CPU
model and capabilities (features). There is an implicit
expectation from users to get the CPU model name matching the
CPU model they are running on, however, this does not happen
most of the time. As a consequence, having a documentation
is useful both for users to align their expectation and for
us to point to a place where the situation is clearly explained.

Signed-off-by: Hector Cao <hector.cao@canonical.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-02 15:11:05 +02:00
Américo Monteiro
f68fddeef0 Translated using Weblate (Portuguese)
Currently translated at 80.0% (8764 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-09-02 11:38:54 +02:00
Fco. Javier F. Serrador
80a51de596 Translated using Weblate (Spanish)
Currently translated at 70.0% (7671 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-09-02 11:38:54 +02:00
Peter Krempa
0aea1d3e46 scripts: qemu-replies-tool: Add option to dump JSON commands that weren't processed by --dump-all
This is useful for checking that the script still covers everything when
using it to compare two .replies files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
3fd2cd1115 scripts: qemu-replies-tool: Add stable dump of 'query-command-line-options'
While 'query-command-line-options' is usually fairly stable (for
comparing between two .replies files) it's simpler to compare it in the
dumped variant.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
8c5eec9814 scripts: qemu-replies-tool: Dump data from query-version/query-target/query-kvm
Process few other simple commands. While this output doesn't change
places it's useful to see it when comparing the dumps of two .replies
files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
c961ddc535 scripts: qemu-replies-tool: Prefix output with filename when dumping data for multiple files
The --dump-* mode can be used together with --repliesdir which iterates
over all '.replies' files in the directory. Make this useful by
outputing the filename so the user can associate the data with the file
it was dumped from.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
301e1ba244 scripts: qemu-replies-tool: List also data from 'qom-list-properties'
In addition to 'device-list-properties' libvirt probes also some
properties of qom types. Since the format is identical make the dumping
function for 'device-list-properties' universal and make it accept also
'qom-list-types'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
e53eb41b0d scripts: qemu-replies-tool: Dump machine types in --dump-all
Dumps the supported machine types and their deprecation state in stable
human-sort order.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:24 +02:00
Peter Krempa
790fec6e53 scripts: qemu-replies-tool: Drop specific invocation of marginally useful dump modes
While '--dump-qmp-query-strings' is useful by itself because it's a
simple way to generate the QMP schema query strings for libvirt, the
other modes aren't useful besides comparing two .replies files by the
dumped output.

Remove specific options for '--dump-qom-list-types' and
'--dump-device-list-properties', so that upcoming additions which will
be useful only for comparisons aren't forced to add these options.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:23 +02:00
Peter Krempa
5e585abc1c scripts: qemu-replies-tool: Convert the QMP conversation to list of dicts
Currently the conversation was a list of tuples. Since upcoming patches
will want to store some additional flags with the processed commands
convert it to a list of dicts, so that we can name the individual
fields.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:55:23 +02:00
Peter Krempa
05a53dcf54 qemuxmlconftest: Add pinned versions of the 'cpu-host-*' cases for qemu-10.1
Now that the qemu capabilities dump for the qemu-10.2 cycle was added
and thus qemu-10.1 dump is no longer "latest" we can pin the
'cpu-host-' tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
c97374c612 qemucapabilitiestest: Add data for the qemu-10.2 dev cycle
This is an extremely early addition with data as of v10.1.0-1-ge771ba98de
thus effectively no code change compared to the qemu-10.1 release.

This early addition is done since I've upgraded the computer I'm
capturing the dumps from (yes the dumps are host-specific, and there
isn't really a good option if we want to have modern CPU data around).

Thus the only difference in the output files comes from the CPU change.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
a1210230eb qemuxmlconftest: Rename and strip specific machine type from 'x86_64-default-cpu-*' cases
qemu-10.2 which we're about to add capabilities dump for will remove the
'4.2' machine type per deprecation policy.

The 'x86_64-default-cpu-*' still reference it. Since there is no
functional difference when upgrading the tests to the latest machine
type (pc/q35 alias as handled internally by qemuxmlconftest) let's
rename and modernize these.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
9eda374f1d qemuxmlconftest: Add missing version specific invocations for 'cpu-host' tests
These were forgotten when new dumps were added.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
f005ba072c qemu: monitor: Remove query-tpm-modes/query-tpm-types infrastructure
The query commands are not used since we can probe the supported types
and models via qom types.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
aabccf3974 qemu: capabilities: Don't use query-tpm-types/query-tpm-models for probe
In previous patches we've successfuly replaced it by looking at the qom
types we already query so we don't need to invoke extra commands.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
8673ac3df5 qemu: capabilities: Detect TPM related capabilities from 'qom-list-types'
All the information needed to detect supported TPM front and backends
is present in the QOM types we already query, thus we don't need to
invoke specific commands for querying TPM stuff.

The only discrepancy is that there are 3 versions of 'tpm-tis' based on
the backed they use.

This patch reworks the probing but keeps the query commands in place.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
40e12a60de qemu: capabilities: Drop probe of 'query-migrate-capabilities'
There is currently noting being probed from the reply of the command. In
addition in most cases a feature can be now probed via the QMP schema
which covers the return values in 'query-migrate-capabilities'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
8bb61dadb4 qemu: capabilities: Retire QEMU_CAPS_MIGRATE_RDMA
The capability is always present and not checked any more. Retire it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
c9fada7d0b qemu: Always assume support for QEMU_CAPS_MIGRATE_RDMA
Libvirt detects QEMU_CAPS_MIGRATE_RDMA by probing
'query-migrate-capabilities' for the presence of 'rdma-pin-all'.

In qemu the entry in 'query-migrate-capabilities' existed since the
introduction of the command in qemu-2.0. We thus always detect this
capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:54:46 +02:00
Peter Krempa
e19c1fd674 qemu: capabilities: Update '10.1.0' capabilities on x86_64 after release
Notable changes:
 - 'netdev_add' now supports 'passt'
 - new command 'qom-list-get'
 - 'query-block' and 'query-named-block-nodes' returns also 'children' links
 - 'gtk' graphics backend added 'keep-aspect-ratio' and 'scale' properties
 - 'query-migrate' now reports 'postcopy-latency',
   'postcopy-non-vcpu-latency' and 'postcopy-vcpu-latency'
 - new unstable command 'x-accel-stats'
 - 'x-query-opcount' unstable command removed
 - 'arch-capabilities' CPU flag no longer explsed on AMD cpus
   (this also causes the qemuxmlconftest changes)

 - new named cpu models:
    - GraniteRapids-v3-x86_64-cpu
    - SapphireRapids-v4-x86_64-cpu
    - SierraForest-v3-x86_64-cpu
    - YongFeng-v3-x86_64-cpu

 - new devices
    - cxl-fmw

 - PIIX4_PM/ICH9-LPC added 'bus' property
 - vfio-pci added 'x-migration-load-config-after-iter',
   'x-migration-max-queued-buffers-size', 'x-pci-class-code'

 - virtio-gpu added 'optputs' property
 - virtio-net added:
    - 'hash-ipv4','hash-ipv6','hash-ipv6ex'
    - 'hash-tcp4','hash-tcp6','hash-tcp6ex'
    - 'hash-udp4','hash-udp6','hash-udp6ex'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-09-02 10:53:40 +02:00
Peter Krempa
ef7fbc7ab4 qemu: monitor: Remove wrappers for 'block-dirty-bitmap-enable'/'block-dirty-bitmap-disable'
Libvirt doesn't use them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-09-02 10:53:06 +02:00
Claudio Fontana
b5878727c7 util: virHostCPUGetStatsLinux: support VIR_NODE_CPU_STATS_GUEST
it is very useful for platforms to know how much time a node is
spending running guests.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-09-01 16:14:31 +02:00
Jiri Denemark
317626fae9 Post-release version bump to 11.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-01 13:09:32 +02:00
Jiri Denemark
4d408ca4bf Release of libvirt-11.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-01 13:06:06 +02:00
Américo Monteiro
44990eaf30 Translated using Weblate (Portuguese)
Currently translated at 79.5% (8707 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 78.0% (8544 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-31 23:53:42 +02:00
김인수
62a9069d4d Translated using Weblate (Korean)
Currently translated at 100.0% (10948 of 10948 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-08-31 23:53:41 +02:00
Fco. Javier F. Serrador
0a7110d4c6 Translated using Weblate (Spanish)
Currently translated at 68.6% (7517 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 67.4% (7379 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-08-31 23:53:41 +02:00
Américo Monteiro
7bdc64ec94 Translated using Weblate (Portuguese)
Currently translated at 77.2% (8457 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-29 04:59:17 +02:00
Fco. Javier F. Serrador
75e6158a95 Translated using Weblate (Spanish)
Currently translated at 65.4% (7166 of 10948 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-08-28 09:01:49 +02:00
Américo Monteiro
37c3ea3ab5 Translated using Weblate (Portuguese)
Currently translated at 77.0% (8431 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 76.5% (8380 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 76.4% (8366 of 10948 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-28 09:01:48 +02:00
Weblate
f46acba428 Translated using Weblate (Portuguese)
Currently translated at 76.4% (8366 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 76.4% (8366 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 76.4% (8366 of 10948 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-08-28 09:01:48 +02:00
Pavel Borecki
6df9e7f62b Translated using Weblate (Czech)
Currently translated at 94.6% (10360 of 10948 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 94.0% (10294 of 10948 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 92.9% (10179 of 10948 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>
2025-08-28 09:01:47 +02:00
Peter Krempa
66af43a52d kbase: live_full_disk_backup: Improve the document
Changes:
 - fixed emphasis on the API name and some operations
 - fixed the output example of some commands
 - added warning to avoid the snapshot+copy+commit approach as it's a
   bit dangerous
 - added --no-metadata to avoid creating snapshot XML

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-28 08:42:05 +02:00
Peter Krempa
b255d00624 docs: formatsecret: Convert inline emphasis of a warning to the '.. warning:' role
This is an example how to hilight very important information in the
docs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-28 08:42:05 +02:00
Peter Krempa
e627b91a41 css: Add style for '.. note:' and '.. warning:' rST roles
One of our kbase docs already uses '.. note:' and we could use e.g.
'.. warning:' to replace some of emphasiszed paragraphs to make them
more prominent.

Introduce style for the generated HTML to add some hilight for them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-28 08:42:05 +02:00
Peter Krempa
84f8b7f7d9 kbase: live_full_disk_backup: Fix use of '.. note' directive
The note was misindented thus breaking the numbered list around.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-28 08:42:05 +02:00
Peter Krempa
37a1bd9458 daemon: Drop log level of VIR_ERR_NO_SUPPORT to debug
The error code signals that the API the user called is not supported by
the driver. This can happen with some hypervisor drivers which don't
have everything implemented yet. There's no point in spamming the log
with it.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/805
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-08-28 08:42:05 +02:00
Peter Krempa
e45049c610 qemu: hotplug: Audit device detach before deleting it
Commit f30843142a introduced a code path
for solving a race when qemu doesn't know about a device but libvirt
still does. The patch introduced a call to 'qemuDomainRemoveDevice'
(which deletes/frees the device definition) and placed it before the
call to 'qemuDomainRemoveAuditDevice' (which accesses the device
definition to do the audit log reporting).

Reorder them to prevent the qemu driver crashing in the corner case
where qemu already detached the device but libvirt didn't yet process
it, which can be triggered by calling the asynchronous
'virDomainDetachDeviceAlias' API.

In addition in case when we're about to delete the device and return
success we need to also report successful detach in the audit log so the
logic calling the auditing function needs to be fixed as well.

Resolves: https://issues.redhat.com/browse/RHEL-110191
Fixes: f30843142a
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-08-28 08:42:05 +02:00
Roman Bogorodskiy
a82299ac8b NEWS: document bhyve changes for the release
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-08-27 13:42:26 +02:00
Weblate
3acdea2ed3 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>
2025-08-25 11:08:00 +02:00
Jiri Denemark
ca61552fe0 po: Refresh potfile for v11.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-08-25 10:58:09 +02:00
Américo Monteiro
1ed76babe3 Translated using Weblate (Portuguese)
Currently translated at 76.0% (8319 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-25 10:08:34 +02:00
Charles Lee
9b584d80b1 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 97.7% (10695 of 10939 strings)

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

Signed-off-by: Charles Lee <lchopn@gmail.com>
2025-08-24 19:53:48 +02:00
Fco. Javier F. Serrador
506cf5484a Translated using Weblate (Spanish)
Currently translated at 64.7% (7085 of 10939 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 64.2% (7027 of 10939 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 62.6% (6857 of 10939 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-08-24 19:53:47 +02:00
Weblate
561d98bbfe Translated using Weblate (Spanish)
Currently translated at 62.6% (6848 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-08-24 19:53:47 +02:00
Fco. Javier F. Serrador
b84b31e27f Translated using Weblate (Spanish)
Currently translated at 62.6% (6848 of 10939 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 62.6% (6855 of 10939 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-08-24 19:53:46 +02:00
Américo Monteiro
6415fb1495 Translated using Weblate (Portuguese)
Currently translated at 75.2% (8230 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 74.4% (8147 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 74.0% (8097 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 73.4% (8040 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 73.3% (8024 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 73.0% (7992 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 72.1% (7891 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 72.0% (7883 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 71.5% (7826 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 70.3% (7692 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 69.0% (7555 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 68.0% (7440 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 67.4% (7383 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 67.2% (7356 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 66.7% (7301 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 66.5% (7277 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 65.5% (7168 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 65.2% (7138 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 64.1% (7018 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 63.3% (6934 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 63.0% (6902 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 62.0% (6787 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 61.5% (6738 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 61.4% (6727 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 61.3% (6712 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 60.2% (6589 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 60.0% (6570 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 59.0% (6458 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.6% (6414 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.6% (6413 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.6% (6412 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-24 19:53:46 +02:00
Weblate
9ace7d43c3 Translated using Weblate (Portuguese)
Currently translated at 58.6% (6413 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 58.6% (6412 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-08-24 19:53:45 +02:00
Américo Monteiro
52930e6ad1 Translated using Weblate (Portuguese)
Currently translated at 58.6% (6411 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.5% (6410 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-24 19:53:44 +02:00
Weblate
8866684043 Translated using Weblate (Portuguese)
Currently translated at 58.6% (6411 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 58.5% (6410 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 58.5% (6409 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-08-24 19:53:44 +02:00
Américo Monteiro
e4e9d5356e Translated using Weblate (Portuguese)
Currently translated at 58.5% (6409 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.5% (6408 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-24 19:53:43 +02:00
Weblate
220cdc680e Translated using Weblate (Portuguese)
Currently translated at 58.5% (6408 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 58.5% (6407 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-08-24 19:53:42 +02:00
김인수
8286b5ff61 Translated using Weblate (Korean)
Currently translated at 100.0% (10939 of 10939 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-08-24 19:53:42 +02:00
Américo Monteiro
83192fedaa Translated using Weblate (Portuguese)
Currently translated at 58.5% (6407 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 58.4% (6399 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 57.5% (6295 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 56.6% (6195 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-24 19:53:41 +02:00
Roman Bogorodskiy
fc8b8e8220 bhyve: autofill NVRAM data for firmware='efi'
When a domain configured with "<os firmware='efi'/>", autofill not only
loader/firmware configuration, but also nvram.

This also fixes the `scripts/domain/405-ovmf-nvram-efi.t` test in
libvirt-tck for bhyve.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 10:18:21 +02:00
Roman Bogorodskiy
d06f8f096a docs: add network driver documentation
Currently documents only FreeBSD/pf specific configuration.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 09:59:58 +02:00
Roman Bogorodskiy
4462b85a56 network: bridge_driver: add BSD implementation
Add BSD-specific platform flavor of the bridge driver which will be used
as a base for Packet Filter (pf) based NAT networking implementation.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 09:59:49 +02:00
Roman Bogorodskiy
d4ffd95614 bhyve: implement domainBlockStats
Implement domainBlockStats for the bhyve driver. Only the read/write
operations counts are reported as FreeBSD apparently doesn't support
accumulative bytes read or written, though real-time data is available
via rctl(8). There's also no information about the errors.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 07:47:45 +02:00
Roman Bogorodskiy
9eddeb354a bhyve: implement domainMemoryStats
Currently, bhyve does not support neither memory ballooning nor
reporting guest memory usage. So the following information can be
obtained:

 - RSS of the running process
 - Memory available to the guest (that is, guest total memory)

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 07:44:57 +02:00
Roman Bogorodskiy
870ccd2db7 virprocess: implement virProcessGetStatInfo() for FreeBSD
Use the "kern.proc.pid" sysctl and retrieve information from the
kinfo_proc struct.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-08-23 07:42:50 +02:00
Roman Bogorodskiy
9c8c238af0 bhyve: implement domainInterfaceStats
The virNetDevTapInterfaceStats() function already works on FreeBSD, so
it's just a matter of wrapping that for domainInterfaceStats.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-23 07:42:40 +02:00
Hector Cao
291dbefd07 virt-aa-helper: Avoid duplicate when append rule
when a device is dynamically attached to a VM, and it needs a special
system access for apparmor, libvirt calls virt-aa-helper (with argument -F)
to append a new rule to the apparmor profile of the VM. virt-aa-helper does
not check for duplicate and blindly appends the rule to the profile. since
there is no rule removal when a device is detached, this can make the profile
grow in size if a big number of attach/detach operations are done and the
profile might hit the size limit and futur attach operations might dysfunction
because no rule can be added into the apparmor profile.

this patch tries to mitigate this issue by doing a duplicate check
when rules are appended into the profile. this fix does not guarantee
the absence of duplicates but should be enough to prevent the profile
to grow significantly in size and reach its size limit.

Signed-off-by: Hector CAO <hector.cao@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-21 15:05:25 +02:00
Michael Ablassmeier
35fc21b659 fix typos in NEWS.rst
Signed-off-by: Michael Ablassmeier <abi@grinser.de>
2025-08-21 10:49:54 +01:00
Sebastian Mitterle
4e43cf0a4f docs/tlscerts: mention dropped 'encryption_key'
Older libvirt versions still only work if 'encryption_key' is enabled
in the server and client certificates. Add a note.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
2025-08-20 12:43:53 +01:00
Sebastian Mitterle
aa7e4f5360 docs/tlscerts: document need for socket activation
Mention that the tls socket needs to be started and the libvirtd
or virtproxyd service might have to be started.

If this is not done the user might run into connection issues and
it seems this is not mentioned elsewhere in the docs.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
2025-08-20 12:43:21 +01:00
Michal Privoznik
06fd44915d spec: Package newly introduced CH conf files
In a recent commit of v11.6.0-25-g5dca0567f6 new config files for
the CH driver were introduced. But corresponding change to the
specfile was missing resulting in a broken rpmbuild. Just put
those files into daemon-driver-ch rpm.

Fixes: 5dca0567f6
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-19 12:12:53 +02:00
Stefan Kober
5b69c37265 NEWS: ch: announce log_level config option
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-18 14:36:14 +02:00
Stefan Kober
65e7baed62 ch: add log level configuration option
Allow a user to set the verbosity of the cloud hypervisor instances by
specifying it in the ch.conf configuration file.

Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-18 14:36:12 +02:00
Stefan Kober
5dca0567f6 ch: Add config file support
Similar to the QEMU driver, the ch driver receives support for
configuration files that allows doing certain configuration on the
virtchd daemon.

The initial use case will be setting the verbosity of the cloud
hypervisor instances started by virtchd, but the implementation allows
for adding further options.

Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-08-18 14:36:09 +02:00
Mark Cave-Ayland
c573d08ccf tests/qemuxmlconfdata: add tests for video model 'edid' attribute
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-08-14 12:47:11 +02:00
Mark Cave-Ayland
2a0cd28095 conf: add support for 'edid' attribute to video model
Add the ability to enable/disable exposing the EDID information to the guest.
The edid attribute can specified in the domain XML as below:

    <video>
        <model type='virtio' edid='off'/>
    </video>

If the edid attribute is unspecified, it is not generated so that the
virtualisation platform will continue to use its default.

The edid attribute is only valid for the vga, boch and virtio display models
and is currently only implemented for the QEMU driver.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-08-14 12:47:05 +02:00
Michal Privoznik
79d6509dbc qemuxmlconftest: Paper over test failure at MacOS
MacOS has its own dynamic linker (dyld) which is different to
Linux/BSD one. But with a little help (by setting
"DYLD_FORCE_FLAT_NAMESPACE" env var) it would behave similarly to
Linux/BSD ones. In particular, if a library is preloaded via
"DYLD_INSERT_LIBRARIES" on MacOS or "LD_PRELOAD" on Linux/BSD,
then dlsym(RTLD_NEXT, ...) considers ALL preloaded libraries. For
instance, the virFileCanonicalizePath() is reimplemented in
virpcimock and qemuxml2argvmock. Each one of these
reimplementations uses dlsym(RTLD_NEXT, ...) to look up and call
virFileCanonicalizePath() from next library in the queue and
possibly even the actual implementation from libvirt.so.

This chaining of mocks allows us to have mock libraries that
create stable, reproducible environment for tests.

Now, because of unknown reason Apple decided to remove the flat
namespace feature [1] (I recommend to just clone the repo and
view the commit via 'git show' as github's web interface hides
interesting bits away). They did so in 2022. And it wasn't until
my commit of v11.6.0-19-g12c35ab161 that we've noticed this,
because until that commit no two mock reimplemented the same
function. Well, now they do and with flat namespaces gone the
dlsym(RLTD_NEXT, ...) returns an address from libvirt.so instead
of from next mock on the list.

Since reimplementation of virFileCanonicalizePath() in
qemuxml2argvmock.c is only to cover a case on some Linux systems
and virpcimock.c creates full sysfs imitation of PCI devices, the
latter is more important than the former.

Therefore, switch order of those mocks.

On Linux/BSD this has virtually no effect, but on MacOS it fixes
the qemuxmlconftest failure.

1: 9a9e3e4cfa
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-14 09:12:48 +02:00
Roman Bogorodskiy
e4588ddac7 docs: storage: fix the "since" tag
Trivial :since: tag fix in the ZFS section.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-13 15:41:05 +02:00
James Le Cuirot
35e2f4d7fc qemu: Match firmware with fully resolved and canonicalized paths
Distros may provide compatibility symlinks after moving firmware files
around, but they won't work for existing VMs when doing a straight
string comparison.

I tried to compare inodes instead, but even glib doesn't provide a
straightforward cross-platform method to do this.

Resolves: https://bugs.gentoo.org/960591
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-11 11:53:31 +02:00
Michal Privoznik
12c35ab161 qemuxml2argvmock: Pretend FW blobs are always present
Soon, the QEMU driver, specifically the part that picks firmware
based on firmware descriptor files (qemu_firmware.c) is going to
check for the presence of those firmware blobs (well, for their
realpath()). Just collect the list of all blobs we use in our
tests and mock virFileCanonicalizePath() so that for any path on
that list its strdup()-ed version is returned.

This means, qemuxmlconftest won't touch host files really.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-11 11:53:19 +02:00
Pavel Hrdina
1686db62ed docs: hacking: Define policy forbidding use of AI code generators
This policy is a copy of what QEMU project is using [1] as there is no
reason to use different policy, only modification is changing the
project name and link to DCO.

[1] <https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-08-08 13:43:52 +02:00
Peter Krempa
0f0d561da2 virCHDomainRefreshThreadInfo: Remove illusion that caller cares about return value
The caller doesn't check the return value. Remove it to avoid confusing
readers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-06 15:51:25 +02:00
Peter Krempa
086e2072fd virCHDomainRefreshThreadInfo: Don't trust vcpu ID returned by hypervisor
The hypervisor may return an index out of range of current vCPUs
defined in the domain which would cause a NULL dereference. Validate
that the vCPU struct with ID fetched from hypervisor exists before
dereferencing it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-06 15:51:25 +02:00
Peter Krempa
73ada8b2b9 qemu: domain: Remove unused qemuDomainGetVcpuHalted
Unused since commit 2222548b1e

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-06 15:51:25 +02:00
Peter Krempa
1067afb690 virDomainVcpuDefPostParse: Remove impossible check
Many callers of 'virDomainDefGetVcpu' don't validate return value when
iterating CPUs up to def->maxvcpus/virDomainDefGetVcpusMax. Remove this
one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-06 15:51:25 +02:00
Peter Krempa
3ac25cd21b Unexport virCHProcessSetupVcpu
The function is not used outside of the module.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-06 15:51:24 +02:00
Roman Bogorodskiy
29bea6b9fc network: introduce Packet Filter firewall backend
Implement NAT networking support based on the Packet Filter (pf)
firewall in FreeBSD. At this point, the implementation is very basic.
It creates:

 - Essential NAT translation rules
 - Basic forwarding rules

Implementation uses pf's anchor feature to group rules. All rules live
in the "libvirt" anchor and every libvirt's network has its own
sub-anchor.

Currently there are some assumptions and limitations:

 - We assume that a user has created the "libvirt" (nat-)anchors. As
   they cannot be created on fly, it's better not to touch global pf
   configuration and let the user do the changes. If the user doesn't
   have these anchors configured, the rules will still be created in
   sub-anchors, but will not be effective until these anchors are
   activated. Should we check if these anchors are not active to
   give some runtime warning?

 - Currently, rule reloading is not smart: it always deletes rules,
   flushes rules and re-creates that. It would be better to do that
   more gracefully.

 - IPv6 configurations are currently not supported

 - For NAT, pf requires explicit IP address or an interface to NAT to.
   We try to obtain that from the network XML definition, and if it's
   not specified, we try to determine interface corresponding to the
   default route.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-08-05 19:28:57 +02:00
Daniel P. Berrangé
63a0103df3 qemu: don't warn about missing SMM for CVM firmware
Neither Intel TDX / AMD SEV(SNP) allow use of SMM, but the EDK2
firmware none the less supports secureboot. Libvirt currently
issues bogus warnings about Fedora firmware

  warning : qemuFirmwareSanityCheck:1575 : Firmware description
  '/usr/share/qemu/firmware/60-edk2-ovmf-x64-inteltdx.json' has
  invalid set of features: requires-smm = 0, secure-boot = 1,
  enrolled-keys = 1

This removes the warning if the firmware descriptor indicates use
of any confidential VM technology.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-05 16:27:54 +01:00
Daniel P. Berrangé
5537732b06 ci: regenerate with 'lcitool manifest'
This pulls in the fix for libxen which has been removed from armv7
in Debian sid.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-05 13:08:37 +01:00
George Melikov
23a1eb0dc7 Storage: ZFS: implement resizeVol method to support native resize
ZFS doesn't have thick allocations, every allocation is
thin-provisioned, so resize operation is essentially
a zvol size limit change
(`zfs set volsize=X pool/zvol_name`).

Shrink is allowed too (which leads to data destruction),
but shrink restriction is already implemented in libvirt,
so this function doesn't need to check anything.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: George Melikov <mail@gmelikov.ru>
2025-08-05 11:31:58 +01:00
Daniel P. Berrangé
b0cc1c5243 docs: update <hwuuid> docs to refer to version 11.7.0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-01 18:30:10 +01:00
Mark Cave-Ayland
abe8d89daf qemuxmlconftest: add tests for new hardware UUID (hwuuid) element
Add new 'hwuuid' and 'hwuuid-smbios-uuid-match' tests to verify that the new
hardware UUID (hwuuid) element is working as intended.

In particular the 'hwuuid-smbios-uuid-match' test is designed to ensure that
the hwuuid and smbios UUIDs are always identical, similar to the existing logic
works for the domain UUID and the smbios UUID.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
2025-08-01 18:26:33 +01:00
Mark Cave-Ayland
5d2235ff45 conf: introduce hardware UUID (hwuuid) element
The hardware UUID (hwuuid) element provides a mechanism to supply an external
UUID to the guest, as opposed to the libvirt domain UUID. This is to allow
for the scenario whereby a domain can be stopped, cloned and then started as
a new domain without altering the guest-visible UUID.

Add the element, documentation and core code for the hwuuid feature along
with an implementation for the QEMU driver.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
2025-08-01 18:26:27 +01:00
Daniel P. Berrangé
cd71d5a46e src: fix package name in local pkg-config files
The libvirt-lxc.pc.in and libvirt-qemu.pc.in files had the
incorrect package name, though fortunately this appears to
have been a harmless mistake.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-01 18:10:06 +01:00
Daniel P. Berrangé
54e853c864 src: add missing libvirt-admin.pc.in for local usage
When using the 'run' script, we point pkg-config to files
in $BUILD/src, which resolve to the local build tree.
Unfortunately we forgot a libvirt-admin.pc.in, so the run
script was not taking effect for the admin APIs.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-08-01 18:10:02 +01:00
Michal Privoznik
70126914fb virnetdevvportprofile: Turn 'virtPortType' of virNetDevVPortProfile into proper enum type
Convert the member to the appropriate type, fix few missing cases
in switch() and switch to virXMLPropEnum() in parsing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-01 12:24:20 +02:00
Michal Privoznik
425ffa3cd5 virnetdevvportprofile: Drop explicit enum virNetDevVPortProfile declaration
The virNetDevVPortProfile enum is both explicitly declared and
also typedef-ed. This repetition is redundant. Just use typedef.
To make matters worse, there's another type with the same name,
but because in the code, those few places used 'enum
virNetDevVPortProfile var;' to declare variables compilers didn't
complain.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-08-01 12:24:20 +02:00
Jiri Denemark
4e19e73bcd Post-release version bump to 11.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-08-01 11:07:28 +02:00
Jiri Denemark
5085c7fd03 Release of libvirt-11.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-08-01 11:03:17 +02:00
김인수
1f5d1144eb Translated using Weblate (Korean)
Currently translated at 99.8% (10926 of 10939 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-08-01 10:04:05 +02:00
Américo Monteiro
de4b8a51ca Translated using Weblate (Portuguese)
Currently translated at 56.2% (6156 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 56.1% (6147 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 55.2% (6043 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 55.1% (6033 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 55.0% (6017 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 54.5% (5968 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-08-01 10:04:05 +02:00
Peter Krempa
dbb5642d12 NEWS: Mention RBD namespaces, and auto-shutdown/key encipherment fixes
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-31 18:13:06 +02:00
Zhenzhong Duan
4747fcc07d qemu: Bypass sending VIR_DOMAIN_EVENT_RESUMED event when TD VM reboot
When TD VM reboot, qemu process is recreated by destroying old and
creating new one. When new qemu process starts, it sends a RESUME
event while libvirt domain isn't in run state yet. Then event
VIR_DOMAIN_EVENT_RESUMED is sent out and confuse control plane.

Check priv->pausedShutdown and bypass the event for TD VM, for
normal VM, domain is in run state and already bypassing it.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-31 11:40:55 +01:00
Daniel P. Berrangé
4ee4bf062e news: document fixed nwfilter driver base chain creation
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-31 11:38:26 +01:00
Michal Privoznik
ab71cd66a9 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: Jiri Denemark <jdenemar@redhat.com>
2025-07-30 17:45:01 +02:00
Roman Bogorodskiy
c36c608f48 NEWS: document bhyve changes for the release
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-30 16:22:29 +02:00
Américo Monteiro
b5a377bb18 Translated using Weblate (Portuguese)
Currently translated at 54.4% (5951 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5871 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:53 +02:00
Weblate
244f82908c Translated using Weblate (Portuguese)
Currently translated at 53.6% (5871 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5870 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:53 +02:00
Américo Monteiro
d92ed868a2 Translated using Weblate (Portuguese)
Currently translated at 53.6% (5870 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5869 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:52 +02:00
Weblate
cb1a1a4b6b Translated using Weblate (Portuguese)
Currently translated at 53.6% (5869 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:51 +02:00
Américo Monteiro
ebd995a8e2 Translated using Weblate (Portuguese)
Currently translated at 53.6% (5868 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:50 +02:00
Weblate
16b726693b Translated using Weblate (Portuguese)
Currently translated at 53.6% (5868 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5867 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:50 +02:00
Américo Monteiro
0cbb2dc71c Translated using Weblate (Portuguese)
Currently translated at 53.6% (5867 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5866 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:49 +02:00
Weblate
906e910d5e Translated using Weblate (Portuguese)
Currently translated at 53.6% (5866 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:48 +02:00
Américo Monteiro
c55dd6fbda Translated using Weblate (Portuguese)
Currently translated at 53.6% (5865 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:47 +02:00
Weblate
0af5b37187 Translated using Weblate (Portuguese)
Currently translated at 53.6% (5865 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.6% (5864 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:47 +02:00
Américo Monteiro
d8f099360a Translated using Weblate (Portuguese)
Currently translated at 53.6% (5864 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5862 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5861 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:46 +02:00
Weblate
d09f15eeba Translated using Weblate (Portuguese)
Currently translated at 53.5% (5862 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5861 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5860 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:45 +02:00
Américo Monteiro
ac2793f9b5 Translated using Weblate (Portuguese)
Currently translated at 53.5% (5860 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5859 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5858 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:44 +02:00
Weblate
cf33947981 Translated using Weblate (Portuguese)
Currently translated at 53.5% (5859 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5858 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:43 +02:00
Américo Monteiro
435cf5984a Translated using Weblate (Portuguese)
Currently translated at 53.5% (5858 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:43 +02:00
Weblate
12a6022e1c Translated using Weblate (Portuguese)
Currently translated at 53.5% (5856 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:42 +02:00
Américo Monteiro
60ba3e763e Translated using Weblate (Portuguese)
Currently translated at 53.5% (5855 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:41 +02:00
Weblate
108eb67121 Translated using Weblate (Portuguese)
Currently translated at 53.5% (5855 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:41 +02:00
Américo Monteiro
22fa8f7785 Translated using Weblate (Portuguese)
Currently translated at 53.5% (5855 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5854 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5853 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:40 +02:00
Weblate
71cccda5f6 Translated using Weblate (Portuguese)
Currently translated at 53.5% (5854 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.5% (5853 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:39 +02:00
Américo Monteiro
3786cb44bd Translated using Weblate (Portuguese)
Currently translated at 53.4% (5851 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:39 +02:00
Weblate
8ae8a66891 Translated using Weblate (Portuguese)
Currently translated at 53.4% (5851 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5850 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:38 +02:00
Américo Monteiro
07abe42cd5 Translated using Weblate (Portuguese)
Currently translated at 53.4% (5850 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5849 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5848 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:37 +02:00
Weblate
a0280f0369 Translated using Weblate (Portuguese)
Currently translated at 53.4% (5849 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5848 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5847 of 10939 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-30 05:43:36 +02:00
Américo Monteiro
aff33becb5 Translated using Weblate (Portuguese)
Currently translated at 53.4% (5846 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.4% (5844 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 53.0% (5805 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.9% (5797 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.9% (5788 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.8% (5778 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.6% (5763 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.6% (5759 of 10939 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-30 05:43:36 +02:00
Peter Krempa
925040d7bb Revert "qemu: Match firmware with fully resolved and canonicalized paths"
The canonicalization of the paths is not mocked properly and thus the
tests depend on the host system. While the tests do pass on our CI they
break on real deployments at least on Fedora 42.

Since we're in code freeze for the upcoming release, revert the patch
instead of attempts to fix it.

This reverts commit 4efea21ae8.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-29 14:35:58 +02:00
Peter Krempa
7baf59f4fc Revert "qemuxmlconfdata: Regenerate outputs after last commit"
Turns out the test difference was not caused by forgotten hunks but
rather that the test output depends on the system.

For now both this wrong fix and the commit causing the failure will both
be reverted as we're in code freeze for the upcoming release.

This reverts commit 73345ccc7b.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-29 14:35:58 +02:00
Peter Krempa
73345ccc7b qemuxmlconfdata: Regenerate outputs after last commit
Commit 4efea21ae8 modified how the EFI
paths are detected but didn't update the outputs.

Fixes: 4efea21ae8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-07-29 12:36:41 +02:00
James Le Cuirot
4efea21ae8 qemu: Match firmware with fully resolved and canonicalized paths
Distros may provide compatibility symlinks after moving firmware files
around, but they won't work for existing VMs when doing a straight
string comparison.

I tried to compare inodes instead, but even glib doesn't provide a
straightforward cross-platform method to do this.

Resolves: https://bugs.gentoo.org/960591
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-29 10:40:47 +02:00
James Le Cuirot
249476cbf9 util: Fully resolve paths with virFileComparePaths
The description says it "resolve all symlinks", but it was only
resolving the last component.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-29 10:40:44 +02:00
Martin Kletzander
980dd220e5 NEWS: Mention zero discard_granularity option
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-29 09:56:54 +02:00
Daniel P. Berrangé
802c424edc include: fix version for VIR_CONNECT_BASELINE_CPU_IGNORE_HOST
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-28 20:42:39 +01:00
Daniel P. Berrangé
c4c1ad0692 include: s/RECREATION/RECREATED/ in domain event names
New event reasons were added in

  commit 1af740c501
  Author: Zhenzhong Duan <zhenzhong.duan@intel.com>
  Date:   Thu Jul 10 03:21:21 2025 -0400

    qemu: Send event VIR_DOMAIN_EVENT_[STOPPED|STARTED] during recreation

but the naming did not match existing reason names, so adapt
to match. The version tags are also updated to reflect when
this was merged.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-28 13:46:25 +01:00
Weblate
ff43c139d3 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>
2025-07-28 11:13:49 +02:00
Jiri Denemark
b405bc6799 po: Refresh potfile for v11.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-28 11:09:07 +02:00
Fco. Javier F. Serrador
70b67dcc41 Translated using Weblate (Spanish)
Currently translated at 62.3% (6822 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 61.9% (6776 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 60.5% (6624 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 59.9% (6557 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 59.9% (6554 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 59.4% (6501 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-07-28 00:57:11 +02:00
Ricky Tigg
79397fd5d4 Translated using Weblate (Finnish)
Currently translated at 21.7% (2377 of 10937 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-07-28 00:57:11 +02:00
Weblate
21913e4822 Translated using Weblate (Spanish)
Currently translated at 59.2% (6484 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-28 00:57:11 +02:00
Fco. Javier F. Serrador
dcf9e6270f Translated using Weblate (Spanish)
Currently translated at 59.2% (6484 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 58.1% (6362 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 55.7% (6098 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 55.6% (6091 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>

Translated using Weblate (Spanish)

Currently translated at 54.7% (5987 of 10937 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2025-07-28 00:57:10 +02:00
Emilio Herrera
282ac75b7d Translated using Weblate (Spanish)
Currently translated at 53.6% (5871 of 10937 strings)

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

Signed-off-by: Emilio Herrera <ehespinosa57@gmail.com>
2025-07-28 00:57:10 +02:00
Américo Monteiro
646c39786b Translated using Weblate (Portuguese)
Currently translated at 52.3% (5724 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 52.1% (5701 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 51.3% (5611 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 51.0% (5580 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 50.5% (5529 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 49.0% (5367 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 48.6% (5326 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 48.1% (5263 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 47.7% (5221 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 47.5% (5204 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 47.1% (5159 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 46.7% (5118 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 46.4% (5075 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 45.7% (5003 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 45.6% (4988 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 45.2% (4946 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 44.3% (4854 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 44.1% (4830 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 42.2% (4616 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 41.8% (4577 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 40.5% (4435 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 37.1% (4066 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 34.8% (3814 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 32.6% (3571 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 32.5% (3564 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 31.5% (3452 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 31.3% (3426 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 28.8% (3155 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 28.1% (3084 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 27.2% (2980 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 26.1% (2862 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 22.5% (2471 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 22.3% (2445 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 19.6% (2146 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 19.5% (2135 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 19.5% (2133 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 19.3% (2116 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 18.6% (2036 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 18.4% (2023 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 18.0% (1971 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 17.1% (1877 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 17.0% (1868 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 17.0% (1865 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 16.9% (1855 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 16.7% (1830 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 16.0% (1759 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 16.0% (1755 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 15.7% (1723 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 15.6% (1711 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 15.2% (1672 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 15.2% (1668 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 15.1% (1653 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 14.9% (1632 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 14.4% (1583 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 14.4% (1579 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 13.8% (1520 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 13.8% (1519 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 12.9% (1414 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 12.6% (1388 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 12.2% (1339 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 12.1% (1331 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 11.8% (1292 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 11.5% (1263 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 10.2% (1116 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 9.6% (1058 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 9.4% (1035 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 9.3% (1020 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 9.1% (1004 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 8.7% (952 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.8% (858 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.6% (841 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-28 00:57:09 +02:00
Collin Walling
899704b0ef NEWS: mention disabling deprecated features by default on s390 CPU models
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-25 15:51:06 +02:00
Boris Fiuczynski
05bb287a3d qemu: add default_cpu_deprecated_features configuration option
Allow to define the default for deprecated_features when the attribute
is not set in the cpu defintion of a domain XML. If these features are
still desired, they may be reenabled via the deprecated_features='on'
attribute.

Some existing tests utilize this updated behavior, so update the CPU
features on the corresponding args files.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
2025-07-25 15:36:21 +02:00
Boris Fiuczynski
74c305f197 tests: new qemuxmlactive tests for s390x
Add tests for active/inactive XML with deprecated_features attribute.

Note that for the qemuxmlactivetest, it is not possible to test an
inactive guest XML with the absence of "deprecated_features" attribute
and expect the active XML to have the attribute present.  This is due to
the fact that the tests never touch the code path in qemu_process that
trigger this change in the domain definition.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Collin Walling <walling@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
2025-07-25 15:36:21 +02:00
Collin Walling
f279ea36b0 qemu: process: refactor deprecated features code
Group up the deprecated features code into a single block to keep things
clean; only check if the deprecated_features attribute is present
once and then do relevent work.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
2025-07-25 15:36:21 +02:00
Collin Walling
30335e5fc5 qemu: caps: add virCPUFeaturePolicy param to virQEMUCapsUpdateCPUDeprecatedFeatures
Currently, virQEMUCapsUpdateCPUDeprecatedFeatures only allows for
disabling deprecated features.  This locks the deprecated_features
attribute to only do something if set to 'off'.

Let's add a virCPUFeaturePolicy to the function's parameters which will
allow the caller to decide what happens to these features.

Add a test with guest XML using deprecated_features='on' to ensure the
API is working properly.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
2025-07-25 15:36:21 +02:00
Collin Walling
e03995e63e docs: domain: document deprecated_features attribute
Provide documentation for the deprecated_features XML attribute.
Available since 11.0.0, and supported for S390.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
2025-07-25 15:36:21 +02:00
Zhenzhong Duan
5e5528ef14 docs: domain: Add documentation for Intel TDX guest
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
798f748210 qemuxmlconftest: Add latest version of 'launch-security-tdx*' test data
We now have the '+inteltdx' variant dumped from a modern qemu with tdx support,
add qemuxmlconftest data for that variant.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
fcc12f217e qemu: Support domain reset command for TDX guest
TDX guest doesn't support system_reset, so have to kill the old QEMU and
start a new one to simulate the reset. This can be achieved by calling
qemuProcessFakeRebootViaRecreate().

Simiar as FakeReboot, QEMU sends SHUTDOWN event with "host-signal" reason
which can trigger another FakeReset. Check if a FakeReset is ongoing and
bypass "host-signal" processing which originally comes from FakeReset.

Domain lock is already hold in qemuDomainReset() before calling
qemuProcessFakeRebootViaRecreate(), so bypass locking in it.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
1af740c501 qemu: Send event VIR_DOMAIN_EVENT_[STOPPED|STARTED] during recreation
For secure guest, FakeReboot kills original QEMU instance and
create new one which is quite different from normal guest.

To reflect this fact, VIR_DOMAIN_EVENT_[STOPPED|STARTED]
are sent to control plane with new introduced reasons
VIR_DOMAIN_EVENT_[STOPPED|STARTED]_RECREATION.

That would let control plane software understand that these
events are from a fake reboot.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
194a36f4fe qemu: Avoid duplicate FakeReboot for secure guest
For secure guest, FakeReboot kills original QEMU instance and
create new one. During this process, QEMU send SHUTDOWN event
with "host-signal" reason which can trigger another FakeReboot.

Check if a FakeReboot is ongoing and bypass "host-signal"
processing which originally comes from FakeReboot.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
312c3afa48 qemu: Support reboot command in guest
We can reboot a TDX guest with 'virsh reboot' or 'virsh shutdown' if action
for onPoweroff is 'restart'. But running reboot command in guest shell will
always lead to shutdown.

This behavior is not consistent with normal guest, fix it by checking
shutdown reason and action configuration to trigger FakeReboot.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:36:11 +01:00
Zhenzhong Duan
4f73334821 qemu: Add FakeReboot support for TDX guest
Utilize the existing fake reboot mechanism to do reboot for TDX guest.

Different from normal guest, TDX guest doesn't support system_reset,
so have to kill the old guest and start a new one to simulate the reboot.

Co-developed-by: Chenyi Qiang <chenyi.qiang@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:36:10 +01:00
Zhenzhong Duan
61c4c1b538 qemu: Add command line for TDX Quote Generation Service(QGS)
'tdx-guest' object supports a "quote-generation-socket" property for
attestation purpose. When "quote-generation-socket" is configured in
guest xml, libvirt generates unix socket format cmdline for QEMU.

'Path' element can be omitted, default path "/var/run/tdx-qgs/qgs.socket"
is used in this case.

QEMU command line example:
  qemu-system-x86_64 \
    -object '{"qom-type":"tdx-guest","id":"lsec0","mrconfigid":"xxx","mrowner":"xxx","mrownerconfig":"xxx","quote-generation-socket":{"type":"unix","path":"/var/run/tdx-qgs/qgs.socket"},"attributes":268435457}' \
    -machine pc-q35-6.0,confidential-guest-support=lsec0

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:36:10 +01:00
Zhenzhong Duan
8214980432 conf: Add Intel TDX Quote Generation Service(QGS) support
Add element "quoteGenerationService" to tdx launch security type.
It contains only an optional unix socket address attribute,
when omitted, libvirt will use default QGS server address
"/var/run/tdx-qgs/qgs.socket".

UNIX sockets offer the required functionality with greater
security than vsock, so libvirt only provides support for unix
socket.

XML example:

  <launchSecurity type='tdx'>
    <policy>0x10000001</policy>
    <mrConfigId>xxx</mrConfigId>
    <mrOwner>xxx</mrOwner>
    <mrOwnerConfig>xxx</mrOwnerConfig>
    <quoteGenerationService path='/var/run/tdx-qgs/qgs.socket'/>
  </launchSecurity>

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:10 +01:00
Zhenzhong Duan
2dec0d9ede qemu_firmware: Pick the right firmware for TDX guests
The firmware descriptors have 'intel-tdx' feature which
describes whether firmware is suitable for TDX guests.
Provide necessary implementation to detect the feature and pick
the right firmware if guest is TDX enabled.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:10 +01:00
Zhenzhong Duan
9df19f60f6 qemu: log the crash information for TDX
Since QEMU 10.1.0 commit id '6e250463b08b' guest crash information for
TDX is available in the QEMU monitor, e.g.:

    {
        "timestamp": {
            "seconds": 1752118704,
            "microseconds": 27480
        },
        "event": "GUEST_PANICKED",
        "data": {
            "action": "pause",
            "info": {
                "error-code": 0,
                "message": "TD misconfiguration: SEPT #VE has to be disabled",
                "type": "tdx"
            }
        }
    }

    Let's log this information into the domain log file, e.g.:

    2025-07-10 03:39:18.243+0000: panic tdx: error_code='0x0' message='TD misconfiguration: SEPT #VE has to be disabled'

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
2025-07-25 11:36:08 +01:00
Zhenzhong Duan
626b9ca846 qemu: Force special parameters enabled for TDX guest
TDX guest requires some special parameters to boot, currently:

 "kernel_irqchip=split"
 "pmu!=on"
 "smm!=on"
 "-bios"

If not specified explicitly, QEMU should configure this option implicitly
when start a TDX guest.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:28:02 +01:00
Zhenzhong Duan
0a825f910b conf: Expose TDX type in domain launch security capability
As the tdx launch security type support is added, expose it in domain
capabilities so that domain definition validation check can take
effect.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:28:01 +01:00
Zhenzhong Duan
67b0720d2f qemu: Add command line and validation for TDX type
QEMU will provides 'tdx-guest' object which is used to launch encrypted
VMs on Intel platform using TDX feature.

Command line looks like:
$QEMU ... \
  -object '{"qom-type":"tdx-guest","id":"lsec0","mrconfigid":"xxx","mrowner":"xxx","mrownerconfig":"xxx","attributes":268435457}' \
  -machine pc-q35-6.0,confidential-guest-support=lsec0

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:27:59 +01:00
Zhenzhong Duan
ea625cb60b conf: Validate TDX launchSecurity element mrConfigId/mrOwner/mrOwnerConfig
mrConfigId/mrOwner/mrOwnerConfig are base64 encoded SHA384 digest,
can be provided for TDX attestation.

Check their decoded lengths to ensure they are 48 bytes.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:27:58 +01:00
Zhenzhong Duan
e919a4dd37 conf: Add tdx as launch security type
When 'tdx' is used, the VM will be launched with Intel TDX feature enabled.
TDX feature supports running encrypted VM (Trust Domain, TD) under the
control of KVM. A TD runs in a CPU model which protects the confidentiality
of its memory and its CPU state from other software.

There are four optional child elements. Element policy is 64bit hex, bit 0
is set to enable TDX debug, bit 28 is set to enable sept-ve-disable, other
bits are reserved currently. When policy isn't specified, QEMU will use its
own default value 0x10000000. mrConfigId, mrOwner and mrOwnerConfig are
base64 encoded SHA384 digest string.

For example:

 <launchSecurity type='tdx'>
   <policy>0x10000001</policy>
   <mrConfigId>xxx</mrConfigId>
   <mrOwner>xxx</mrOwner>
   <mrOwnerConfig>xxx</mrOwnerConfig>
 </launchSecurity>

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:27:56 +01:00
Zhenzhong Duan
f873974883 conf: Expose TDX feature in domain capabilities
Extend qemu TDX capability to domain capabilities.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-25 11:27:55 +01:00
Zhenzhong Duan
121fd19942 qemu: Add QEMU_CAPS_TDX_GUEST capability
QEMU_CAPS_TDX_GUEST set means TDX supported with this QEMU.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-25 11:27:53 +01:00
Zhenzhong Duan
2d8d8f83a1 qemucapabilitiestest: Add data for the qemu-10.1.0 dev cycle on x86_64 for the '+inteltdx' variant
Add data based on 'v10.0.0-1724-gf9a3def17b'.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-25 11:27:51 +01:00
Zhenzhong Duan
4c59ff7783 qemucapabilitiesdata: Document '+inteltdx' variant
Upcoming patch will introduce test data from an TDX-enabled host.
Document the new variant.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-25 11:27:48 +01:00
Zhenzhong Duan
d7c96e809d qemu: Check if INTEL Trust Domain Extention support is enabled
Implement TDX check in order to generate domain feature capability
correctly in case the availability of the feature changed.

For INTEL TDX the verification is:
 - checking if "/sys/module/kvm_intel/parameters/tdx" contains the
   value 'Y': meaning TDX is enabled in the host kernel.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
2025-07-25 11:27:47 +01:00
Zhenzhong Duan
908bb55724 tools: Secure guest check for Intel in virt-host-validate
Add check in virt-host-validate for secure guest support
on x86 for Intel Trust Domain Extentions.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
2025-07-25 11:27:43 +01:00
Michal Privoznik
a2aeeab0aa meson: Report library versions in the summary
The summary() directive accepts dependency() too [1] in which
case it also prints version of the dependency found. This may
come handy when reading build process transcripts.

1: https://mesonbuild.com/Reference-manual_functions.html#summary

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-23 16:02:49 +02:00
Michal Privoznik
c2c165ea6c meson: Convert attr_dep to dependency()
Currently, libattr is detected using cc.find_library() because at
historically, the library was lacking pkg-config file. But that
changed with libattr-2.4.48 (released 7+ years ago) and even
prehistoric distros have it now. Switch to dependency().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-23 16:02:41 +02:00
Han Han
f8be069a0c qemu: Add support for RBD namespace.
Since Nautilus ceph supports separate image namespaces within a pool for
tenant isolation and QEMU adds it as a rbd blockdev options from 5.0.0.
The source name with format "<pool>/<namespace>/<image>" could be used to
access a rbd image with namespace.

Add unit tests for this attribute.

https://bugzilla.redhat.com/show_bug.cgi?id=1816909

Closes: https://gitlab.com/libvirt/libvirt/-/issues/405
Signed-off-by: Han Han <hhan@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 14:47:25 +02:00
Peter Krempa
e910f3f172 virStorageSource: Eliminate 'volume' field
While historically we've stored the 'pool' and 'image' properties of RBD
and gluster images in separate fields but they are presented in a single
field in the XML. This creates multiple points where they need to be
separated and combined.

Introduce helper 'virStorageSourceNetworkProtocolPathSplit' which will
do that at the point of use rather than everywhere in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 14:47:24 +02:00
Peter Krempa
0723e066d9 virStorageFileBackendGlusterInit: Refactor cleanup
Automatically free 'priv' and call 'glfs_fini()' directly from the two
error paths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 14:47:24 +02:00
Peter Krempa
2bdaab374f conf: Turn 'protocol' field of virStorageSource into proper enum type
Convert the member to the appropriate type, fix few offending parse
calls and remove explicit typecasts in switch().

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 14:47:24 +02:00
Kirill Shchetiniuk
fbb9ad02ab qemu: qemuDomainObjPrivateXMLParseVcpu refactor
Refactored the qemuDomainObjPrivateXMLParseVcpu function to use the
appropriate virXMLPropUInt function to parse unsigned integers,
avoiding unccessery string parsing operations.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 12:22:02 +02:00
Kirill Shchetiniuk
9ce764872c conf: virDomainChrDefParseTargetXML refactor
Refactored the default case port option parsing logic to use the
appropriate virXMLPropInt function.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 12:21:59 +02:00
Kirill Shchetiniuk
5dc483d75f util: virSecretLookupParseSecret refactor
Refactored the virSecretLookupParseSecret fucntion to use the
virXMLPropUUID fucntion, avoid getting the string and parsing it
later. Previously two separate error states merged into one by using
boolean NXOR operation.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 12:21:57 +02:00
Kirill Shchetiniuk
1173b091fe conf: virNetDevVPortProfileParse refactor
Refactored the virNetDevVPortProfileParse function to use the appropriate
virXMLProp* functions to parse input configuration XML.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 12:21:54 +02:00
Aaron M. Brown
acaed8b247 virBitmapNextClearBit: Correct virBitmapNextClearBit function header comment
This patch corrects the header comment for virBitmapNextClearBIt.
Currently, the header comment reads:

`@pos can be -1 to search for the first set bit.`

However, this statement is false.

We can prove this by referencing the virbitmaptest functions, i.e
virbitmaptest.c:223, in which i = 0

if (virBitmapNextClearBIt(bitmap, -1) != 0)
    return -1

Because this is a zero set, this case would fail if the header statement was true as is.

Signed-off-by: Aaron M. Brown <aaronmbr@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-23 09:12:18 +02:00
Peter Krempa
9a7be0662d qemu: driver: Reformat function headers for block job APIs
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:49 +02:00
Peter Krempa
3b43fa08ff virSecuritySELinuxGetSecurityMountOptions: refactor printing
Fix linebreaks and remove the use of ternary operator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:36 +02:00
Peter Krempa
aa732b4272 virSecuritySELinuxGenImageLabel: Refactor cleanup
Automatically free temporary variables in order to remove 'cleanup'
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:36 +02:00
Peter Krempa
0122f88c6e virSecuritySELinuxRestoreInputLabel: Return values directly
Skip the use of temporary variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:36 +02:00
Peter Krempa
1f1da23162 virSecuritySELinuxSetFilecon: Automatically free 'econ' temp variable
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:36 +02:00
Peter Krempa
f69ecd970d virSecuritySELinuxGetProcessLabel: Automatically free 'ctx' temp variable
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:36 +02:00
Peter Krempa
6bb5993897 virSecuritySELinuxReserveLabel: Refactor cleanup
Automatically free temporary variables in order to remove 'cleanup'
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
83739c3a18 virSecuritySELinuxGenNewContext: Refactor cleanup
Use automatic freeing of temporary variables and remove cleanup section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
9aa0cfdd55 virSecuritySELinuxContextAddRange: Refactor cleanup of 'context_t'
Use the new autoptr helper to free the temporary variables and refactor
cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
08afef3fdc security_selinux: Declare internal autoptr cleanup helper for 'context_t'
The selinux headers have a 'typedef context_s_t *context_t;' definition
in the header so we declare autoptr cleanup function for 'context_s_t'
and use it instead of 'context_t' definitions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
5db77e0c66 virSecuritySELinuxSetTapFDLabel: Refactor cleanup
Automatically free temporary variables and remove the need for 'cleanup'
section.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
3487f083b9 virSecuritySELinuxSet(Daemon)SocketLabel: Refactor cleanup
Automatically free temporary variables and change 'cleanup' label to
'error'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
7f35a1e6f2 virSecuritySELinux(Set|Restore)ChardevLabel: Refactor cleanup
Declare 'in'/'out' only in the bocks which use them and automatically
free them. Since cleanup section was removed we don't need a 'ret'
variable any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
85e22de810 virSecuritySELinux(Set|Restore)HostdevCapsLabel: Refactor cleanup
Declare 'path' only in blocks where it's used and autofree it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:35 +02:00
Peter Krempa
4bc8d70969 virSecuritySELinuxRestoreFileLabels: Refactor variable freeing
Declare 'filename' inside the loop that is using it and use automatic
freeing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Peter Krempa
c936a456b5 virSecuritySELinux(Set|Restore)TPMFileLabel: Automatically free 'cancel_path'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Peter Krempa
80ade3ac7c virSecuritySELinuxRestoreFileLabel: Refactor cleanup
Automatically free 'fcon' and 'newpath' and remove the 'cleanup' label
and 'ret' variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Peter Krempa
7891ed2d10 virSecuritySELinuxMCSFind: Refactor variable clearing
Use automatic freeing for 'mcs' and adjust the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Peter Krempa
79d2f496a5 virSecuritySELinuxTransactionRun: Refactor cleanup
Automatically free 'paths' and remove temporary variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Peter Krempa
aff852bb12 security/security_driver.c/h: Fix function header formatting
Fix the misaligned arguments by switching over to modern style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-22 16:52:34 +02:00
Daniel P. Berrangé
02669921cb news: document new crypto TLS priority string settings
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-22 14:23:50 +01:00
Dion Bosschieter
69485815d6 nwfilter: Check before removing and reinserting iptable base chains
Upon VM bootstrapping (start,restore,incoming migration)
iptablesCreateBaseChainsFW is called and unconditionally deletes and
reinserts top-level firewall chain jumps (e.g. INPUT, FORWARD rules).
This briefly allows packets to continue, allowing packets through
until the base chain iptables -I commands run.

This commit ensures that the base chains are only created once per layer
(IPV4/IPV6) and checks whether the expected rules already exist using
`iptables -L`. If they do, no delete/insert operations are performed.

By checking for the existence of rules we can prevent more rules from
being created if they already exist. Possibly speeding up nwfilter by
reducing the amount of iptable commands it executes. This however is not
part of this patch.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/784
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dion Bosschieter <dionbosschieter@gmail.com>
2025-07-22 12:05:43 +01:00
Daniel P. Berrangé
14e41ac9f3 qemu: add ability to set TLS priority string with QEMU
QEMU will either use the GNUTLS default priority string of "NORMAL",
or on Fedora/RHEL related distros, "@QEMU,SYSTEM", which resolves to
a configuration in /etc/crypto-policies/back-ends/gnutls.config.

The latter gives the sysadmin the ability to change the priority
string used for GNUTLS at deployment time, either system side, or
exclusively for QEMU, avoiding the hardcoded GNUTLS defaults.

There are still some limitations to this:

 * Priorities cannot be set for different areas of QEMU
   functionality (migration, vnc, nbd, etc)

 * Priorities are fixed at the time when QEMU first
   triggers GNUTLS to load its config file, often
   immediately at startup.

We recently uncovered a QEMU bug that causes crashes in live
migration with TLS-1.3, where the easiest workaround is to
change the TLS priorities. We can't change this on the running
QEMU, but fortunately it is possible to change it on the target
QEMU and the TLS handshake will make it take effect on both
src and dst.

The problem is, while fixing the immediate incoming and outgoing
live migration problems, the workaround will apply to everything
else that QEMU does for the rest of the time that process exists.

We want to make it possible to set the TLS priorities only for
the current migrations, such that if the target QEMU has a fixed
GNUTLS, it will not have its TLS priorities hobbled for the next
live migration.

To achieve this we need libvirt to be able to (optionally) set
the TLS priority string with QEMU. While live migration is the
most pressing need, the new qemu.conf parameters are wired up
for every subsystem for greater selectivity in future.

With this we can activate the GNUTLS workaround for running
QEMU processes by editting qemu.conf and restarting virtqemud,
and later undo this the same way.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-22 11:06:50 +01:00
Daniel P. Berrangé
0b9cfa791f qemu: sanitize blank lines in config file
We mostly use 2 blank lines between config file entries to
improve readability. Fix where we don't do that.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-22 11:05:49 +01:00
Daniel P. Berrangé
845e1b5138 qemu: fix order of VNC TLS config entries
For TLS config parameters, the 'verify' option always comes before the
'secret_uuid' option, except in the VNC case which has them reversed.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-22 11:05:20 +01:00
Roman Bogorodskiy
b860f44cf2 bhyve: implement timeout for bhyveload
The bhyveload(8) command does not have a native non-interactive mode.
It means that in case of errors, e.g. invalid boot media, it
just drops into a loader prompt and waits for user input. This behaviour
makes it tricky for users to understand what's going on.

To address that, run it with the timeout(1) tool which sends SIGTERM
after a certain timeout, and then optionally sends SIGKILL if the
command keeps hanging.

These timeout values could be configured in the bhyve.conf. Setting
timeout to 0 mean that bhyveload(8) will be executed directly, without
timeout(1).

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-21 18:29:21 +02:00
Roman Bogorodskiy
37fb778e53 bhyve: don't reset domain autostart flag on destroy
Currently, virBhyveProcessStop() uses the virDomainDeleteConfig()
helper to clean up domain status. It passes BHYVE_STATE_DIR as
a configuration dir and NULL as autostart dir, so the helper does its
job, even though it has a different purpose. However, the issue is that
it also resets the autostart (and autostartOnce) property.

This results in a situation that when a persistent domain with autostart
enabled gets destroyed, its autostart state is reported as disabled,
which is not correct.

To fix that, implement the bhyveProcessRemoveDomainStatus() which
removes the status file without side effects on the virDomainObj object.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com
2025-07-21 18:25:53 +02:00
Martin Kletzander
3a39cfacc3 qemu_tpm: Do not use persistent definition during pre-start checks
Commit 3451987fca used the persistent TPM Definition in both calls to
qemuTPMVirCommandSwtpmAddTPMState() but in one of the two cases it
might've been NULL and what's more, it is not the right definition which
should've been used.  Change that to @tpm which is the current
definition.  The other call does not have access to the current
definition and is only called during updating the profile.  But for the
sake of fewer future mistakes, keep the other one as is because there is
no issue with calling it that way and adding logic that just skips the
extra check on NULL could mistake someone in the future.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-21 10:06:45 +02:00
Lukas Greve
93c1571d90 Fix: missing a single quote in doc example
The missing single quote (') in the code snippet results
in it not being validated by virt-xml-validate

Signed-off-by: Lukas Greve <please@refre.ch>
2025-07-20 11:01:43 +02:00
Ján Tomko
6f8c5c07cf tests: nssdata: add empty status file
Add a test to make sure we will keep ignoring empty
status files properly in the future.

https://bugzilla.redhat.com/show_bug.cgi?id=2364285

Fixes: 63a3d70697
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-07-18 15:57:02 +02:00
Michal Privoznik
618eafca05 nss: Debug print JSON files as they are parsed
It may help in case the NSS plugin ever faces a corrupted JSON

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:41 +02:00
Michal Privoznik
cf27a25f9f nss: Print module name
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:41 +02:00
Michal Privoznik
9787ec5277 nss: Include filename in debug printings
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:41 +02:00
Michal Privoznik
d8a911ef9d nss: Make logging conditional on an envvar
As promised in previous commit, make NSS modules silent by
default and enable debug printings if LIBVIRT_NSS_DEBUG envvar is
set.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:41 +02:00
Michal Privoznik
bf6b390274 nss: Move logging into a separate file and turn it temporarily on
Currently, when somebody wants to debug the NSS plugin, they have
to change a line in libvirt_nss.h (to enable debug printings) and
recompile the module. This may work for us, developers, but we
can not expect this from users.

For now, this turns debug printings unconditionally on. Making it
conditional on an envvar is handled in the next commit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:41 +02:00
Michal Privoznik
c5015c435b nss: Promote debug message to proper error when time() fails
The difference between DEBUG() and ERROR() macros is that the
latter also prints (stringified) errno. Inside of findLease()
there's one line where time() is called which is documented as:

  On error, ((time_t) -1) is returned, and errno is set to
  indicate the error.

Therefore, don't just print DEBUG() but ERROR() so that the cause
for the error is printed too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 15:05:40 +02:00
Peter Krempa
3ab00ebb0a rpc: virnettlscert: Rename virNetTLSCertLoadCAListFromFile to virNetTLSCertLoadListFromFile
The function can load a generic list of certs, it doesn't necessarily
have to be the list of CAs. Rename the function, and change error to be
generic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-18 14:44:40 +02:00
Peter Krempa
70c8197a0f virNetTLSCertCheckPair: Fix function definition formatting
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-18 14:44:40 +02:00
Peter Krempa
306e27d955 virNetTLSContextNewPath: Refactor temporary variable usage
Use autofree for all temporary variables and return the result directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-18 14:44:40 +02:00
Peter Krempa
bdbfed0b1c rpc: virnettlscontext: Fix formatting of function definitions
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-18 14:44:40 +02:00
Jiri Denemark
fd0a90be27 NEWS: Mention virConnectHypervisorBaselineCPU improvements
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-18 12:30:04 +02:00
Jiri Denemark
953f19258a virsh: Add support for VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:14 +02:00
Jiri Denemark
f9f2003762 qemu: Implement VIR_CONNECT_BASELINE_CPU_IGNORE_HOST
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:14 +02:00
Jiri Denemark
bef64f9653 Introduce VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag
With this new flag virConnectHypervisorBaselineCPU can be used on any
host (rather than being limited to hosts described by individual CPUs
passed to the API). Using the flag makes the API behave similarly to the
old virConnectBaselineCPU. The main difference is the CPU definition
accepted by both APIs: the old one only accepts host CPU definition,
i.e., without 'policy' attributes as seen in the host capabilities XML.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:13 +02:00
Jiri Denemark
905d6395b7 Change documentation style of virConnectBaselineCPUFlags
Moving the documentation above each enum item gives us more space for
it.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:13 +02:00
Jiri Denemark
d74928fed3 Clarify documentation of virConnectBaselineHypervisorCPU
The API was apparently never considered for being used on a host that is
not represented in the input set of CPU definitions. The result is
limited to the set of features and CPU models known to the host's
hypervisor. This would likely not be a big issue, but thanks to a side
effect of commit v3.8.0-99-g9c9620af1d usability blockers come to play
as well. When converting CPU data (CPUID and MSR bits) to each named
model for comparison, we disable features that block usability of the
model on the current hypervisor, the rest of the features are set
according to the data without taking host capabilities into account.
Thus the process of comparing and selecting the most appropriate CPU
model for the given data is significantly influenced by the host, but it
doesn't behave as if the host CPU model was included in the input data.

The documentation tried to say the result was tied to the host's
hypervisor, but it wasn't very clear.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:13 +02:00
Jiri Denemark
999d155b21 cpu: Show input CPU model names in debug log
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-18 11:56:13 +02:00
Michal Privoznik
2d5ce69aa9 qemu_tpm: Don't report uninitialized variable in error message
Inside to qemu_tpm.c there are three functions that use the same
pattern (qemuTPMEmulatorRunSetup(), qemuTPMEmulatorReconfigure()
and qemuTPMEmulatorUpdateProfileName()):

  int exitstatus;
  ...
  if (virCommandRun(cmd, &exitstatus) < 0 || exitstatus != 0) {
      virReportError(..., exitstatus);
      return -1;
  }

Problem with this pattern is that if virCommandRun() fails then
exitstatus is left untouched and a garbage value is then passed
to virReportError().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 08:27:36 +02:00
Michal Privoznik
12d0fc3cf7 qemu: Report system error on failed open()
With a help from coccinelle three places were identified that
call virReportError() after failed open() (in
qemuDomainWriteMasterKeyFile(), qemuDomainMasterKeyReadFile() and
qemuProcessOpenVhostVsock()). The open() syscall does set errno
on failure so switch them to virReportSystemError() which may
shed more light into the reasons for failure.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 08:27:36 +02:00
Elizaveta Tereshkina
c1cf7cb334 src: fix typo in fixup_name()
Similar branches in the if-else structure look like bad copy-paste.
Fix the typo.

Fixes: a559ffec44 (src: rewrite ACL rule checker in Python)
Signed-off-by: Elizaveta Tereshkina <etereshkina@astralinux.ru>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-18 00:01:01 +02:00
Roman Bogorodskiy
22ee3b78db bhyve: sync error messages
Use the same error messages for serial devices validation which are
already used in bhyve_domain.c

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-17 19:29:11 +02:00
Roman Bogorodskiy
79456b79f3 bhyve: extend serial devices validation
Extend bhyveDomainDeviceDefValidate() to check that:

 - only 'nmdm' or 'tcp' serial devices are used,
 - serial device count is not more than supported,
 - only listening raw TCP sockets are used.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-17 19:29:11 +02:00
Roman Bogorodskiy
91a3d535c6 docs: drvbhyve: document TCP console support
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-17 19:29:11 +02:00
Roman Bogorodskiy
3a342f6402 bhyve: increase number of supported consoles to 4
Recent versions of bhyve support 4 com ports instead of just 2. Thus,
allow to use 4 console devices.

Also, there was a bug previously because the condition was
"if (chr->target.port > 2)", but as target.port start
with 0 and "com" ports start with 1, this condition allows com3 to be
used.

As bhyve supports 4 com ports already long enough, and all supported
FreeBSD versions include this capability, do not introduce driver
capability for that.

Add a couple of tests for that:

 - A domain that uses 4 serials, 2 of type 'nmdm'
   and the other 2 of type 'tcp'
 - A domain that uses unsupported port, such as target.port=4 which
   translates into com5.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-17 19:29:11 +02:00
Roman Bogorodskiy
8b7db74d4a bhyve: support serial type 'tcp'
In addition to the nmdm consoles, bhyve also supports a tcp console.
It's configured with:

 .. -l com1,tcp=127.0.0.1:12345

Then a user could connect to the guest console port 0 by making a tcp
connection to the host's 127.0.0.1:12345.

In the domain XML this configuration is represented as:

  <serial type='tcp'>
    <source mode='bind' host='127.0.0.1' service='12345'/>
    <target type='serial' port='0'/>
  </serial>

Also, update domain capabilities to include the TCP console support.
Unfortunately, there's no way to detect that from the bhyve binary
before trying to start a VM, so there's no capability probing for this
feature.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-17 19:29:10 +02:00
Martin Kletzander
680ee0e7d1 Allow specifying zero discard granularity for block devices
That allows for disabling discard in a way that some guest
OSes (e.g. Windows) understand and do not try to trim the disk.

Resolves: https://issues.redhat.com/browse/RHEL-72006
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-17 15:42:28 +02:00
Martin Kletzander
3451987fca qemu_tpm: Only warn about missing locking feature on shared filesystems
The warning pollutes the logs and might give a bad impression on someone
reading them even though the locking is not always needed.  This way we
at least limit the logging in unnecessary cases.

Resolves: https://issues.redhat.com/browse/RHEL-80155
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-17 14:04:52 +02:00
Martin Kletzander
6c6b6b2b41 qemu_tpm: Extract per-TPM functionality from qemuTPMDomainHasSharedStorage
This way we can do the check for a particular TPM also elsewhere in the
code, especially in places where we're dealing with only one TPM.  The
semantics is changed a little bit in a way that the function will check
all the TPMs as opposed to stopping on the first one which is of the
emulator type, but since a domain can currently only have one of these
it was not an issue.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-17 14:04:52 +02:00
Martin Kletzander
05c5aabb47 qemu_tpm: Rename qemuTPMHasSharedStorage -> qemuTPMDomainHasSharedStorage
The function deals with the whole domain and the part that handles one
TPM will be useful elsewhere and hence extracted later.  This rename
makes it possible for the new function to use the original name of this
renamed one.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-17 14:04:52 +02:00
Anastasia Belova
1eaaec533a virshFindDisk: fix NULL-dereference of xmlCopyNode() result
xmlCopyNode() may return NULL. Add a check and log an error
in this case.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: 22766a1a53 ("virshFindDisk: Sanitize use of 'tmp' variable")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-17 12:54:17 +02:00
Nikolai Barybin
cad407c862 qemu: qapi: fix potential SIGSEGV in virQEMUQAPISchemaTraverseObject()
We need to check obj ptr before passing it to
virJSONValueObjectHasKey(). If it's NULL it will fail with SIGSEGV.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-16 15:38:29 +02:00
Pavel Hrdina
722aad03b0 conf: schemas: add sysinfo.rng and sysinfocommon.rng into list of installed schemas
Fixes: 918594b419
Fixes: 6465a813d6
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-15 12:26:56 +02:00
Michal Privoznik
1f9a64a016 build: prohibit realpath() by syntax-check
We have virFileCanonicalizePath() which calls realpath() but
also is present in our mocks (in contrast to realpath()).
Introduce a syntax-check rule to enforce use of our wrapper.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-15 10:13:23 +02:00
Kirill Shchetiniuk
923cd431b9 conf: virDomainHostdevSubsysMediatedDevDefParseXML refactor
Refactored the virDomainHostdevSubsysMediatedDevDefParseXML function
to use virXMLPropUUID fuction instead of getting a string and parsing
it later.

Due to parsing function change the missing uuid error reporter and
message were changed and changed error message was also reflected in
tests' outputs.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-07-14 18:42:20 +02:00
Peter Krempa
6465a813d6 schema: Schema validate host '<sysinfo>' XML test documents
Introduce schema for the host '<sysinfo>' output XMLs and validate our
test data against the schema.

This requires introduction of schema for '<processor>' and
'<memory_device>' elements which are not supported when sysinfo is set
explicitly for a domian definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-14 14:14:36 +02:00
Peter Krempa
918594b419 conf: schemas: Split out common parts of 'sysinfo' schema
Extract the common bits of the domain definition <sysinfo> schema which
will be also later reused to construct schema for the host <sysinfo> top
level element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-14 14:14:36 +02:00
Peter Krempa
2da49eaea4 sysinfotest: Use '.xml' suffix for output files
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-14 14:14:36 +02:00
Ján Tomko
98a98f9ad6 docs: clarify how to build without -Werror
--werror does not accept any arguments for me and setting
git_werror was also needed to disable it with git.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-07-11 14:36:15 +02:00
Jim Fehlig
81df391428 NEWS: Mention switch to virtio-scsi on ARM and RISC-V
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-07-10 11:50:14 -06:00
Bhavin Gandhi
bf8c7af771 virdevmapper: Always use device name for finding targets
DM_TABLE_DEPS expects a device name in dm_ioctl.name. In one of the
cases, full path of the device was getting returned causing the ioctl
call to fail with `ENXIO (No such device or address)`.

Also rename the function and variable names to better reflect that we
are dealing with DM device names and not paths.

This got introduced in 2249455654
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/790

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Bhavin Gandhi <bhavin192@geeksocket.in>
2025-07-10 10:30:15 +01:00
Peter Krempa
edf7d9f29a nwfilter: Remove 'qemu-announce-self' example
The example allows packets sent by qemu after migration with broken
protocol ID. The proper self announce is handled via
'qemu-announce-self-rarp'.

The qemu bug was addressed by f8778a7785d530515b0db39 (released as
v0.13.0). As we no longer support such old qemus, and allowing broken
packets makes no sense. Remove the rule and make it into an alias of
'qemu-announce-self-rarp' to preserve compatibility. Adjust the existing
examples to use only the proper rule.t

Closes: https://gitlab.com/libvirt/libvirt/-/issues/792
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-07-08 14:58:04 +02:00
Peter Krempa
e7a7bfa66b qemucapabilitiestest: Add dump for the qemu-10.1 development cycle on x86_64
Data based on 'v10.0.0-1874-gc77283dd5d'.

Notable changes:
 - machine types:
    - added 10.1 machines
    - dropped old machine types up to '4.1' (oldest supported is now '4.2)
 - new devices 'vfio-iommu-user', 'vfio-user-pci'
 - new qom types 'tdx-guest' (including additions to GUEST_CRAS* events
   etc), 'ram-block-attributes'

 - CPU stuff:
    - new models: 'EPYC-Turin-x86_64-cpu',
    - new model versions: 'EPYC-Genoa-v2-x86_64-cpu', 'EPYC-Milan-v3-x86_64-cpu'
                          'EPYC-Rome-v5-x86_64-cpu', 'EPYC-v5-x86_64-cpu'
    - new flags: 'fs-gs-base-ns', 'prefetchi', 'its-no msr-imm'

 - keep-alive options added to all types using 'inet' socket addreses

 - Some platform specific QMP commands are now reported on all
   platforms:
    - 'query-gic-capabilities'
    - 'query-cpu-model-baseline'
    - 'query-cpu-model-comparison',
    - 'dump-skeys'
    - 'set-cpu-topology' (unstable)
    - 'query-s390x-cpu-polarization' and corresponding 'CPU_POLARIZATION_CHANGE' event (unstable)

 - blockdev stuff:
    - blockdev-backup 'on-cbw-error' property added
    - blockdev-mirror 'target-is-zero' property added
    - deprecated commands: 'block-job-complete', 'block-job-dismiss',
                           'block-job-finalize', 'block-job-pause',
                           'block-job-resume'
    - 'dpofua' parameter of scsi disks was now enabled by default

 - 'migrate-extra' flag of 'virtio-net' removed
 - virtio devices gained 'sriov-pf' parameter

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:31 +02:00
Peter Krempa
325d3e3094 qemuxmlconftest: x86_64: Bump 'firmware*' test cases to 'pc-q35-10.0'
New qemu is deprecating 'pc-q35-4.0-machine', update to the latest
released machine type.

Apart from the previous cases where we could use the aliased machine
type, the firmware auto-selection doesn't work properly for the
unexpanded 'q35' alias and thus we need to use a real machine type here.

Outside of tests a real machine type would be filled anyways, the use of
the alias happens only inside our '-latest' test suite.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
974ec08cb9 qemuxmlconftest: x86_64: Bump 'firmware*' test cases to 'pc-i440fx-10.0'
New qemu is deprecating 'pc-i440fx-4.0-machine', update to the latest
released machine type.

Apart from the previous cases where we could use the aliased machine
type, the firmware auto-selection doesn't work properly for the
unexpanded 'pc' alias and thus we need to use a real machine type here.

Outside of tests a real machine type would be filled anyways, the use of
the alias happens only inside our '-latest' test suite.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
060c9efd42 qemuxmlconftest: x86_64: Drop explicit use of '2.9' machine type
New qemu will be deprecating them. Drop the use from test files not
depending on the actual machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
9ecbbd713f qemuxmlconftest: x86_64: Drop explicit use of '2.5' machine type
New qemu will be deprecating them. Drop the use from test files not
depending on the actual machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
53545ca3c5 qemuxmlconftest: x86_64: Drop explicit use of '2.12' machine type
New qemu will be deprecating them. Drop the use from test files not
depending on the actual machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
922db10ee4 qemuxmlconftest: x86_64: Drop explicit use of '2.10' machine type
New qemu will be deprecating them. Drop the use from test files not
depending on the actual machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:52:30 +02:00
Peter Krempa
e67952b0e6 tests: virnettls*test: Drop use of GNUTLS_KEY_KEY_ENCIPHERMENT
It's not needed with TLS 1.3 any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-08 14:52:16 +02:00
Peter Krempa
3da4602369 kbase: tlscerts: Drop 'encryption_key' feature request
As TLS 1.3 performs key exchange separately from the algorithm used to
verify authenticity, the certificates for libvirt's use of TLS don't
need to require the 'encryption_key' feature any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-08 14:52:16 +02:00
Peter Krempa
8cecd3249e tls: Don't require 'keyEncipherment' to be enabled altoghther
Key encipherment is required only for RSA key exchange algorithm. With
TLS 1.3 this is not even used as RSA is used only for authentication.

Since we can't really check when it's required ahead of time drop the
check completely. GnuTLS will moan if it will not be able to use RSA
key exchange.

In commit 11867b0224 I tried to relax the check for some eliptic
curve algorithm that explicitly forbid it. Based on the above the proper
solution is to completely remove it.

Resolves: https://issues.redhat.com/browse/RHEL-100711
Fixes: 11867b0224
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-08 14:52:16 +02:00
Peter Krempa
1c2295fbaf virDomainDriverAutoShutdown: Refactor selection logic for VMs
Decide separately and record what shutdown modes are to be applied on
given VM object rather than spreading out the logic through the code.

This centralization simplifies the conditions in the worker functions
and also:
 - provides easy way to check if the auto-shutdown code will be acting
   on domain object (will be used to fix attempt to auto-restore of
   VMs which were not selected to be acted on
 - will simplify further work where the desired shutdown action will be
   picked per-VM

This refactor also fixes a bug where if restoring of the state is
applied also on VMs that are not selected for action based on current
logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
e1f84ca87e virDomainDriverAutoShutdownDoSave: Don't attempt to save transient VMs
Commit 84bb136c31 added code that intended to skip the save of
transient domains but did so only in the setup part where we pause the
VMS. The second loop that actually attempts to save the VM was not
modified so we'd still try saving them:

 Jul 03 14:15:13 andariel virtqemud[247210]: auto-shutdown: unable to perform managed save of 'cd3': Requested operation is not valid: cannot do managed save for transient domain

Fixes: 84bb136c31
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
e13e9b46f6 hypervisor: Split out individual steps out of virDomainDriverAutoShutdown
'virDomainDriverAutoShutdown' grew into an unwieldy function. Extract
the code for each of the save/shutdown/poweroff steps into helpers and
call them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
82963fdcb6 qemu: Fix auto-shutdown of qemu VMs by the qemu driver
When auto-shutdown via the qemu driver is requested (rather than via
libvirt guests) we need to start the VMs in a way that they will be kept
around for libvirt to terminate them. This involves inverting the
dependancy relationship for the machined unit file.

Since the setup is done at startup of the VM, add a disclaimer to
qemu.conf that switching between the two modes with VMs running will not
work properly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
fe57a6deaa cgroup: Plumb the 'daemonDomainShutdown' parameter of 'virSystemdCreateMachine' to drivers
Plumb the new argument across the cgroup helpers up to the domain driver
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
9b12b7e859 virSystemdCreateMachine: Add flag to invert machined unit dependencies
The existing dependency order of the 'machined' unit file for the domain
we're starting ("After libvirtd/virtqemud"->thus shuts down *before* the
daemon) is intended to work with 'libvirt-guests.service' which requires
the daemon to be around to shut down the VMs.

If we want to use the integrated auto shutdown done by the daemon itself
we need to be able to instruct the domains (thus the corresponding
machined units to shut down *after* virtqemud/libvirt.

This means that we need to be able to invert the ordering relationship
to "Before".

This patch adds a parameter to virSystemdCreateMachine so that when
starting the VM we'll be able to tell the daemon to use the proper
relationship.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
bb51963bb1 hypervisor: domain: Extract logic for auto shutdown to virDomainDriverAutoShutdownActive
Extract the checker that determines whether the daemon auto shutdown
functionality is active to a separate helper
'virDomainDriverAutoShutdownActive'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
c8adb8537b qemu: conf: Store 'autoShutdown' config in virDomainDriverAutoShutdownConfig
Rather than having a bunch of extra variables save the configuration of
the daemon auto shutdown in virDomainDriverAutoShutdownConfig which is
also used when initiating the shutdown.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
3e0859566a cgroup: Unexport 'virDomainCgroupInitCgroup'
The function is called just from one place within the module where it's
defined.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Peter Krempa
0df20b69c8 virSystemdCreateMachine: Document @maxthreds
The parameter overrides the maximum number of threads for the machine.

Fixes: d5572f62e3
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-07-08 14:51:44 +02:00
Andrea Bolognani
3c8e60b9d0 qemu: Use virtio-scsi by default on RISC-V
Using lsilogic on RISC-V was never an actual decision, but
rather a consequence of that being the default for legacy x86
guests. Using virtio-scsi is a much more sensible choice.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-08 11:05:12 +02:00
Andrea Bolognani
49478996c3 qemu: Clean up qemuDomainDefaultSCSIControllerModel()
Use a better order for sections, improve comments, tweak
formatting.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-08 11:05:10 +02:00
Andrea Bolognani
9bbb8944f5 qemu: Improve qemuDomainDefaultSCSIControllerModel()
Make the helper stateless. This requires the caller to check
whether it needs to be called in the first place instead of
adding this check inside the function, which makes for more
readable, if a little more verbose, code.

We also update callers to check the return value against
VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT instead of a
functionally equivalent, but semantically less meaningful,
check for whether the return value is negative.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-07-08 11:05:06 +02:00
Jim Fehlig
1fb968eaf1 qemu: Switch to virtio-scsi on ARM
Similar to x86, the default SCSI controller model for ARM is lsilogic.
But unlike x86, the ARM virt machine type prefers virtio devices. Switch
the default controller model for ARM from lsilogic to virtio-scsi.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-07-07 14:31:50 -06:00
Ngai-Mint Kwan
6f64315ba7 docs: fix typo in qemu-passthrough-security
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
2025-07-04 15:37:07 +02:00
Andrea Bolognani
69b894dc04 qemu: Improve error message for USB controller validation
Use the same wording as for SCSI controllers, which also
happens to contain additional information (the controller's
index).

The new error message and error type are more accurate anyway:
in most cases, it's perfectly fine for the user not to provide
a controller model explicitly, as libvirt will try to figure
out a reasonable default.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-04 15:30:01 +02:00
Andrea Bolognani
358b68f09d qemu: Move error reporting out of qemuDomainDefaultSCSIControllerModel()
We want this helper to work more like other similar ones, where
error reporting is performed by the caller. This introduces a
small amount of code duplication but makes for a cleaner API.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-04 14:26:21 +02:00
Andrea Bolognani
4518ff0f24 qemu: Rename qemuDomainDefaultSCSIControllerModel()
The original name was qemuDomainGetSCSIControllerModel().

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-04 14:26:21 +02:00
Andrea Bolognani
49a9b2e3ec tests: Add controller-scsi-default-unavailable
This provides coverage for the (very unlikely) scenario in
which none of the possible devices are built into QEMU.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-07-04 14:26:21 +02:00
Américo Monteiro
a6d41688a6 Translated using Weblate (Portuguese)
Currently translated at 7.6% (835 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.1% (786 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:27 +02:00
Weblate
b2a6de3668 Translated using Weblate (Portuguese)
Currently translated at 7.1% (783 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:27 +02:00
Américo Monteiro
3d7cb52282 Translated using Weblate (Portuguese)
Currently translated at 7.1% (783 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.1% (781 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.1% (781 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:27 +02:00
Weblate
a3a2086497 Translated using Weblate (Portuguese)
Currently translated at 7.1% (781 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:26 +02:00
Américo Monteiro
ef3c3990ab Translated using Weblate (Portuguese)
Currently translated at 7.1% (779 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:25 +02:00
Weblate
155bae8b93 Translated using Weblate (Portuguese)
Currently translated at 7.1% (779 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 7.1% (778 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:24 +02:00
Américo Monteiro
2314d60b4e Translated using Weblate (Portuguese)
Currently translated at 7.1% (778 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.1% (777 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:23 +02:00
Weblate
6fd7945432 Translated using Weblate (Portuguese)
Currently translated at 7.1% (777 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 7.0% (776 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:23 +02:00
Américo Monteiro
4559999f9a Translated using Weblate (Portuguese)
Currently translated at 7.0% (776 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:22 +02:00
Weblate
9cc5b0f9c4 Translated using Weblate (Portuguese)
Currently translated at 7.0% (772 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:21 +02:00
Américo Monteiro
9f7e8edb6b Translated using Weblate (Portuguese)
Currently translated at 7.0% (772 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 7.0% (771 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:20 +02:00
Weblate
80a1157e36 Translated using Weblate (Portuguese)
Currently translated at 7.0% (771 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 7.0% (770 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:19 +02:00
Américo Monteiro
8b761cbf10 Translated using Weblate (Portuguese)
Currently translated at 7.0% (770 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:19 +02:00
Weblate
c67a95fa8c Translated using Weblate (Portuguese)
Currently translated at 6.2% (680 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:18 +02:00
Américo Monteiro
25e83d781a Translated using Weblate (Portuguese)
Currently translated at 6.2% (680 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.9% (648 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.7% (630 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.6% (623 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.5% (607 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.2% (575 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 5.2% (574 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 4.6% (508 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 4.2% (469 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:17 +02:00
Weblate
d14452dc12 Translated using Weblate (Portuguese)
Currently translated at 4.2% (462 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:16 +02:00
Américo Monteiro
a9ca942f7b Translated using Weblate (Portuguese)
Currently translated at 4.2% (462 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:16 +02:00
Weblate
3ed6e2815b Translated using Weblate (Portuguese)
Currently translated at 4.1% (455 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:15 +02:00
Américo Monteiro
acff59f868 Translated using Weblate (Portuguese)
Currently translated at 4.1% (455 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:14 +02:00
Weblate
50e709fd77 Translated using Weblate (Portuguese)
Currently translated at 4.1% (452 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:13 +02:00
Américo Monteiro
4fc6869793 Translated using Weblate (Portuguese)
Currently translated at 4.1% (452 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 3.9% (436 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 3.9% (435 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 3.7% (406 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 3.6% (402 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:13 +02:00
Weblate
95c741f9c0 Translated using Weblate (Portuguese)
Currently translated at 3.6% (402 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:12 +02:00
Américo Monteiro
e1227b9645 Translated using Weblate (Portuguese)
Currently translated at 3.6% (397 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:11 +02:00
Weblate
ee5cf812e0 Translated using Weblate (Portuguese)
Currently translated at 3.6% (397 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 3.6% (396 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:10 +02:00
Américo Monteiro
8d6a5d391b Translated using Weblate (Portuguese)
Currently translated at 3.6% (396 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 3.2% (357 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:09 +02:00
Weblate
ed137febd8 Translated using Weblate (Portuguese)
Currently translated at 3.2% (357 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:09 +02:00
Américo Monteiro
9f2638f8bb Translated using Weblate (Portuguese)
Currently translated at 3.2% (350 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:08 +02:00
Weblate
f70454b056 Translated using Weblate (Portuguese)
Currently translated at 3.2% (350 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 3.1% (349 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>

Translated using Weblate (Portuguese)

Currently translated at 3.1% (348 of 10937 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-07-04 09:49:07 +02:00
Américo Monteiro
b1822eb340 Translated using Weblate (Portuguese)
Currently translated at 3.1% (348 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-04 09:49:06 +02:00
Michal Privoznik
01badd1bfb virt-aa-helper-test: Switch to getopts
Instead of treating -d and -v arguments as positional, use
getopts to parse cmd line arguments passed to
virt-aa-helper-test script.

While at it, introduce -h for printing basic help describing each
argument.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:38 +02:00
Michal Privoznik
9569a43b7a virt-aa-helper: Drop cleanup label from get_files()
After previous cleanup the cleanup label is no longer necessary.
Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:36 +02:00
Michal Privoznik
ecca0dded4 virt-aa-helper: Check retval of vah_add_file()
Inside of get_files() there are two cases where vah_add_file() is
not checked for its retval. This is possibly dangerous, because
vah_add_file() might fail. Fix those places by introducing checks
for the retval.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:30 +02:00
Michal Privoznik
05e06927b6 virt-aa-helper: Use automatic memory freeing
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:27 +02:00
Michal Privoznik
2f7e11aaa3 virt-aa-helper: Decrease scope of @mem_path in get_files()
The @mem_path variable inside of get_files() is used only within
a single block. Move its declaration inside it. And also utilize
automatic memory freeing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:23 +02:00
Michal Privoznik
980607b1e9 virt-aa-helper: Simplify paths collection
The way virt-aa-helper works is the following: the apparmor
secdriver formats domain XML, spawns virt-aa-helper process and
feeds it with domain XML (through stdin). The helper process then
parses the XML and iterates over devices, appending paths in each
loop.

These loops usually are in the following form:

  for (i = 0; i < ctl->def->nserials; i++) {
      if (ctl->def->serials[i] && ...
  }

While we are probably honourable members of tautology club, those
NULL checks are redundant. Our XML parses would never append NULL
into def->devices array. If it did, we're in way bigger problems
anyway.

Then, constantly dereferencing ctl->def just to get to a path
that's hidden a couple of structures deep gets hard to read. Just
introduce temporary variables.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:20 +02:00
Michal Privoznik
cca3563602 virt-aa-helper: Rework USB hostdev handling
For an USB device, the virt-aa-helper must put that
/dev/bus/usb/... path associated with given device. The way the
code is currently written not only leads to a memleak (the @usb
variable is allocated only to be overwritten right away), but is
needlessly cumbersome.

We can use virHostdevFindUSBDevice() to find the USB device,
check if its missing and if not add the path associated with it
into the profile.

While at it, also use automatic memory freeing for the variable.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:17 +02:00
Michal Privoznik
935bd37c4a virt-aa-helper-test: Test hostdevs unconditionally
Our test suite is very feature rich. In particular, it has two
mocks that implement sysfs close enough to create
host-independent environment to work with PCI and USB devices.
These mocks are called virpcimock and virusbmock, respectively.

Inside of virt-aa-helper-test there is an attempt to test whether
virt-aa-helper generates profiles for <hostdevs/>, once for USB
and the other time for PCI. Use this mocks to run virt-aa-helper
in an environment where certain PCI/USB devices always exist.

There are two problem though:

1) those two test cases use hardcoded PCI/USB addresses, which
   makes them host environment dependant,

2) neither of the test cases checks whether corresponding rule
   was added into the profile.

Using mocks we can get away with problem 1), and by passing the
fifth argument to testme() we can list an expected rule in the
profile.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:12 +02:00
Michal Privoznik
9f12874238 virt-aa-helper-test: Silence ls
virt-aa-helper checks presence of files before it adds them into
a profile. Because of that, test cases inside of
virt-aa-helper-test that require presence of /boot/initrd* are
guarded by a check. The check uses ls to find at least one initrd
file. If there's none, then ls prints an error onto stderr. This
is not helpful because the test script prints a message on its
own right after.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:10 +02:00
Michal Privoznik
58bf3de02c virt-aa-helper-test: Print errors to stderr
When a test case fails, there are two echo-s executed: the first
one either prints the error message into /dev/null (default) or
onto stdout (when the test script is executed with -d). Then, the
second one prints the error message onto stdout. While this
technically works, there's nothing ever printed onto stderr which
is usually what's captured. Worse, if some command within the
script fails, it prints something onto stderr but then looking at
meson logs it's needlessly hard to match stderr and stdout lines.

Just print error messages onto stderr.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:07 +02:00
Michal Privoznik
300965f4f1 tests: Fix mocking of open()
In some cases (well, majority), open() is either rewritten to
open64(), either by plain '#define open open64') or at assembly
level (using __REDIRECT macro). See <fcntl.h> for more info.

This didn't really matter to us, because we do not chain load two
mocks that would need to reimplement open() at the same time. But
this is soon going to change.

The problem is, that VIR_MOCK_REAL_INIT(open) glances over
aforementioned rewrite and initializes real_open pointer to
open() from the standard C library. But it needs to point to
open() (well, open64()) from the next mock on the list.

Therefore, init real_open to open64().

But of course, this is all glibc specific and for example musl
does the oposite (#define open64 open).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:04 +02:00
Michal Privoznik
21e7bcc14f virpcimock: Strip fakerootdir prefix in virFileCanonicalizePath()
The mocked implementation of virFileCanonicalizePath() redirects
accesses to few dirs into a temporary directory, where PCI
related files live. See getrealpath() for more info on this.

Anyway, in the end - real implementation of
virFileCanonicalizePath() is called which then might contain the
'fakerootdir' prefix. Up until now this did not matter because
none of our test really cared about actual value of resolved
path. They usually cared about last component of the path or
something. But this will soon change.

TLDR - if the returned path has $fakerootdir prefix, strip it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:54:00 +02:00
Michal Privoznik
99dd19c013 virpcimock: Automatically invent fakerootdir, if not provided
Currently, all users of virpcimock do set LIBVIRT_FAKE_ROOT_DIR
envvar. But soon, virt-aa-helper will be run with it and
basically right at the beginning of its main() it clears whole
environment. So even if the envvar is provided the mock won't see
that.

Anyway, the solution is to just create a tempdir and then 'rm
-rf' it in the desctructor.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:53:56 +02:00
Michal Privoznik
96f286ef1d virt-aa-helper: Use virFileCanonicalizePath()
While use of realpath() is not forbidden, our some of our mocks
already have a test friendly reimplementation of
virFileCanonicalizePath(). Use the latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:53:53 +02:00
Michal Privoznik
68e877c1ad log_cleaner: Use virFileCanonicalizePath()
While use of realpath() is not forbidden, our some of our mocks
already have a test friendly reimplementation of
virFileCanonicalizePath(). Use the latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 13:53:49 +02:00
Michal Privoznik
55668bc3e0 gendispatch: Finish rename of the migration argument
This patch is useless.

Either APIs it don't have 'resource' nor 'bandwidth' argument to
begin with, or they serve as a wrapper over different API
(changed in previous commits). Nonetheless, in the name of
consistency, let's just change those variable names.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
9d69dc2dbc qemu: Finish argument rename
There are still some functions around migration code that use
'resource' instead 'bandwidth'. Rename the variable/argument
inside them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
91e74f1de8 src: Unify argument name of virDomainMigratePerform3()
The virDomainMigratePerform3() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
96a5c4cb85 src: Unify argument name of virDomainMigrateBegin3()
The virDomainMigrateBegin3() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
767b2b72e7 src: Unify argument name of virDomainMigratePrepareTunnel3()
The virDomainMigratePrepareTunnel3() API declares one of its
argument as 'bandwidth', though throughout various typedefs, RPC
and callback implementations the name is changed to 'resource'.
This creates a confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
45d4a7bf57 src: Unify argument name of virDomainMigratePrepare3()
The virDomainMigratePrepare3() API declares one of its argument
as 'bandwidth', though throughout various typedefs, RPC and
callback implementations the name is changed to 'resource'. This
creates a confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
0cf91e4ed3 src: Unify argument name of virDomainMigratePrepareTunnel()
The virDomainMigratePrepareTunnel() API declares one of its
argument as 'bandwidth', though throughout various typedefs, RPC
and callback implementations the name is changed to 'resource'.
This creates a confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
8e5e69e6eb src: Unify argument name of virDomainMigratePrepare2()
The virDomainMigratePrepare2() API declares one of its argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
846e584654 src: Unify argument name of virDomainMigratePerform()
The virDomainMigratePerform() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Michal Privoznik
74976e7e52 src: Unify argument name of virDomainMigratePrepare()
The virDomainMigratePrepare() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-07-02 10:00:13 +02:00
Jiri Denemark
7b54da1d2f Post-release version bump to 11.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-01 11:24:34 +02:00
Jiri Denemark
64ad0c3f57 Release of libvirt-11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-01 11:21:40 +02:00
Américo Monteiro
478290428d Translated using Weblate (Portuguese)
Currently translated at 3.0% (339 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 2.8% (307 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 2.8% (307 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 2.8% (307 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 2.8% (309 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>

Translated using Weblate (Portuguese)

Currently translated at 2.8% (309 of 10937 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2025-07-01 07:48:06 +02:00
Ján Tomko
4a9d6429b2 NEWS: document new AMD IOMMU device
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-30 17:43:25 +02:00
Peter Krempa
0360263f34 NEWS: Mention 'virsh await' and proper emulation of USB cdroms
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-30 16:57:13 +02:00
Jiri Denemark
357cbcb05e NEWS: Mention shared filesystem detection fix
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-30 12:14:59 +02:00
Michal Privoznik
cd867f28cf 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: Jiri Denemark <jdenemar@redhat.com>
2025-06-30 12:05:35 +02:00
김인수
3e2af21dda Translated using Weblate (Korean)
Currently translated at 100.0% (10937 of 10937 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-06-27 12:18:40 +02:00
김인수
8c80b9a8d4 Translated using Weblate (Korean)
Currently translated at 99.9% (10930 of 10937 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.7% (10915 of 10937 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-06-27 11:23:40 +02:00
Yuri Chornoivan
2cd5f00767 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10937 of 10937 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 99.9% (10932 of 10937 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 99.8% (10920 of 10937 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 99.6% (10902 of 10937 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 99.6% (10901 of 10937 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-06-27 11:23:40 +02:00
Nicolás Gal
e30e75e1de Translated using Weblate (Spanish)
Currently translated at 53.6% (5867 of 10937 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-06-27 11:23:39 +02:00
Weblate
de239f15f5 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>
2025-06-24 17:02:51 +02:00
Jiri Denemark
4bcab57d7e po: Refresh potfile for v11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:55:43 +02:00
Peter Krempa
c345ea0e7e qemuxmlconftest: Add 'disk-usb-device-model' case
Add a test case for explicitly selected USB disk models.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:13 +02:00
Akihiko Odaki
1ba6892d75 qemu: Replace usb-storage with usb-bot
usb-storage is a compound device that automatically creates a USB mass
storage device and a SCSI device as its backend. Unfortunately it lacks
some configuration options that are usually present with a SCSI device,
and cannot represent CD-ROM in particular.

Replace usb-storage with usb-bot, which can be combined with a manually
created SCSI device. libvirt will configure the SCSI device in a way
identical with how QEMU does for usb-storage except that now it respects
a configuration option to represent CD-ROM.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/368
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:13 +02:00
Peter Krempa
25c4a3643b qemuxmlconftest: Prepare for proper testing in 'disk-cdrom-usb-empty'
Modify the validation of empty cdroms to trigger only for
VIR_DOMAIN_DISK_MODEL_USB_STORAGE as with 'usb-bot' we can properly
emulate a cdrom.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
3f8f18e389 qemu: monitor: Introduce 'qemuMonitorSetUSBDiskAttached'
The helper sets the 'attached' property of the 'usb-bot' device to true,
which will be used on the hotplug code path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
d325e96546 qemuBuildDeviceAddresDriveProps: Prepare for 'drive' address for usb-bot disks
While the 'usb-storage' based disks use the USB address directly, with
'usb-bot' the USB address is on the "controller" part of the device and
the 'scsi-hd/cd' device will use a 'drive' address from qemu's PoV.

Since we do not want to expose the 'usb-bot' as explicit controller
to preserve compatibility with existing configs we plan to upgrade
implement the formatter for 'drive' address when the "diskbus" property
is VIR_DOMAIN_DISK_BUS_USB.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
f08af07f83 qemu: Fill in model of 'usb' disks to preserve ABI compatibility
While 'usb-bot' and 'usb-storage' are ABI and migration compatible for
disks it's not the case for cdroms. When migrating from a new config
using 'usb-bot' to an older daemon which would use 'usb-storage' the
guest os will get I/O errors.

Thus we must properly fill in models for 'usb' disks so that cdroms can
be handled properly.

When parsing XML fill in the models and drop the appropriate models when
formatting migratable XML.

The logic is explained in comments in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
0d47218419 conf: introduce usb disk models 'usb-storage' and 'usb-bot'
Historically libvirt specified 'usb-storage' as driver for USB disks.
This though combined with '-blockdev' doesn't properly configure the
device to look like CDROM for <disk type='cdrom'>.

'usb-bot' acts like a controler and allows explicitly connecting a
-device to it.

In qemu the devices share implementation so they are effectively
identical and can be used interchangably. There is a difference in how
the storage device itself (the SCSI part) looks when configured properly
as CDROM which is unfortunately not compatible/interchangable.

As this is effectively a bugfix we'll be fixing the behaviour for the
default configuration. The possibility to explicitly set the model is
added as a possibility for working around possible problems if they'd
appear.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
d2dac8f8e2 qemuxmlconftest: Invoke "disk-usb-device" case also without QEMU_CAPS_DEVICE_USB_BOT and with ABI_UPDATE
The QEMU_CAPS_DEVICE_USB_BOT device can be compiled out but
realistically it makes no sense to do it thus also makes no sense to
have another variant of input data for it.

Add another invocation of "disk-usb-device" clearing QEMU_CAPS_DEVICE_USB_BOT
to show the fallback code paths.

Also add "ABI_UPDATE" version for the two cases above as the ABI of
usb-bot cdrom is not migration-compatible and we'll be wanting to update
to the fixed configuration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Akihiko Odaki
81d0501eb2 qemu_capabilities: Introduce QEMU_CAPS_DEVICE_USB_BOT
usb-bot is supported by all supported QEMU versions; it is present since
1.4.0 and libvirt supports 4.2.0 or later.

Add a capability just in case USB_STORAGE_BOT is disabled when building
QEMU.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
9358c3d747 qemuxmlconftest: Distribute testing of 'removable' disk property
The 'removable' property is tested for 'usb' and 'scsi' disks. The test
case for 'usb' disks already has another test case for this, so add
testing of 'removable' SCSI disks into the 'disk-scsi' case and remove
the 'disk-device-removable' case completely.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
4ca64e4e19 qemuxmlconftest: Drop 'disk-cdrom-bus-other'
The test case is now redundant since 'disk-usb-device' case also tests
all cdrom configurations. Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
7747c1eeb7 qemusecuritytest: Use 'disk-usb-device' case instead of 'disk-cdrom-bus-other'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
83f6a02842 qemuxmlconftest: Test various combinations of config
Add multiple USB disks to the definition testing a matrix of 'disk' and
'cdrom' <disk> elements with user-aliases, 'serial' and 'removable'
properties configured.

This patch also removes the 'ide' disk which is not related to what
we're testing here.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Peter Krempa
3be1f7933f qemuhotplugtest: Use VIR_DOMAIN_DEF_PARSE_ABI_UPDATE for virDomainDeviceDefParse
The qemu hotplug code parses the device with ABI updates enabled so
qemuhotplugtest ought to do the same.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:29:12 +02:00
Nicolás Gal
8a64db5e38 Translated using Weblate (Spanish)
Currently translated at 53.6% (5862 of 10925 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-06-24 13:26:42 +02:00
Daniel P. Berrangé
bc8fbe2683 util: workaround libxml2 lack of thread safe initialization
The main XML parser code global initializer historically had a mutex
protecting it, and more recently uses a pthread_once. The RelaxNG
code, however, relies on two other global initializers that are
not thread safe, just relying on setting an integer "initialized"
flag.

Calling the relevant initializers from libvirt in a protected global
initializer will protect libvirt's own concurrent usage, however, it
cannot protect against other libraries loaded in process that might
be using libxml2's schema code. Fortunately:

 * The chances of other loaded non-libvirt code using libxml is
   relatively low
 * The chances of other loaded non-libvirt code using the schema
   validation / catalog functionality inside libxml is even
   lower
 * The chances of both libvirt and the non-libvirt usage having
   their *1st* usage of libxml2 be concurrent is tiny

IOW, in practice, although our solution doesn't fully fix the thread
safety, it is good enough.

libxml2 should none the less still be fixed to make its global
initializers be thread safe without special actions by its API
consumers[1].

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/788
[1] https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/326
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-24 12:25:10 +01:00
Ján Tomko
856f667c8a conf: add passthrough and xtsup attributes for IOMMU
For the newly supported AMD device.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-24 12:14:04 +02:00
Ján Tomko
1476060091 qemu: add IOMMU model amd
Introduce a new IOMMU device model 'amd', both the parser
and the formatter for QEMU because of our enum warnings.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-24 12:14:04 +02:00
Ján Tomko
6291b0af3d docs: formatdomain: document intel-only IOMMU attributes
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-24 12:14:04 +02:00
Ján Tomko
33a5d9dcea qemu: introduce QEMU_CAPS_PCI_ID
Introduced by QEMU commit f864a3235ea1d1d714b3cde2d9a810ea6344a7b5
the presence of this attribute allows libvirt to specify the alias
of the AMDVI-PCI device explicitly.

(It was implicit before the introduction of this attribute)

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-24 12:14:04 +02:00
Ján Tomko
14192af47a qemu: introduce QEMU_CAPS_AMD_IOMMU
Check for the presence of the amd-iommu device, so we can conditionalize
probing for its properties.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-24 12:14:04 +02:00
Roman Bogorodskiy
1ee74707bd NEWS: mention console type in domain capabilities
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-22 08:28:55 +02:00
Peter Krempa
35e3c17e02 virSocketAddrPrefixToNetmask: Prevent undefined behaviour on bitshifts on signed integer
Shifting bits into the sign bit is undefined behaviour in C although
both gcc and clang handle it as expected.

Since the value is used as unsigned convert it to unsigned int. For code
readability use 'if' statement instead of a ternary.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/785
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-18 12:14:32 +02:00
Peter Krempa
11867b0224 tlscert: Don't force 'keyEncipherment' for ECDSA and ECDH
Per RFC8813 [1] which amends RFC5580 [2] ECDSA, ECDH, and ECMQV
algorithms must not have 'keyEncipherment' present, but our code did
check it. Add exemption for known algorithms which don't use it.

[1] https://datatracker.ietf.org/doc/rfc8813/
[2] https://datatracker.ietf.org/doc/rfc5480

Closes: https://gitlab.com/libvirt/libvirt/-/issues/691
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:32 +02:00
Peter Krempa
da1ee7799a storage: disk: Properly handle partition numbers separated by 'p'
The 'p' separator for partitions is now common also for NVMe devices.
Fix the algorithm to extract the partition number to always consider it.

The fix is based on suggestion in the issue mentioned below.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/239
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:32 +02:00
Peter Krempa
550c32b172 storage: parthelper: Use if/else instead of ternary operator
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:32 +02:00
Peter Krempa
1f07ca49e4 virshPrintJobProgress: Don't rewrite migration status line on non-terminals
On non-terminals print each progress report on a new line. Fix based on
suggestion in the issue report.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/756
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:31 +02:00
Peter Krempa
d5a8cb26fa virQEMUCapsFindBinary: Refactor local variables
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:31 +02:00
Peter Krempa
c0e7b9923c storage_file_probe: Use named initializer for 'struct FileTypeInfo'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 12:14:31 +02:00
Michal Privoznik
be04898d18 security_manager: Don't leak seclabel in virSecurityManagerGenLabel()
When a domain is being started, seclabels are generated for it.
This is handled in virSecurityManagerGenLabel() which can either
find pre-existing seclabel in domain def or generate a new one.
At any rate, domainGenSecurityLabel() callback is called and if
it fails then the seclabel is removed from domain definition
using VIR_DELETE_ELEMENT(). While this shrinks down the seclabels
array, it does not free individual item. It has to be freed
manually.

80 bytes in 2 blocks are definitely lost in loss record 1,359 of 1,876
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F19B29: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8200.5)
   by 0x49E4953: virSecurityLabelDefNew (virseclabel.c:59)
   by 0x4BDE0A4: virSecurityManagerGenLabel (security_manager.c:638)
   by 0xBA029B7: qemuProcessPrepareDomain (qemu_process.c:6760)
   by 0xBA07DF2: qemuProcessStart (qemu_process.c:8369)
   by 0xB93DAC0: qemuDomainObjStart (qemu_driver.c:6371)
   by 0xB93DE08: qemuDomainCreateWithFlags (qemu_driver.c:6420)
   by 0xB93DE86: qemuDomainCreate (qemu_driver.c:6438)
   by 0x4CECEA8: virDomainCreate (libvirt-domain.c:7142)

Now, you might think this may lead to a double free, because
@seclabel is freed under the 'cleanup' label (if @generated is
true). But if @generated is true, then just before calling the
callback there's VIR_APPEND_ELEMENT() which clears @seclabel out
turning the free under 'cleanup' label into a NOP.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-18 11:37:58 +02:00
Salvatore Cocuzza
68df8388fc Translated using Weblate (Italian)
Currently translated at 22.4% (2448 of 10925 strings)

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

Signed-off-by: Salvatore Cocuzza <info@salvatorecocuzza.it>
2025-06-18 10:47:13 +02:00
Jim Spentzos
f2aed8027f Translated using Weblate (Greek)
Currently translated at 1.2% (138 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>

Translated using Weblate (Greek)

Currently translated at 1.2% (137 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>

Translated using Weblate (Greek)

Currently translated at 1.2% (136 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
2025-06-18 10:47:13 +02:00
Edmon Begoli
e7986a3cb6 Translated using Weblate (Croatian)
Currently translated at 0.1% (3 of 10925 strings)

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

Signed-off-by: Edmon Begoli <ebegoli@gmail.com>
2025-06-18 10:47:13 +02:00
김인수
31055f2d1f Translated using Weblate (Korean)
Currently translated at 100.0% (10925 of 10925 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.9% (10922 of 10925 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-06-18 10:47:13 +02:00
Andrea Morelli
737031cb6c Translated using Weblate (Italian)
Currently translated at 22.3% (2440 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>

Translated using Weblate (Italian)

Currently translated at 22.2% (2436 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>

Translated using Weblate (Italian)

Currently translated at 22.0% (2413 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>

Translated using Weblate (Italian)

Currently translated at 21.9% (2398 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>

Translated using Weblate (Italian)

Currently translated at 21.5% (2350 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
2025-06-18 10:47:13 +02:00
Michal Privoznik
441c23a7e6 qemu: Be more forgiving when acquiring QUERY job when formatting domain XML
In my previous commit of v11.0.0-rc1~115 I've made QEMU driver
implementation for virDomainGetXMLDesc() (qemuDomainGetXMLDesc())
acquire QERY job. See its commit message for more info. But this
unfortunately broke apps witch fetch domain XML for incoming
migration (like virt-manager). The reason is that for incoming
migration the VIR_ASYNC_JOB_MIGRATION_IN async job is set, but
the mask of allowed synchronous jobs is empty (because QEMU can't
talk on monitor really). This makes virDomainObjBeginJob() fail
which in turn makes qemuDomainGetXMLDesc() fail too.

It makes sense for qemuDomainGetXMLDesc() to acquire the job
(e.g. so that it's coherent with another thread that might be in
the middle of a MODIFY job). But failure to dump XML may be
treated as broken daemon (e.g. virt-manager does so).

Therefore, still try to acquire the QUERY job (if job mask
permits it) but, do not treat failure as an error.

Fixes: 6cc93bf288
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2369243
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-18 10:41:33 +02:00
Martin Kletzander
10bb3dd651 NEWS: Mention cacert parameter in esx driver
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 11:01:40 +02:00
Martin Kletzander
6c9a0beeca esx: Allow specifying different CA bundle for remote connections
Add new URI parameter which allows for using non-system CA certificates
to verify remote peers.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 11:01:40 +02:00
Peter Krempa
6a8fb1851d virsh: await: Introduce 'guest-agent-available' condition
The new condition allows waiting for the guest agent to show up, which
usually means that the guest has booted enough to respond to external
stimuli.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
05c9f3752d virsh: Introduce 'await' command for waiting until target domain state is reached
The new command is meant as syntax sugar for event handling which blocks
virsh until the requested state condition is reached.

The initial implementation adds a condition 'domain-inactive' returning
if the domain is/becomes inactive for whatever reason.

This command is useful for simple scripts e.g. for debugging libvirt
when it allows responding to target state in shell without the need to
fuss too much with polling or writing handlers around 'virsh event'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
71e276ed1d vsh: Add support for commands with more return values
Add a new handler callback for command handlers which will want to
return more than just EXIT_SUCCESS/EXIT_FAILURE.

The new handler allows returning integers. Any negative values are
converted to EXIT_FAILURE, other values are returned as reported in
cases where we forward the command state (non-interactive usage) as
return value of the virt shell program.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
10c646993d vshCommandRun: Convert to directly return the exit code
Currently the handler functions in the virt shells return only a boolean
signalling if the command was successful or not. In preparation for a
command which will want to return another value (timeout) convert
vshCommand run to actually return the requested exit code instead and
document the conversion from boolean.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
c60b7cbe28 virsh: cmdEvent: Ensure that event callbacks are unregistered before returning
Successful return from 'virConnectDomainEventDeregisterAny' does not
guarantee that there aren't still in-progress events being handled by
the callbacks. Since 'cmdEvent' passes in a slice from an array as the
private data of the callbacks, we must ensure that the array stays in
scope (it's auto-freed) for the whole time there are possible callbacks
being executed.

While in practice this doesn't happen as the callbacks are usually quick
enough to finish while unregistering stuff, placing a 'sleep(1)' into
e.g. 'virshEventLifecyclePrint' and starting a domain results in crash
of virsh with the following backtrace:

 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x00005557b5cfd343 in virshEventPrintf (data=data@entry=0x5557db9619b0, fmt=fmt@entry=0x5557b5d5e527 "%s") at ../../../libvirt/tools/virsh-domain-event.c:252

 Thread 2 (Thread 0x7f59a54b7d00 (LWP 2097121)):
 #0  0x00007f59a6cadbf9 in __futex_abstimed_wait_common () at /lib64/libc.so.6
 #1  0x00007f59a6cb2cf3 in __pthread_clockjoin_ex () at /lib64/libc.so.6
 #2  0x00005557b5cd57f6 in virshDeinit (ctl=0x7ffc7b615140) at ../../../libvirt/tools/virsh.c:408
 #3  0x00005557b5cd5391 in main (argc=<optimized out>, argv=<optimized out>) at ../../../libvirt/tools/virsh.c:932

 Thread 1 (Thread 0x7f59a51a66c0 (LWP 2097122)):
 #0  0x00005557b5cfd343 in virshEventPrintf (data=data@entry=0x5557db9619b0, fmt=fmt@entry=0x5557b5d5e527 "%s") at ../../../libvirt/tools/virsh-domain-event.c:252
 #1  0x00005557b5cffa10 in virshEventPrint (data=0x5557db9619b0, buf=0x7f59a51a55c0) at ../../../libvirt/tools/virsh-domain-event.c:290
 #2  virshEventLifecyclePrint (conn=<optimized out>, dom=<optimized out>, event=<optimized out>, detail=<optimized out>, opaque=0x5557db9619b0) at ../../../libvirt/
 [snipped]

From the backtrace you can see that the 'main()' thread is already
shutting down virsh, which means that 'cmdEvent' terminated and the
private data was freed. The event loop thread is still execing the
callback which accesses the data.

To fix this add a condition and wait on all of the callbacks to be
unregistered first (their private data freeing function will be called).

This bug was observed when I've copied the event code for a new virsh
command which had a bit more involved callbacks.

Fixes: 99fa96c390
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
258f61b479 virthread: Add infrastructure for static virCond definitions
Add the automatic cleanup handler as well as static initializer to allow
simple stack allocated conditions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
6e44bb74f7 virthread: Register auto cleanup function for virMutex
This makes it very convenient to declare a mutex on stack along with the
VIR_MUTEX_INITIALIZE macro without the need to have complex cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-12 10:17:03 +02:00
Peter Krempa
cf24dc8baa docs: Note that zero detection on migration sparsifies image only when discard='unmap' is set
The mirroring job clears the destination to ensure that the guest
visible disk contents are identical to the state on the source. The
image itself is kept sparse only when the disk 'discard' option is set
to 'unmap' (Also the disks would eventually desparsify itself anyways
with disabled discards). Note it in the docs for the user.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
2025-06-12 10:16:06 +02:00
Peter Krempa
6733f02c40 Revert "docs: Add warning about using a cleared image with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES_ZEROES"
QEMU clears the images even when sparse mode is required so asking the
users to do so is not needed. Remove the docs.

This reverts commit 332ee4931a

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
2025-06-12 10:16:06 +02:00
Peter Krempa
7be1c5e2fe qemu.conf: Improve docs for 'dynamic_ownership' option
Add a note that the user/group can be overriden or relabelling disabled
using per-vm/disk <seclabel> elements instead of disabling it globally.

Add a note that read-only image labels are not restored.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/512
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-12 10:13:58 +02:00
Krisstoffe
fd21c3ecb4 storage: Implement a simple 'checkPool' method for 'rbd' type pools
Same approach is used by the gluster pool driver.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/448

Signed-off-by: Krisstoffe <krisstoffe@free.fr>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-12 10:12:15 +02:00
Daniel P. Berrangé
07a8be20c1 docs: outline bug expectations wrt automated tools / AI agents
Bug reports from automated tools and AI agents are time consuming to
triage and have poor signal/noise ratio. Set strong expectations for
any reporters using such tools, in a (likely doomed) attempt to stem
the flow of poor quality reports.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-10 14:52:12 +01:00
Daniel P. Berrangé
226e8ef548 docs: fix list term highlighting in URI docs
Having a blank line between the term and its definition prevents the RST
to HTML convertor highlighting 'pkipath' correctly.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-10 14:51:08 +01:00
Andrea Bolognani
71b4b2beb4 ci: Drop unnecessary build dependencies
We no longer check for the presence of the commands included
in these packages at build time.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-09 16:11:35 +02:00
Andrea Bolognani
e362185e43 rpm: Drop unnecessary BuildRequires
We've recently stopped checking for the presence of various
commands at build time, which means that we no longer need
to have the corresponding packages installed in the build
environment.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-09 16:11:33 +02:00
Andrea Bolognani
9d210f4bca rpm: Fix/clarify Requires
daemon-common should have always depended on kmod, since
there are various situations in which a module (un)load might
be triggered by a driver.

For the util-linux dependency, we're simply adjusting the
comment to match reality.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-09 16:11:28 +02:00
Martin Kletzander
6ca627d38b nvme: Fix more missing enum switches for VIR_DOMAIN_DISK_BUS_NVME
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2025-06-09 15:58:08 +02:00
Martin Kletzander
8e8831c3ae bhyve: Fix build after introduction of emulated NVMe disks
Somehow I missed one switch over disk bus enum.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2025-06-09 15:41:06 +02:00
Martin Kletzander
fca053ae37 NEWS: qemu support for emulated NVMe disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:43 +02:00
Martin Kletzander
17cb1a0c42 NEWS: vmx support for NVMe disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:43 +02:00
Martin Kletzander
dbcf514230 qemu: Add support for emulated NVMe disks
Without any hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:42 +02:00
Martin Kletzander
1402c40714 qemu: Add support for NVMe controllers
Without any hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:42 +02:00
Martin Kletzander
f806f63341 qemu_capabilities: Add emulated NVMe disk support to domain capabilities
This is a separate commit for review ease, but who's really going to use
a libvirt with this patch in and the actual functionality missing, that
ain't gonna happen, right?

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:41 +02:00
Martin Kletzander
d5a87fd7f6 qemu_capabilities: Add NVMe controller and disk capabilities
The "nvme" device is the controller and "nvme-ns" are the
namespaces (individual disks) plugged into it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:41 +02:00
Martin Kletzander
b295863d70 vmx: Add support for NVMe disks
Resolves: https://issues.redhat.com/browse/RHEL-7390
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:40 +02:00
Martin Kletzander
d80386745a docs, conf, schemas: Add support for NVMe disks
NVMe disks are essentially a namespace of an NVMe controller, but to
make it easier for the users to just add a disk, the necessary details
like adding the proper controller, setting the serial number for the
controller based on the disk, are done automatically.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:39 +02:00
Martin Kletzander
683e1a3cf8 conf: Add virDomainDeviceFindNvmeController
Same as for the SCSI controller, but this time for NVMe, will be used
later to do some post parse modifications.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:39 +02:00
Martin Kletzander
ebf6347879 util: Add support for parsing nvmeXnY(pZ) strings
We do not guarantee that the disk names will be the same in guest as
they are in the XML, but that should not stop us from trying to be
consistent with the naming.  And since we use the same naming as the
linux kernel does, let's stick with it with nvme drives too.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:38 +02:00
Martin Kletzander
be1a89c950 docs, conf, schemas: Add support for NVMe controller
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-09 15:12:38 +02:00
Boris Fiuczynski
6ef5644bfd nodedev: add nodedev name to mdevctl unsupport msg
Let's add the nodedev name to improve the error message for the user.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-09 12:56:00 +02:00
Michal Privoznik
657d677a2f ci: refresh with 'lcitool manifest'
- Replace Alpine 3.21 with 3.22

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-06-09 12:14:49 +02:00
Peter Krempa
c7078a136c virDomainDriverAutoShutdown: Fix printf conversion specifier for 'waitShutdownSecs'
The variable is declared as unsigned int but two places used '%d'.

Reported-in: https://issues.redhat.com/browse/RHEL-95721
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-06-09 08:19:04 +02:00
anonymix007
e7239c619f qemu: capabilities: Check if cpuModels is not NULL before trying to dereference it
accel->cpuModels field might be NULL if QEMU does not return CPU models.
The following backtrace is observed in such cases:
0  virQEMUCapsProbeQMPCPUDefinitions (qemuCaps=qemuCaps@entry=0x7f1890003ae0, accel=accel@entry=0x7f1890003c10, mon=mon@entry=0x7f1890005270)
   at ../src/qemu/qemu_capabilities.c:3091
1  0x00007f18b42fa7b1 in virQEMUCapsInitQMPMonitor (qemuCaps=qemuCaps@entry=0x7f1890003ae0, mon=0x7f1890005270) at ../src/qemu/qemu_capabilities.c:5746
2  0x00007f18b42fafaf in virQEMUCapsInitQMPSingle (qemuCaps=qemuCaps@entry=0x7f1890003ae0, libDir=libDir@entry=0x7f186c1e70f0 "/var/lib/libvirt/qemu",
   runUid=runUid@entry=955, runGid=runGid@entry=955, onlyTCG=onlyTCG@entry=false) at ../src/qemu/qemu_capabilities.c:5832
3  0x00007f18b42fb1a5 in virQEMUCapsInitQMP (qemuCaps=0x7f1890003ae0, libDir=0x7f186c1e70f0 "/var/lib/libvirt/qemu", runUid=955, runGid=955)
   at ../src/qemu/qemu_capabilities.c:5848
4  virQEMUCapsNewForBinaryInternal (hostArch=VIR_ARCH_X86_64, binary=binary@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha",
   libDir=0x7f186c1e70f0 "/var/lib/libvirt/qemu", runUid=955, runGid=955,
   hostCPUSignature=0x7f186c1e9f20 "AuthenticAMD, AMD Ryzen 9 7950X 16-Core Processor, family: 25, model: 97, stepping: 2", microcodeVersion=174068233,
   kernelVersion=0x7f186c194200 "6.14.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:15 +0000", cpuData=0x7f186c1ea490)
   at ../src/qemu/qemu_capabilities.c:5907
5  0x00007f18b42fb4c9 in virQEMUCapsNewData (binary=0x7f1868002fc0 "/usr/bin/qemu-system-alpha", privData=0x7f186c194280)
   at ../src/qemu/qemu_capabilities.c:5942
6  0x00007f18bd42d302 in virFileCacheNewData (cache=0x7f186c193730, name=0x7f1868002fc0 "/usr/bin/qemu-system-alpha") at ../src/util/virfilecache.c:206
7  virFileCacheValidate (cache=cache@entry=0x7f186c193730, name=name@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha", data=data@entry=0x7f18b67c37c0)
   at ../src/util/virfilecache.c:269
8  0x00007f18bd42d5b8 in virFileCacheLookup (cache=cache@entry=0x7f186c193730, name=name@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha")
   at ../src/util/virfilecache.c:301
9  0x00007f18b42fb679 in virQEMUCapsCacheLookup (cache=cache@entry=0x7f186c193730, binary=binary@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha")
   at ../src/qemu/qemu_capabilities.c:6036
10 0x00007f18b42fb785 in virQEMUCapsInitGuest (caps=<optimized out>, cache=<optimized out>, hostarch=VIR_ARCH_X86_64, guestarch=VIR_ARCH_ALPHA)
   at ../src/qemu/qemu_capabilities.c:1037
11 virQEMUCapsInit (cache=0x7f186c193730) at ../src/qemu/qemu_capabilities.c:1229
12 0x00007f18b431d311 in virQEMUDriverCreateCapabilities (driver=driver@entry=0x7f186c01f410) at ../src/qemu/qemu_conf.c:1553
13 0x00007f18b431d663 in virQEMUDriverGetCapabilities (driver=0x7f186c01f410, refresh=<optimized out>) at ../src/qemu/qemu_conf.c:1623
14 0x00007f18b435e3e4 in qemuConnectGetVersion (conn=<optimized out>, version=0x7f18b67c39b0) at ../src/qemu/qemu_driver.c:1492
15 0x00007f18bd69c5e8 in virConnectGetVersion (conn=0x55bc5f4cda20, hvVer=hvVer@entry=0x7f18b67c39b0) at ../src/libvirt-host.c:201
16 0x000055bc34ef3627 in remoteDispatchConnectGetVersion (server=0x55bc5f4b93f0, msg=0x55bc5f4cdf60, client=0x55bc5f4c66d0, rerr=0x7f18b67c3a80,
   ret=0x55bc5f4b8670) at src/remote/remote_daemon_dispatch_stubs.h:1265
17 remoteDispatchConnectGetVersionHelper (server=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60, rerr=0x7f18b67c3a80, args=0x0, ret=0x55bc5f4b8670)
   at src/remote/remote_daemon_dispatch_stubs.h:1247
18 0x00007f18bd5506da in virNetServerProgramDispatchCall (prog=0x55bc5f4cae90, server=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60)
   at ../src/rpc/virnetserverprogram.c:423
19 virNetServerProgramDispatch (prog=0x55bc5f4cae90, server=server@entry=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60)
   at ../src/rpc/virnetserverprogram.c:299
20 0x00007f18bd556c32 in virNetServerProcessMsg (srv=srv@entry=0x55bc5f4b93f0, client=<optimized out>, prog=<optimized out>, msg=<optimized out>)
   at ../src/rpc/virnetserver.c:135
21 0x00007f18bd556f77 in virNetServerHandleJob (jobOpaque=0x55bc5f4d2bb0, opaque=0x55bc5f4b93f0) at ../src/rpc/virnetserver.c:155
22 0x00007f18bd47dd19 in virThreadPoolWorker (opaque=<optimized out>) at ../src/util/virthreadpool.c:164
23 0x00007f18bd47d253 in virThreadHelper (data=0x55bc5f4b7810) at ../src/util/virthread.c:256
24 0x00007f18bce117eb in start_thread (arg=<optimized out>) at pthread_create.c:448
25 0x00007f18bce9518c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Signed-off-by: anonymix007 <anonymix007@users.noreply.github.com>
2025-06-05 16:39:46 +00:00
Andrea Bolognani
312e4801ed docs: Drop mention of read-only git mirrors
These mirrors no longer exist, they're just straight up
redirects to GitLab now.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-05 17:29:26 +02:00
Andrea Bolognani
062a0f8891 docs: Unify clone instructions
We use the same format for GitLab and libvirt.org, but not
for GitHub.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-06-05 17:29:23 +02:00
Michal Privoznik
3588bad8c0 libxl_capabilities: Make some functions return void
Inside of libxlMakeDomainCapabilities() there are some functions
called and basically all of them never return anything but zero
(indicating success). Yet, they are called in a fashion that
suggests otherwise. Turn those functions into void and drop
checks for their retvals.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-05 14:08:55 +02:00
Roman Bogorodskiy
6c15c1e6b2 libxl: capabilities: report supported console types
Extend domain capabilities with information about the supported console
device types.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-04 20:29:01 +02:00
Roman Bogorodskiy
4bbc0f2eae qemu: capabilities: report supported console types
Extend domain capabilities with information about the supported console
device types.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-04 19:41:06 +02:00
Roman Bogorodskiy
30edbd29ce bhyve: capabilities: report NMDM console
Extend domain capabilities to report the NMDM console support.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-04 19:41:06 +02:00
Roman Bogorodskiy
280c5c31de domain_capabilities: add console capabilities
Currently, domain capabilities do not include information about the
supported console device types. While most of the drivers support
'pty' console type, it's not the case for bhyve. Without this
information, management software cannot always generate compatible
domain configuration.

To address that, extend domain capabilities like that:

   <devices>
    ...
    <console supported='yes'>
      <enum name='type'>
        <value>pty</value>
        <value>type2</value>
        ...
      </enum>
    </console>
    ...
   </devices>

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-06-04 19:41:06 +02:00
Kirill Shchetiniuk
fcea42b554 conf: desktop graphics remove unused option
Previously, the 'desktop' graphics configuration contained the
'fullscreen' option which was never used, removed the unused option.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-04 16:59:07 +02:00
Kirill Shchetiniuk
b5d08b69c4 conf: RDP graphics parse refactor
Previously, the RDP graphics definition parsing were implemented by
string parsing, the virDomainGraphicsDefParseXMLRDP function is
refactored to use the appropriate virXMLProp* utility functions.
Overall parsing logic was not changed and results the same output as
before.

Moreover, 'replaceUser' and 'mutliUser' params type was changed from
bool to tristate type, to avoid unnecessary type convertions.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-04 16:59:07 +02:00
Kirill Shchetiniuk
af7b863726 conf: SDL fullscreen option refactor
Previously, the fullscreen option were parsed as a tristate but stored
as a bool type, changed the fullscreen option type to tristate bool to
avoid unnecessary type convertions.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-04 16:59:07 +02:00
Kirill Shchetiniuk
7357cb8857 conf: VNC graphics parse refactor
Previously, the VNC graphics definition parsing were implemented by
string parsing, the virDomainGraphicsDefParseXMLVNC was refactored
to use the appropriate virXMLProp* utility functions. Overall
parsing logic was not changed and results the same output as before.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-04 16:59:06 +02:00
Michal Privoznik
496afd354f NEWS: Document removal of support of VIR_DUMP_LIVE flag from QEMU driver
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-03 16:51:32 +02:00
Michal Privoznik
65bc6b0d4e qemu: Don't accept VIR_DUMP_LIVE flag in qemuDomainCoreDumpWithFormat()
QEMU can't really do live dumps of guest memory. It's because
inside of dump_init() the vm_stop() is called basically
unconditionally (the only condition is whether vCPUs are
running). Hence, there is no way for us to do live dumps and thus
honor VIR_DUMP_LIVE flag. Instead of silently pretending the flag
works, reject it with appropriate error message.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/646
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-03 16:51:32 +02:00
Peter Krempa
c61d6d0606 qemu: command: Don't attempt to set backend MTU for networks which don't use host backend directly
Attempting to set MTU for network types which don't actually use the
network device on the host results in a failure. The 'mtu' property is
also used e.g. for the 'host_mtu' property of e.g. 'virtio-net-pci'
which is applied even in vhost-user mode.

Use the existing switch which selects devices without a network device
backend on the host side and skip setting the MTU.

Tested by running 'passt' in vhost-user mode manually:

 passt -f --vhost-user -s /tmp/vh.sock

and the following XML:

 <interface type="vhostuser">
   <mac address="52:54:00:3d:91:97"/>
   <source type="unix" path="/tmp/vh.sock" mode="client"/>
   <model type="virtio"/>
   <mtu size="9999"/>
   <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
 </interface>

The OS in the guest reports MTU 9999.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/717
Closes: https://gitlab.com/libvirt/libvirt/-/issues/192
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:12:31 +02:00
Peter Krempa
edd5465c59 esx: Avoid corner case where esxUtil_ParseDatastorePath could be called with NULL 'datastorePath'
The generated code which parses the data from XML in
esxVI_LookupDatastoreContentByDatastoreName can fill the 'folderPath'
property with NULL if it were missing from the input XML. While this is
not likely when talking to esx it is a possible outcome. Skipp NULL
results.

All other code paths already ensure that the function is not called with
NULL.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/776
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
947062e1ce docs: Change units to 'kiB' from 'kB'/'kilobytes'/'kb'
Use the short unit for kibibytes instead of the confusing or plainly
wrong units.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/594
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
2ecf6fe7bf virConnectAuthCallbackDefault: Return failure if 'virGetPassword' returns NULL
virGetPassword can return NULL on linux or BSD if it fails. The caller
in virConnectAuthCallbackDefault does dereference it unconditionally.

Return failure if virGetPassword returns NULL.

Fixes: db72866310
Closes: https://gitlab.com/libvirt/libvirt/-/issues/777
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
ef4c0050b2 storage_file_probe: Remove unused image probing callbacks
Remove the old now-unused infrastructure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
a9008a6ea8 storage_file_probe: Move setting of 'compat' attribute to qcow2GetFeatures
Since the 'compat' field is set based on qcow2 features it belongs to
the qcow2 code rather than to the main metadata probing function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
982ce5083c storage_file_probe: Parse all qcow2 extensions at once
Refactor qcow2GetExtensions to parse everything at once and directly
assign it into fields in the parsed virStorageSource.

This removes the need for qcow2GetDataFile as it will be parsed
directly.

The patch also simplifies the juggling of variables which was needed to
parse the backing file format, when it was passed via pointer in
argument.

qcow2GetExtensions is now invoked on qcow2 images so we can remove the
version check for qcow(v1) images.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
6d49f0521c storage_file_probe: Call qcow2GetFeatures from qcow2GetImageSpecific
Parse qcow2 feature flags from qcow2GetImageSpecific. To achieve that
qcow2GetFeatures is refactored to take virStorageSource directly and
fill the data. To avoid the need to pass 'format' the parsing of the
qcow2 version is changed to access the offset directly (same as in
qcow2GetExtensions)

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
cac833fccc storage_file_probe: Move qcow2GetFeatures(ProcessGroup) functions
Move the two functions to where they will be used. Subsequent patches
will refactor the control flow so that they will no longer be declared
ahead of time. Moving them in a separate patch will make the changes in
the refactor more clear to see.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
e3778b99ee storage_file_probe: Move logic from qcow2GetClusterSize to qcow2GetImageSpecific
Move the cluster size parser into the image specific code for qcow2,
which will later allow us to remove the callback for cluster size which
is not used by any other format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
7758ddc107 storage_file_probe: Refactor qcowXGetBackingStore into specific callbacks for qcow and qcow2
Change qcowXGetBackingStore to use the new function prototype which
fills virStorageSource directly. Convert the copying of the backing file
string from 'g_new0' + 'memcpy' to 'g_strndup' as we treat it as a
string.

Introduce qcowGetImageSpecific (as a wrapper for qcowXGetBackingStore)
and qcow2GetImageSpecific. The latter of the two will be used to collect
all the qcow2-specific code later on, but for now it just parses the
backing store and the format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
7ae9141a12 storage_file_probe: Refactor vmdk4GetBackingStore into vmdk4GetImageSpecific
Change to the new function prototype and adjust the code to fill the
fields in virStorageSource directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
a685b03262 storage_file_probe: Refactor qedGetBackingStore into qedGetImageSpecific
Change to the new function prototype and adjust the code to fill the
fields in virStorageSource directly.

The code also converts the copying of the backing file string from
'g_new0' + 'memcpy' to 'g_strndup' as we treat it as a string later on.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
a5fdebe901 storage_file_probe: Refactor cowGetBackingStore into cowGetImageSpecific
Rename the function, adjust parameters and fix the code to fill the
virStorageSource fields directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
7f1bbcab42 storage_file_probe: Add image specific callback taking the whole virStorageSource
The callbacks getting just some fields are not flexible and in some
cases cause the metadata to be probed multiple times.

Add a callback that will pass the whole virStorageSource struct being
probed so that the code can be written more efficiently.

As a first step we add just the callback. The specific format helpers
will be refactored and subsequently all the other callbacks will be
removed.

To simplify the refactors that will convert all the code to the new
callbacks the new callback is placed first but the calls to cleanup
previous metadata are moved before it. They'll be removed once the
refactors are complete together with the other callbacks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
4b1e566144 virstoragetest: Add qcow2 bitmaps to some images
Add change block tracking bitmaps to some of the qcow2 images, to ensure
that they work with our qcow2 header parser even when we don't parse
them ourselves.

The existing images were modified by running:

 $ qemu-img bitmap --add qcow2_qcow2-qcow2_qcow2-auto.qcow2 testbitmap
 $ qemu-img bitmap --add qcow2datafile-datafile.qcow2 testbitmap
 $ qemu-img bitmap --add datafile.qcow2 testbitmap

in tests/virstoragetestdata/images/.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
8e0a364632 storage_file_probe: qcow2GetExtensions: Fix qcow2 header extension parsing
There are 3 bugs in the qcow2 header extension parser:

1) Header extension padding not taken into account

  Per qcow2 documentation (qemu.git/docs/interop/qcow2.txt, also now
  mirrored in the comment explaining the parser) each header extension
  entry is padded to a multiple of 8 bytes.

  Our parser didn't take the padding into account and advanced the
  current offset only by the 'length', which corresponds to the length
  of the data.

  This meant that in vast majority of cases only the first extension
  would be parsed correctly. For any other one we'd try to fetch the
  magic and length from wrong place.

  Luckily this wasn't a problem for most of the almost 15 years this bug
  existed as we only cared about the backing file format string header
  which was always stored first by qemu.

  It is now a problem in the very specific case when a qcow2 image has a
  'data-file' and also a backing store with format. In such case we'd
  parse the backing store format properly as it's the first header and
  'data-file' being the second would be skipped.

  The buffer bounds checks were correct so we didn't violate any memory
  boundaries.

2) Integer underflow in calculation of end of header extension block

  If the image doesn't have a backing image, the 'backing_file_offset'
  qcow2 header field is 0. We use that value as 'extensions_end' which
  is used in the while loop to parse the extension entries.

  The check was done as "offset < (extensions_end - 8)", thus it
  unreflows when there's no filename.

  The design of the loop prevented anything bad from happening though.

3) Off-by-one when determining end of header extension block

  The aforementioned end of extension check above also has an off-by-one
  error as it allowed another loop if more than 8 bytes were available.

  Now the termination entry has data length of 0 bytes so we'd not be
  able to properly process that one.

  This wasn't a problem either as for now there's just the terminator
  having 0 byte length.

This patch improves documentation by quoting the qcow2 interoperability
document and adjusts the loop condition and length handling to comply
with the specs.

Interestingly we also had a test case for this specific scenario but the
expected test output was wrong.

Fixes: a93402d48b
Resolves: https://issues.redhat.com/browse/RHEL-93775
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:03 +02:00
Peter Krempa
ed030f628c virstoragetest: Reformat output to highlight dataFile relationship
Move the 'dataFileRaw' field to the main block as it's based on the data
in the qcow2 header same as 'backingStoreRaw'.

Indent and annotate the corresponding dataFile block to show where it
belongs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
c97e2a98cd qcow2GetExtensions: Add debug logs for interesting fields in qcow2 header extension parser
Add debug statements which were useful in figuring out bugs in the qcow2
extension parser.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
9b41febf78 qemuProcessStartValidateGraphics: Move RDP validation logic to qemu_validate.c
Move the rest of the RDP graphics validation code to
qemuValidateDomainDeviceDefRDPGraphics together with the rest of the
validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
e5eb371343 qemuProcessStartValidateGraphics: Remove redundant checks for RDP protocol features
Both the 'replaceUser' and 'multiUser' field are already validated in
qemuValidateDomainDeviceDefRDPGraphics.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
acbfd585b2 qemu: Move checks for number of listening sockets of graphics to validation code
Move the checks from 'qemuProcessStartValidateGraphics' to the
correspodning graphics validation functions in qemu_validate.c:

 - qemuValidateDomainDeviceDefSPICEGraphics
 - qemuValidateDomainDeviceDefVNCGraphics
 - qemuValidateDomainDeviceDefRDPGraphics

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
19bc77d581 qemu: Move logic from qemuProcessStartValidateShmem to qemuValidateDomainDeviceDefShmem
Move the check to the appropriate central place.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
27e8378962 qemu: conf: Drop handling of 'vxhs' config options
Remove the config file handling for the config options we no longer use.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
21dfb261d8 qemu.conf: Document options for VxHS block network protocol TLS config as ignored
qemu-5.2 dropped support for VxHS. As we now require at least qemu-6.2,
the qemu.conf option for setting up TLS for VxHS are no longer used.
Document them as such.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
dc1764719d qemu: block: Drop code for 'vxhs' storage protocol
qemu-5.2 dropped support for the 'vxhs' protocol. We require qemu-5.2
since commit ce48d584cc and thus the block code for vxhs is now dead.
Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
90ad22ae08 qemu: Move disk backend validation checks from qemuProcessStartValidateDisks to qemuDomainValidateStorageSource
Move the check forbidding VXHS disks and checking the NVME backend
capability to the validation code.

Remove the now unused qemuProcessStartValidateDisks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Peter Krempa
30e08fd2fe qemuDomainValidateStorageSource: Rework protocol validation into a switch statement
Move the validation of TFTP and NFS into a new switch statement which
will be used for validating also other protocol config in the future.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-06-03 13:11:02 +02:00
Jiri Denemark
2b1393357c util: Move virFileGetExistingParent out of ifdef __linux__
The function is called by virFileIsSharedFSOverride which is not Linux
specific and thus building on anything but Linux failes.

Fixes: 94fb348d67
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-06-03 11:28:15 +02:00
Jiri Denemark
74c591b784 util: Avoid statfs in virFileGetExistingParent
The code was separated from virFileIsSharedFSType which is Linux-only,
but virFileGetExistingParent is also called from
virFileIsSharedFSOverride which is OS independent. Thus we can't use
statfs. Let's use virFileExists (access) instead, we were not interested
in anything but success/failure from statfs anyway.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-06-03 11:28:15 +02:00
Daniel P. Berrangé
caa9497e7c docs: fix indent of hostdev examples
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-06-02 11:35:23 +01:00
Jiri Denemark
94fb348d67 util: Fix virFileIsSharedFSOverride on nonexistent paths
Commit v11.0.0-162-gf2023e8018 added path canonicalization to
virFileIsSharedFSOverride to make sure we can properly match shared
filesystem override paths which include symlinks. But
virFileCanonicalizePath only works on existing paths, while
virFileIsSharedFSOverride may be called on paths that do not exist yet.
Matching paths against overrides has always worked even for nonexistent
paths. To fix the regression we need to first get the longest existing
sub-path and canonicalize only this part and use the result for
searching in overrides. Clearly any portion of the path we dynamically
create is not going to end up on a different filesystem to what the
parent directory is stored in. So checking just the existing parent is
enough.

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

Fixes: f2023e8018
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-02 10:03:08 +02:00
Jiri Denemark
05526b5090 util: Introduce virFileGetExistingParent helper
The code from virFileIsSharedFSType which finds the longest existing
path for a given input is separated into a new helper so that it can be
reused elsewhere.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-02 10:03:08 +02:00
Jiri Denemark
ee4231ae67 util: Document limitation of virFileCanonicalizePath
On most platforms virFileCanonicalizePath is implemented using
realpath(), which only works on existing paths.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-06-02 10:03:08 +02:00
Jiri Denemark
3357f31476 Post-release version bump to 11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-02 09:57:25 +02:00
Jiri Denemark
8ba3d94995 Release of libvirt-11.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-02 09:52:35 +02:00
김인수
eb7b8ac5ff Translated using Weblate (Korean)
Currently translated at 99.8% (10912 of 10925 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-06-01 11:35:21 +02:00
Peter Krempa
cd6a09c7f3 NEWS: Mention removal of compile time helper program lookup, virito-net ABI check and FDC capabilities
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-30 15:12:32 +02:00
Jiri Denemark
73f57e051a qemu: Fix error when migration with shared TPM storage is unsupported
The VIR_ERR_NO_SUPPORT error is supposed to be used for unsupported
driver APIs. It is incorrectly used when swtpm does not support
migration with shared storage resulting in a rather strange error
message:

    this function is not supported by the connection driver: the running
    swtpm does not support migration with shared storage

The correct VIR_ERR_OPERATION_UNSUPPORTED error code provides a much
better message:

    Operation not supported: the running swtpm does not support
    migration with shared storage

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-29 11:53:39 +02:00
Narayana Murty N
dc1fe00e94 NEWS: update NEWS for POWER11 support
Update NEWS.rst with the now added POWER11 processor support

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-05-28 13:20:27 +02:00
Jiri Denemark
93d34fe442 NEWS: Make sure releases are separated by two blank lines
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-27 13:23:07 +02:00
Jiri Denemark
cfa295eccb NEWS: Fix virtqemud crash when resuming failed post-copy migration
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-27 12:45:26 +02:00
Jiri Denemark
34ce7f25c5 qemu: Fix crash when resuming failed post-copy migration
Since commit 28a0621528 (released in 11.2.0) resuming a failed
post-copy migration calls qemuProcessIncomingDefNew with fd == NULL
rather than -1. The function does not expect to be called with NULL file
descriptor and tries to dereference it causing virtqemud on the
destination host to crash.

Fixes: 28a0621528
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-27 12:45:25 +02:00
Weblate
ac4f855bb0 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>
2025-05-27 10:56:18 +02:00
Jiri Denemark
0020966fee po: Refresh potfile for v11.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-27 10:42:44 +02:00
Peter Krempa
43dc3b690b docs: domain: Explain supported options of 'error_policy'
Explain what the individual settings actually result in. The changes
are based on the paraprhase of qemu documentation which in
'qemu-options.hx' states:

  ``werror=action,rerror=action``
      Specify which action to take on write and read errors. Valid
      actions are: "ignore" (ignore the error and try to continue),
      "stop" (pause QEMU), "report" (report the error to the guest),
      "enospc" (pause QEMU only if the host disk is full; report the
      error to the guest otherwise). The default setting is
      ``werror=enospc`` and ``rerror=report``.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/138
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-27 10:28:09 +02:00
Weblate
d82df5884a Translated using Weblate (Georgian)
Currently translated at 4.2% (465 of 10918 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-05-26 16:59:47 +02:00
Poesty Li
8482e27ed7 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 98.2% (10730 of 10918 strings)

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

Signed-off-by: Poesty Li <poesty7450@gmail.com>
2025-05-26 16:59:47 +02:00
김인수
424d3720e2 Translated using Weblate (Korean)
Currently translated at 100.0% (10918 of 10918 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-05-26 16:59:47 +02:00
Peter Krempa
bb881a2e49 qemuDomainMachineSupportsFloppy: Check for QEMU_CAPS_BUS_FLOPPY
Refuse to use floppy devices if qemu doesn't support them. Reflect that
also in capabilities. Both of the above is achieved by checking for the
QEMU_CAPS_BUS_FLOPPY in qemuDomainMachineSupportsFloppy.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-26 15:48:06 +02:00
Peter Krempa
f7d1caa81d qemu: capabilities: Introduce QEMU_CAPS_BUS_FLOPPY
Introduce a common capability for support of floppy devices by qemu.

Floppy support can be compiled out ('FDC', 'FDC_ISA', 'FDC_SYSBUS' qemu
Kconfig options) and also isn't supported by all architectures. Add a
capability that will check for 'isa-fdc' and 'sysbus-fdc' devices and
signal that given qemu supports the floppy bus.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-26 15:48:06 +02:00
Peter Krempa
600065cefc qemu: Move floppy device support validation to validation code
Move the validation from qemuProcessStartValidateDisks to
qemuValidateDomainDeviceDefDiskFrontend and adjust the test case which
now fails a bit earlier, thus no output XML is needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-26 15:48:06 +02:00
Peter Krempa
e8017c12c8 qemu: domain: Introduce qemuDomainMachineSupportsFloppy
Add a helper that will collect the logic for determinin whether a VM
supports floppy disks.

Use it in the capabilities code and when validating the VM definition at
startup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-26 15:48:06 +02:00
Michal Privoznik
481a38c45f libvirt_nss: Allocate buffer in aiforaf() dynamically
While we were trying to decrease stack usage of some functions,
in v9.8.0-rc1~217 we introduced a couple of internal blocks to
the aiforaf() and declared some variables inside those blocks
hoping the compiler will reuse the stack for each block. While in
general this might be a good strategy, specifically in case of
NSS_NAME(gethostbyname2) this is a terrible thing to do.

Problem is, NSS_NAME(gethostbyname2) is given a caller allocated
buffer and an address of a pointer where the resolved address is
stored. And you've probably guessed it already: upon successful
return, the pointer is set to point somewhere inside the buffer.

Now, if the buffer doesn't live long enough, which in our case it
does not (since it was left in the previous block), we should
refrain from dereferencing the resolved pointer.

Just allocate the buffer on the heap.

Fixes: 9e5f2fe402
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
209ca5f839 libvirt_nss: Allocate buffer in ERROR() dynamically
So far, inside of the ERROR() macro there's pretty large buffer
allocated on the stack (for use by strerror_r()). Problem is,
with our current stack size limit of 2048 bytes we may come
pretty close to the limit or even overshoot it, e.g. in aiforaf()
where the function itself declares another stack allocated buffer
1024 bytes long.

Just allocate the buffer dynamically.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
6133c09cf5 libvirt_nss: Drop needless cleanup labels
After previous cleanup, some labels were rendered pointless. Drop
them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
dbd41b6558 libvirt_nss: Use automatic memory freeing
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
6d1848ac12 nss: Declare g_autofree and g_steal_pointer() macros
While we do not want the nss plugin to link with anything but
necessary libs (libc and libjson-c) it can benefit from automatic
memory freeing. Instead of inventing macros with new name for
them, lets stick with g_autofree and g_steal_pointer() which we
are used to from the rest of the code. Borrow and simplify
definitions for these macros then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
f79ef43f2c nss: Add missing includes for gai_strerror()
There are two places where gai_strerror() is called but neither
of them includes all necessary header files as documented in its
manpage. Fortunately, both calls occur in ERROR() macro which by
default does nothing - hence we don't see any compilation errors.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Michal Privoznik
46b0115778 libvirt_nss_macs: Fix type of @len in findMACsFromJSON()
Inside of findMACsFromJSON(), the retval of
json_object_array_length() is stored in a variable that's type of
int. But the function is declared to return size_t:

  /usr/include/json-c/json_object.h:JSON_EXPORT size_t json_object_array_length(const struct json_object *obj);

Fix the type of the local variable.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-22 15:44:12 +02:00
Narayana Murty N
7b0888b4ef cpu_ppc64: Add POWER11 host-model support
This patch adds POWER11 CPU host-model support in libvirt's ppc64
CPU driver. With this addition, guests using CPU mode 'host-model'
can specify POWER11 as the CPU model and have libvirt handle it
correctly.

With this change, libvirt can generate correct QEMU command line using
`-machine ... max-cpu-compat=power11` when a POWER11 host-model guest is
defined. This aligns with the QEMU support for POWER11 compatibility mode
starting from version 10.0.0.

Test coverage includes:
- XML validation tests for POWER11 host model
- Negative test for invalid compatibility on POWER10 hosts
- Command line generation tests for POWER11 guests

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Tested-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:23:22 +02:00
Narayana Murty N
e17aa7408c cpu_map: Add POWER11 CPU model support
Add support for the POWER11 CPU model in libvirt ppc64 CPU map. This
allows libvirt to recognize and handle guests that specify POWER11 as
the target CPU model when running on recent Power systems supporting
this architecture.

The addition includes:
- A new src/cpu_map/ppc64_POWER11.xml definition file describing the
  features and flags for POWER11 CPUs.
- Updates to src/cpu_map/index.xml and build system (meson) to include
  the new model.
- Test updates to qemucapabilitiesdata and qemuxmlconfdata to reflect
  the presence of POWER11 in supported CPU models.
- Adjustments to existing test XMLs to fix CPU model expectations
  and avoid mismatches during validation against QEMU output.

With this change, users can specify <model>POWER11</model> in guest CPU
configuration and have libvirt map it correctly to the corresponding
QEMU CPU model and capabilities.

Tested with:
- QEMU 10.0.0 on POWER11 host system
- Validated with updated domain capabilities and qemu capabilities tests

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Tested-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:23:22 +02:00
Narayana Murty N
a714d53f74 tests: Add capabilities for QEMU 10.0.0 on ppc64
Add the qemu test capabilities xml and reply files for
QEMU v10.0.0 on ppc64. A QEMU v10.0.0 was used for generating
this data.The tests with the 'latest' suffix, which expect
the latest available CPU version from the capabilities XML,
are bumped up to the latest CPU version.

Notable changes:
   - new pseries-10 machine type
   - old machine types (2.7) dropped
   - new CPU models power11 added

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:23:22 +02:00
Narayana Murty N
1c077f6a73 tests: qemuhotplugtest: Set the cpu version at source for PPC64 tests
Commit 140ff3c514 ("tests: qemuhotplugtest: Fix arch-specific parts of
'ppc64' test XMLs") hardcoded the CPU model as POWER9 in the test result
XMLs. However, this value actually reflects the host CPU model detected
at build or test time, and can vary depending on the machine where the
tests run.

As newer POWER CPU models (e.g., POWER10, POWER11) become common, this
requires continuous updates to the test result files to match the CPU
version detected on the host. This adds unnecessary maintenance effort.

Fix this by updating the test source domain XMLs to specify POWER9 (or
any fixed version) as the CPU model. This ensures the test result files
stay stable and do not require updates every time a newer CPU is used on
the host system.

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:23:22 +02:00
Narayana Murty N
0742b6487a tests: Pin pseries-2.7 tests to the version 7.0
Support for the pseries-2.7 machine type in QEMU was officially removed in
version 9.2 with qemu commit 445d3facffe8 ("ppc/spapr: remove deprecated
machine pseries-2.7"). Instead of removing related tests, they are now pinned
to the latest available capabilities version 7.0.0 to ensure continued
functionality where applicable.

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 15:23:22 +02:00
Jiri Denemark
47431165f4 virsh: Do not print warnings with "error:" prefix
Both vshWarn and vshError are just wrappers around vshPrintStderr which
properly propagates the message level to the log, but fails to honor it
when printing on stderr.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-22 14:29:48 +02:00
Roman Bogorodskiy
eb9b48bddf docs: drvbhyve: document NVRAM support
Add a couple of examples of the explicit NVRAM configuration, and also
an automatic configuration, along with `<os firmware="efi">`.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 19:02:52 +02:00
Roman Bogorodskiy
14c05d8f3e NEWS: bhyve: document NVRAM support
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 19:02:38 +02:00
Alexey Dokuchaev
e06902917c build-aux: simplify grep detection on FreeBSD
For quite some time now FreeBSD provides its own version of the grep(1)
tool, and the GNU grep from the ports collection is available as
ggrep(1). So remove the detection code and just request ggrep.

Signed-off-by: Alexey Dokuchaev <danfe@FreeBSD.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 18:57:21 +02:00
Peter Krempa
17e170a137 qemuMonitorJSONMigrate: Drop 'detach' QMP option
The argument was always ignored by qemu [1], as of qemu-10.1 it will be
deprecated. As it was always unused/ignored we can drop it without any
extra logic.

[1] qemu docs state:

   3. The user Monitor's "detach" argument is invalid in QMP and
     should not be used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Peter Krempa
f0b29d4a6f qemuMonitorDumpToFd: Drop 'detach' argument
The only caller always passes 'true'. We also don't want to ever use the
blocking variant as it blocks the whole monitor until dump finishes.

Hardcode it to 'true' in the monitor code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Peter Krempa
d9b90d6f89 virsh: domain: Annotate rest of arguments taking local existing file
Few arguments were missing the 'vshCompletePathLocalExisting' completer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Peter Krempa
811749a266 virsh: Apply empty completer to arguments where completion doesn't make sense
Few outstanding arguments were not marked with 'virshCompleteEmpty'
completer despite the fact that we can't provide any reasonable
suggestion, e.g. for the new description of a domain or for the launch
secret.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Peter Krempa
0f430122d3 vsh: Apply empty/local completers to global commands
Few outstanding arguments were not marked with completers
completer despite the fact that we can't provide any reasonable
suggestion (e.g 'echo' or 'complete' commands) or where we want to
complete local path ( 'cd' ).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Peter Krempa
8d1cd03478 virsh: completer: Extract common completer methods from virsh to vsh
The helper methods as well as the empty completers can be useful also in
other virt shells; extract the code and rename the functions
appropriately.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00
Jaroslav Suchanek
c22b734117 cputest: Skip more tests requiring JSON_MODELS if QEMU is disabled
Marking more tests with JSON_MODELS_REQUIRED as these tests fail if QEMU is
disabled, typically when running tests on FreeBSD or macOS systems.

Signed-off-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-21 09:31:40 +02:00
Roman Bogorodskiy
5fdcf07e5d bhyve: support removing NVRAM on domain undefine
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-20 18:27:30 +02:00
Roman Bogorodskiy
4fc9b49217 bhyve: introduce bhyveDomainDefValidate()
Add the bhyveDomainDefValidate() validation which currently checks
whether the requested NVRAM is supported.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-20 18:27:30 +02:00
Roman Bogorodskiy
b869102f5e bhyve: firmware: try to guess NVRAM settings
Extend bhyveFirmwareFillDomain() so that when we find the default edk2
firmware, also look for its matching template file, and use it as a
nvramTemplate if found.

Extend bhyvexml2argvtest to verify various NVRAM configurations.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-20 18:27:27 +02:00
Roman Bogorodskiy
c7d1bbd9a4 bhyve: generate NVRAM bhyve arguments
Currently, bhyve bootrom specification looks like this:

 bhyve ... -l bootrom,/path/to/firmware.fd

In addition to that, it supports specifying the VARS files using:

 -l bootrom,/path/to/firmware.fd,/path/to/my_domain_VARS.fd

Update virBhyveProcessBuildBhyveCmd() to include the VARS file if NVRAM
is specified in the domain XML.

Additionally, support copying this file from the specified template. To
do that, introduce the bhyveProcessPrepareHost() and related helpers.
They are currently not doing anything but NVRAM preparations, but should
be useful for other host-side related tasks in the future.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-20 18:24:52 +02:00
Roman Bogorodskiy
24bdf9a15f bhyve: conf: introduce nvramDir
As a preparation for NVRAM support, introduce nvramDir configuration
item.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-20 18:22:49 +02:00
Peter Krempa
aeb1f77c0f qemu: fd: Log information about passed file descriptor
Log information (type, label, etc) about FDs passed to qemu via APIs
from this module.

This does "spill" the selinux library code into this module, but
acessing it via the security driver would require passing much more
context to this module. Since it's for logging only it can be easily
removed if necessary.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-20 07:35:54 +02:00
Peter Krempa
c8c3920e35 docs: backup: Hint at proper selinux labelling of the FD-passed NBD socket
In case selinux is used on the host the socket passed to qemu needs to
be properly labelled. Add a hint to the example code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-20 07:35:54 +02:00
Peter Krempa
3d05fe7aa3 qemuBackupPrepare: Actually allow 'VIR_STORAGE_NET_HOST_TRANS_FD'
While I've actually implemented support for FD passing the NBD server
socket in eb768a556d I managed to misplace the hunk allowing the 'FD'
transport in the validation code, rendering the whole feature useless.

Fix the validation logic to make the feature usable.

Fixes: eb768a556d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-20 07:35:54 +02:00
Ján Tomko
16c4fa9f82 build: do not use -Winline
We don't really care if a function cannot be inlined.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-19 16:51:58 +02:00
Ján Tomko
681d64b939 build: prohibit inline functions in C files by syntax-check
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-19 16:51:58 +02:00
Jens Schmidt
df75a015a1 NEWS: Mention new option '--no-pkttyagent'
Signed-off-by: Jens Schmidt <farblos@vodafonemail.de>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-19 09:10:12 +02:00
Jens Schmidt
0eea768f4b virsh: Add option '--no-pkttyagent'
In scripts repeated execution of virsh can result in a lot of
journal noise when pkttyagent gets registered with polkitd each
time.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/757
Signed-off-by: Jens Schmidt <farblos@vodafonemail.de>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-19 09:08:14 +02:00
Peter Krempa
05f34d585a qemuDomainRemoveInactive: Remove 'driver' argument
The function can fetch it from @vm.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:22 +02:00
Peter Krempa
e9e8faa280 qemuProcessReconnectData: Drop 'driver' struct and clean up
Nobody reads the struct member any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:22 +02:00
Peter Krempa
36069750ee qemuProcessReconnect: Modernize local variable setup
Assign local variables directly and use autofree for temproary ones.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:22 +02:00
Peter Krempa
54aad47a02 qemuDomainRemoveInactiveLocked: Remove 'driver' argument
The function can extract the value from @vm's private data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
1375974995 qemuProcessStop: Drop 'driver' argument
For now it's extracted as a temporary variable but in long term it ought
to be eliminated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
b5131f00b6 qemuDomainRemoveInactiveCommon: Remove 'driver' argument
The function can fetch it from @vm.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
475000c9bc qemuSnapshotDiscardAllMetadata: Remove 'driver' argument
The function can extract it from @vm.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
ecadb2f19a qemuCheckpointDiscardAllMetadata: Remove 'driver' argument
The function can extract it from @vm.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
f0ccfe9f9d qemuExtDevicesCleanupHost: Use 'virQEMUDriverConfig' instead of 'virQEMUDriver'
Refactor the function and all callees to use the driver config instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
e0481ec1db qemuProcessStartWithMemoryState: Rename 'snapshot' to 'internalSnapshotRevert'
Make it obvious that the variable is used for internal snapshot
reversion by renaming it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
897b3aa3c5 qemuProcessStart: Rename 'snapshot' to 'internalSnapshotRevert'
Make it obvious that the variable is used for internal snapshot
reversion by renaming it. This is necessary mainly as the function
parameters are not documented, but makes it obvious also if they were.

We can also report the name of the sanpshot rather than a pointer that
says absolutely nothing to the reader.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:21 +02:00
Peter Krempa
a82f2b6de7 qemuProcessLaunch: Rename 'snapshot' to 'internalSnapshotRevert'
Make it obvious that the variable is used for internal snapshot
reversion by renaming it. This is necessary mainly as the function
parameters are not documented, but makes it obvious also if they were.

We can also report the name of the sanpshot rather than a pointer that
says absolutely nothing to the reader.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Peter Krempa
63bc7ea39c qemuBuildCommandLine: Drop 'snapshot' argument
After recent refactors that removed legacy way to revert snapshots we no
longer need to know the snapshot state during commandline build.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Peter Krempa
c4f70cc4d9 qemuSnapshotRevertInactive: Ensure all error paths handle transient domains properly
Only the internal snapshot code paths were able to handle transient
domains properly in case when startup of the process failed.

Unify the error paths on an 'error' label with proper handling.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Peter Krempa
542f1378bf qemuSnapshotRevertActive: Remove transient domain on failure
Code paths which deal with stopping of the qemu process need extra
handling for transient definitions as they need to be removed from the
domain list when we'd be leaving them inactive.

In case of snapshot code it's on failure to revert a snapshot as we stop
the qemu process but the failure to revert may mean that the new process
will not be started.

I've observed this when I was fixing the recent bug in snapshot
reversion which left the domain in unusable state after failure to
revert:

 $ virsh list foo
 error: Requested operation is not valid: domain is not running

 $ virsh undefine foo
 error: Requested operation is not valid: cannot undefine transient domain

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Peter Krempa
f06805a979 NEWS: Mention fix for internal snapshot reversion regression
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Peter Krempa
889d2ae289 qemuProcessStartWithMemoryState: Don't setup qemu for incoming migration when reverting internal snapshot
The memory/device state of the VM for an internal snapshot is restored
by qemu itself via a QMP command and is taken from the qcow2 image, thus
we don't actually do any form of incoming migration.

Commit 5b324c0a73 which refactored the setup of the incoming
migration state didn't take the above into account and inadvertently
caused that qemu is being started with '-incoming defer' also when
libvirt would want to revert an internal snapshot.

Now when qemu expects incoming migration it doesn't activate the block
backends as that would cause locking problems and image inconsistency,
but also doesn't allow the use of the images. Since the block backends
are not activated qemu then thinks that they don't actually support
internal snapshots and reports:

  error: operation failed: load of internal snapshot 'foo1' job failed: Device 'libvirt-1-format' is writable but does not support snapshots

Due to the above bug it's not possible to revert to internal snapshots
in libvirt-11.2 and libvirt-11.3.

Fixes: 5b324c0a73
Resolves: https://issues.redhat.com/browse/RHEL-88747
Closes: https://gitlab.com/libvirt/libvirt/-/issues/771
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 14:48:20 +02:00
Fabio Estevam
bf79a021a6 cpu_x86: Do not inline cpuidCall()
The following build error is observed when the DEBUG_BUILD variable
is enabled in OpenEmbedded:

src/cpu/cpu_x86.c: In function 'cpuidSetLeaf4':
src/cpu/cpu_x86.c:2563:1: error: inlining failed in call to 'cpuidCall': function not considered for inlining [-Werror=inline]
 2563 | cpuidCall(virCPUx86CPUID *cpuid)
      | ^~~~~~~~~

Remove the 'inline' specifier to avoid the problem.

Reported-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-16 14:31:22 +02:00
Michal Privoznik
768b539d83 spec: Bump min_fedora
Fedora 40 is now officially at end of life [1]. The minimal
version we aim to support upstream is thus Fedora 41. Reflect
this in the spec file.

1: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/XCUBN7NR7LXFFSA3IJDRTGHC7K4CXARV/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-16 13:51:25 +02:00
Michal Privoznik
e2bc742fcc spec: Bump min_rhel
RHEL-8 is out of our support scope. The minimal version we aim to
support upstream is RHEL-9. Reflect this in the spec file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-16 13:51:25 +02:00
Michal Privoznik
37ce03c6fe ci: refresh with 'lcitool manifest'
- Add Fedora 42
- Remove EOL Fedora 40
- Switch mingw from Fedora 41 to Fedora 42

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-16 13:51:25 +02:00
Matthew R. Ochs
431911a846 tests: Add pcihole64 test for virt machine
Add a pcihole64 test for the aarch64 virt machine that verifies the
value is propagated to the highmem-mmio-size virt machine parameter.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
2025-05-16 12:47:32 +01:00
Matthew R. Ochs
329afc74b1 qemu: Add command line support for PCI high memory MMIO size
Add support for generating QEMU command line with PCI high memory MMIO size:
    - Add highmem-mmio-size to machine command line generation using
      size conveyed through pcihole64
    - Add validation for aarch64/virt machine type requirement
    - Add capability check for QEMU support

This enables configuring the PCI high memory MMIO window size
for aarch64 virt machine types using the existing pcihole64
element.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
2025-05-16 12:47:32 +01:00
Matthew R. Ochs
91e1b2cb7c qemu: Add capability for PCI high memory MMIO size
Add QEMU capability for PCI high memory MMIO size configuration:
- Add QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE capability
- Add capability to virt machine properties
- Add highmem-mmio-size virt machine property to aarch64 qemu
      10.0.0 capabilities

This allows detecting support for the highmem-mmio-size virt machine
property in QEMU.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
2025-05-16 12:47:29 +01:00
Stefan Kober
8a9d201bf6 ch: Support RNG device
Cloud Hypervisor supports virtio-rng devices and the configuration of
the randomness source (e.g. /dev/random or /dev/urandom).

This commit adds support for configuring the RNG device via libvirt for
the ch driver.

Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-16 10:44:39 +02:00
Hyman Huang
95d665c768 rpc: Add the {repoll,retry} logic in virNetClientSetTLSSession
As advised by the GNU TLS, the caller should attempt again
if the gnutls_record_{recv,send} return EAGAIN or EINTR;
check the following link to view the details:
https://www.gnutls.org/manual/html_node/Data-transfer-and-termination.html

virNetClientSetTLSSession failed to handle EINTR/EGAIN,
though EGAIN seems like it ought to be unlikely given that
the caller waited for G_IO_IN.

Add the {repoll, retry} logic to handle EINTR/EGAIN that
may happen theoretically. This may reduce the likelihood
that the upper application receives the following error
message utmostly when it calls the virConnectOpenAuth API:
Unable to read TLS confirmation: Resource temporarily unavailable

Note that in order to fully avoid the mentioned problem, the
upper application should retry virConnectOpenAuth.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Hyman Huang <yong.huang@smartx.com>
2025-05-15 10:36:25 +01:00
Michal Privoznik
1e2b13fb20 src: Fix retval of some functions declared to return an int
There are couple of functions (virCHDomainPrepareHostdevPCI(),
qemuDomainPrepareHostdevPCI(),
virStorageBackendRBDSetAllocation(), virCommandHandshakeChild())
that are declared to return an integer, but in fact return a
boolean. This may lead to incorrect behaviour. Fix their retvals.

This diff was generated using the following semantic patch:

  @@
  identifier foo;
  @@

  int foo(...) {
      <+...
  (
  -   return true;
  +   return 0;
  |
  -   return false;
  +   return -1;
  )
      ...+>
  }

Each function and its callers were then inspected to see what
retvals are expected.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:41 +02:00
Michal Privoznik
fe1f94a034 virsh-pool.c: Fix return type of virshBuildPoolXML()
The virshBuildPoolXML() function is declared to return an int but
in fact its return type is a boolean. Even its both callers
(cmdPoolCreateAs() and cmdPoolDefineAs()) treat its retval as a
boolean. Switch the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:26 +02:00
Michal Privoznik
a9adca0956 virnetdevvlan: Fix return type of virNetDevVlanEqual()
The virNetDevVlanEqual() function is declared to return an int
but in fact its return type is a boolean. Even its only caller
(qemuDomainChangeNet()) treats its retval as a boolean. Switch
the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:25 +02:00
Michal Privoznik
a857d993d1 storage_backend_rbd.C: Fix return type of a volStorageBackendRBDUseFastDiff() stub
Inside of storage_backend.c there are two implementations of
volStorageBackendRBDUseFastDiff() function: one when librbd is
new enough and one when it isn't. The former returns a bool, but
the latter is declared to return an int despite it returning a
boolean. Fix the latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:24 +02:00
Michal Privoznik
1cf0944ceb qemu_process: Fix return type of qemuDomainHasHotpluggableStartupVcpus()
The qemuDomainHasHotpluggableStartupVcpus() function is declared
to return an int but in fact its return type is a boolean. Even
its only caller (qemuProcessLaunch()) treats its retval as a
boolean. Switch the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:23 +02:00
Michal Privoznik
7e763c5275 nwfilter: Fix return type of virNWFilterCanApplyBasicRules callback
The virNWFilterCanApplyBasicRules() callback returns an int but
in fact its return type is a boolean. Even its only
implementation (ebiptablesCanApplyBasicRules()) returns a
boolean. Switch the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:23 +02:00
Michal Privoznik
9fc9395c41 storage_backend_rbd.c: Make virStorageBackendRBDSetAllocation() stub report an error
Inside of storage_backend_rbd.c there are two implementations of
virStorageBackendRBDSetAllocation(). One reports an error on
failure, so the stub implementation should report an error too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-15 10:49:21 +02:00
Peter Krempa
d892d3c276 virDomainNetDefCheckABIStability: Consider virtio 'queues' ABI
While the queue count itself is not a guest visible property, libvirt
uses it to calculate the 'vectors' property of the 'virtio-net' device
which is ABI.

Since we don't expose control of 'vectors' explicitly, consider 'queues'
ABI.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-15 08:30:42 +02:00
Peter Krempa
465a38154f virNetDevTapCreate: Use error message hinting to multiqueue use only when opening multiple queues
Due to a logic bug the error message mentioning multi queue operation
would be emitted also when a single queue would be opened on an
externally managed tap device.

Adjust the condition to trigger only when multiple queues are in use.

Fixes: f6fb097e11
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-15 08:30:42 +02:00
Peter Krempa
0e1c309157 docs: man: Document '--once' for 'virsh autostart'
Document the '--once' option and how it combines with the setting
without '--once'.

Resolves: https://issues.redhat.com/browse/RHEL-89414
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-15 08:27:27 +02:00
Peter Krempa
dd8573b3ea API: Clarify behaviour of autostart vs autostart once
If either of the autostart settings is enabled the VM will be
autostarted. Attempt to clarify that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-15 08:27:27 +02:00
Peter Krempa
6db8dc63bc qemuDomainPrepareHostdevPCI: Simplify error messages
Rework the error reporting. Unify on one message about device assignment
modes not supported by the qemu driver and move and reword the messages
for VFIO device assignment.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-14 16:38:38 +02:00
Peter Krempa
fced1da279 qemuDomainPrepareHostdevPCI: Fix return values after conversion from bool to int
Historically when the code was in 'qemuHostdevPreparePCIDevicesCheckSupport'
the function returned bools. Later it was refactored and moved to
'qemuDomainPrepareHostdevPCI' the return values were not changed.

Thus the function now returned '-1', 'false', and 'true'. Callers
checked for '-1' only so the few cases forbidding legacy device
passthrough were no longer causing fatal errors.

Fixes: 3b87709c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-14 16:38:38 +02:00
QiangWei Zhang
28c16b7d11 virnetdevtap: Fix memory leak in virNetDevTapReattachBridge
Variable 'master' needs to be free because it will be reassigned in
virNetDevOpenvswitchInterfaceGetMaster().

The leaked stack:
Direct leak of 11 byte(s) in 1 object(s) allocated from:
    #0 0x7f7dad8ba6df in __interceptor_malloc (/lib64/libasan.so.8+0xba6df)
    #1 0x7f7dad715728 in g_malloc (/lib64/libglib-2.0.so.0+0x60728)
    #2 0x7f7dad72d8b2 in g_strdup (/lib64/libglib-2.0.so.0+0x788b2)
    #3 0x7f7dacb63088 in g_strdup_inline /usr/include/glib-2.0/glib/gstrfuncs.h:321
    #4 0x7f7dacb63088 in virNetDevGetName ../src/util/virnetdev.c:823
    #5 0x7f7dacb63886 in virNetDevGetMaster ../src/util/virnetdev.c:909
    #6 0x7f7dacb90288 in virNetDevTapReattachBridge ../src/util/virnetdevtap.c:527
    #7 0x7f7dacd5cd67 in virDomainNetNotifyActualDevice ../src/conf/domain_conf.c:30505
    #8 0x7f7da3a10bc3 in qemuProcessNotifyNets ../src/qemu/qemu_process.c:3290
    #9 0x7f7da3a375c6 in qemuProcessReconnect ../src/qemu/qemu_process.c:9211
    #10 0x7f7dacc0cc53 in virThreadHelper ../src/util/virthread.c:256
    #11 0x7f7dac2875d4 in start_thread (/lib64/libc.so.6+0x875d4)
    #12 0x7f7dac3091bb in __GI___clone3 (/lib64/libc.so.6+0x1091bb)

Fixes: de938b92c9
Signed-off-by: QiangWei Zhang <zhang.qiangwei@zte.com.cn>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-14 14:55:37 +02:00
Michal Privoznik
6c4260b501 virnetlink: Split virNetlinkBridgeVlanFilterSet()
Currently, virNetlinkBridgeVlanFilterSet() takes @cmd as the
second argument where either RTM_SETLINK or RTM_DELLINK is
expected. Both of these constants come from linux/rtnetlink.h and
thus are undefined when building without netlink. This design
also clashes with the whole point of virnetlink: to offload
netlink dependency onto a single file.

Therefore, drop the argument, turn
virNetlinkBridgeVlanFilterSet() into just setter, effectively,
and introduce virNetlinkBridgeVlanFilterDel() for the case when
RTM_DELLINK would be passed as @cmd.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/770
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-14 12:32:11 +02:00
Michal Privoznik
6a23a61496 virnetdevbridge: Include virnetlink.h more often
The whole point of virnetlink.h is that it hides away the build
time dependency on netlink. It wraps netlink functions in our
functions which then have a stub implementation in case netlink
support was disabled.

Though, netlink is still Linux specific, so keep it in the
'#ifdef __linux__` block to cause a compilation error should
anybody try to use any of the wrapped functions on non-Linux.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-14 12:32:08 +02:00
Michal Privoznik
54fbcc6c7d virnetdevbridge.c: Fix comments in virNetDevBridgeSetupVlans()
We still use C89 style of comments. Fix C99 style of comments
used in virNetDevBridgeSetupVlans().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-14 12:32:07 +02:00
Michal Privoznik
89c622744f virnetlink: Provide stub for virNetlinkBridgeVlanFilterSet()
In virnetlink.c there are two sections: the first one when
building WITH_LIBNL support, the other that provides stubs for
functions declared in the corresponding header file when building
without netlink support. But the stub implementation for
virNetlinkBridgeVlanFilterSet() was missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-14 12:32:02 +02:00
Daniel P. Berrangé
bd30147e74 rpm: disable zfs on Fedora >= 43
The zfs-fuse package has been dead upstream for a long time and is
now retired in Fedora rawhide.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-13 10:52:09 +01:00
Matthew R. Ochs
cea2ee1d28 tests: Add capabilities for QEMU 10.0.0 on aarch64
Notable differences:

  * various machine types, notably vexpress-a9, have stopped
    accepting user-specified CPU models in QEMU 9.0;

  * the command line for raw devices is slightly different
    as libvirt now skips the 'raw' format driver blockdev.

Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-12 17:05:43 +02:00
Andrea Bolognani
3d6c40df37 tests: Use collie instead of borzoi for aarch64 tests
The borzoi machine type was dropped in QEMU 9.2.0, so let's
use a different machine type with no ACPI support and no
implicit USB controller instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-12 17:05:33 +02:00
Michal Privoznik
6ff8d08777 qemu_capabilities: Fetch caps for virtio-mem-ccw too
While with upstream QEMU it's impossible to have virtio-mem-ccw and not
have virtio-mem-pci, in RHEL the QEMU's build system is patched to make
that possible. But this breaks our assumption when fetching
capabilities.

Well, just do what we are already doing in this situation (e.g.
"virtio-blk-pci"/"virtio-blk-ccw" & virQEMUCapsDevicePropsVirtioBlk, or
"virtio-scsi-pci"/"virtio-net-ccw" & virQEMUCapsDevicePropsVirtioSCSI):
fetch the same set of props for both devices.

Resolves: https://issues.redhat.com/browse/RHEL-87528
Resolves: https://issues.redhat.com/browse/RHEL-87532

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-09 08:43:30 +02:00
Daniel P. Berrangé
18ff3c9fbf ci: refresh with 'lcitool manifest'
This removes librbd from 32-bit arches on debian sid, which no longer
exists.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-06 11:47:28 +01:00
Michal Privoznik
2756609a3e docs: hooks: Document when shutoff-reason argument was introduced
Introduced in v10.5.0-rc1~52, qemu and lxc hook scripts are
executed with additional argument: shutoff reason. But wording of
our docs make it looks like it's been that way forever. Make it
clear this is `recent` feature.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/766
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-06 08:31:39 +02:00
Jiri Denemark
c074f2f9a8 cpu_x86: Fix algorithm for computing CPU model weight
This patch is effectively a NOP, but it fixes a logic bug and makes the
heuristics more visible and easier to change should there be a need to
do so in the future.

We decide which CPU model is the best match for given CPU data by
comparing lists of features that need to be enabled/disabled on top of
the selected CPU model. Since the original approach of using just the
total number of features was not working well enough, commit
v8.3.0-42-g48341b025a implemented a penalty for disabled features which
would increase for each additional disabled features. Apparently the
intention was weighting disabled features as

                      disabled * (disabled + 3)
    weightDisabled =  -------------------------
                                2

and complete CPU model as

    weight = enabled + weightDisabled

But there was a bug in the code which caused it to ignore some of the
features and counted as enabled regardless on their policy. Instead of
going through all features the code used the number of "enabled"
features (the variable was not really counting number of enabled
features though) which was initialized to the total number of features
and decremented each time a disabled features was found. Thus depending
on the number of disabled features, some features at the end of the list
were ignored. Luckily we know all the ignored features had to be
disabled because the CPU definitions were created by x86DataToCPU which
constructs a list of enabled features followed by disabled features.

So to fix the bug while providing the same results we can come up with
an equivalent formula using properly counted features in the CPU
definition.

The number of disabled features counted by the buggy code is

    half = (disabled + 1) div 2

and the weight of all disabled features is

                     half * (half + 3)
    weightDisabled = -----------------
                            2

When computing the total weight, we can't no longer use number of
enabled features because the original code counted some of the disabled
features as enabled. So to match the old behavior, we count the total
weight as

    weight = features - half + weightDisabled

The weight of enabled features now differs from the value computed by
the old code, but we don't need to worry about it as it's not really
used anywhere except for logging.

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/759
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:57 +02:00
Jiri Denemark
8c23ba74c7 cpu_x86: Refactor virCPUx86CompareCandidateFeatureList
Refactor weight calculation to a separate virCPUx86WeightFeatures
function to avoid code duplication. The algorithm is not changed during
the refactoring, it will be fixed later.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:57 +02:00
Jiri Denemark
18baf82a02 cputest: Add data for a newer version of Intel Atom(R) P5362 CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:57 +02:00
Jiri Denemark
91878efb57 cputest: Add data for Intel(R) Xeon(R) w7-3465X CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:57 +02:00
Jiri Denemark
44bbbb672a cputest: Add data for Intel(R) Xeon(R) Gold 6530 CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:57 +02:00
Jiri Denemark
3b6fcd3e13 cputest: Add data for Intel(R) Xeon(R) Bronze 3408U CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:56 +02:00
Jiri Denemark
ac35760043 cputest: Add data for Intel(R) Xeon(R) 6731E CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:56 +02:00
Jiri Denemark
9d518cd0fe cputest: Add data for AMD EPYC 9334 32-Core CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:56 +02:00
Jiri Denemark
05ee8942f0 cputest: Add data for Intel(R) Xeon(R) Gold 6152 CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:56 +02:00
Jiri Denemark
a7e7971224 cputest: Add data for AMD Ryzen 5 5500U CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:55 +02:00
Jiri Denemark
e7be4feea1 cputest: Add data for AMD EPYC 7713 64-Core CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:55 +02:00
Jiri Denemark
42e14595f3 cputest: Add data for Intel(R) Xeon(R) Silver 4214R CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:55 +02:00
Jiri Denemark
1424a1a17b cputest: Add data for Intel(R) Xeon(R) CPU E3-1270 v5 CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:55 +02:00
Jiri Denemark
e66a2079b8 cputest: Add data for Intel(R) Core(TM) i7-1365U CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:55 +02:00
Jiri Denemark
c976bf9be7 cputest: Add data for Intel(R) Core(TM) i7-1270P CPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 11:03:54 +02:00
Shalini Chellathurai Saroja
670aae6cda tests: update capabilities for QEMU 10.0.0 on s390x
Update the replies and xml files for QEMU 10.0.0 on s390x based on
the released QEMU tag v10.0.0 with the commit Id
7c949c53e936aa3a658d84ab53bae5cadaa5d59c.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-05-05 09:22:44 +02:00
Peter Krempa
c72a1751e5 qemuxmlactivetest: Don't segfault when capability XMLs are invalid
This is purely a devel-time problem in the test suite.

'qemuxmlactivetest' invokes the whole test worker twice, once for
inactive output and second time for active.

Now 'testQemuInfoInitArgs' returns a failure if the XML is invalid and
the test is skipped. On another invocation though it returns 0 if
'testQemuInfoSetArgs' was not invoked meanwhile and thus makes it seem
it succeeded which leads to a crash in the code assuming that some
pointers are valid.

Use same interlocking as 'qemuxmlconftest' to skip the second invocation
on failure of the first one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-05 09:22:14 +02:00
Peter Krempa
5650f1f1e7 domaincapstest: Remove XMLs for already dropped qemu versions (4.2.0 - 5.1.0)
The files were forgotten after the previous bump to use qemu-5.2 as
minimum. The data for qemu-5.2, qemu-6.0, and qemu-6.1 was already
removed when bumping to qemu-6.2.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-05-05 09:21:55 +02:00
Peter Krempa
f0668b7bf0 qemucapabilitiesdata: Enable GTK graphics for 'caps_10.0.0_x86_64'
The common x86_64 test output was usually built without GTK as I've had
that in my build script for a long time. Enable it now as GTK UI is
enabled by many distros and upcoming patches plan to add support to
libvirt as well.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-05-05 09:21:17 +02:00
Michal Privoznik
5df511d178 scripts: Adapt mock-noinline.py to ATTRIBUTE_MOCKABLE
The script is renamed to mockable-attribute.py and adjusted to
check for the new attribute.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 14:31:19 +02:00
Michal Privoznik
f8bc6af44d src: s/G_NO_INLINE/ATTRIBUTE_MOCKABLE/
Per change in coding style done in previous commit,
ATTRIBUTE_MOCKABLE should be used instead of G_NO_INLINE for
functions that are mocked in our test suite. Do the change.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 14:31:19 +02:00
Michal Privoznik
76f8c0b80d internal: Introduce ATTRIBUTE_MOCKABLE
Currently, if we want to mock a function the noinline attribute
is appended after the function (via G_NO_INLINE macro). This used
to work for non pure functions. But there are some trivial
functions (for instance virQEMUCapsProbeHVF()) that are pure,
i.e. have no side effect, and while their call from other parts
of the code is not optimized out, their call from within the same
compilation unit (qemu_capabilities.c) is optimized out.

This is because inlining and semantic interposition are two
different things. Even GCC's documentation for noinline attribute
[1] states that clearly:

  This function attribute prevents a function from being
  considered for inlining. It also disables some other
  interprocedural optimizations; it’s preferable to use the more
  comprehensive noipa attribute instead if that is your goal.

  Even if a function is declared with the noinline attribute,
  there are optimizations other than inlining that can cause
  calls to be optimized away if it does not have side effects,
  although the function call is live.

Unfortunately, despite attempts [2] Clang still does not support
the attribute and thus we have to rely on noinline +
-fsemantic-interposition combo.

1: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute
2: https://reviews.llvm.org/D101011

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 14:31:19 +02:00
Daniel P. Berrangé
27c964a7e4 openvz: stop hardcoding vzlist/vzctl/vzmigrate paths
Allow virCommand to find them in $PATH, which will always include 'sbin'
since the openvz driver only operates in system mode.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
a3977c246e util: stop hardcoding pkttyagent path
Allow virCommand to find it in $PATH

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
4f8b9e731a storage: stop hardcoding LVM tool paths
Change the meson rules to always enable the LVM driver if on a
Linux host, unless the meson options say not to.

The virCommand APIs will return suitable runtime errors if the
tools are not installed.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
68d17f641a meson: stop setting conf var for optional programs
There is no reference to AUGPARSE, BLACK, FLAKE8, PDWTAGS or PYTEST conf
variables anywhere, only the ${name}_prog meson variables are used.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
8faebd4aa8 util: remove use hardcoded TC path
Allow virCommand to find 'tc' in $PATH. This command is only used
when running privileged in which case both 'bin' and 'sbin' dirs will
be in $PATH, so virFindFileInPath will do the right thing to find it.

Since there are no longer any optional programs, only optional test
programs, the meson variables can be renamed and simplified at this
point.

The "TC" constant is defined in the header to match the pattern used
for the other firewall tool names.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
5f781ab311 util: remove use hardcoded OVS_VSCTL path
Allow virCommand to find 'ovs-vsctl' in $PATH. This command is only used
when running privileged in which case both 'bin' and 'sbin' dirs will
be in $PATH, so virFindFileInPath will do the right thing to find it.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:28 +01:00
Daniel P. Berrangé
b6e50df68d util: remove use hardcoded MODPROBE/RMMOD paths
Allow virCommand to find 'modprobe' & 'rmmod' in $PATH. These commands
are only used when running privileged in which case both 'bin' and
'sbin' dirs will be in $PATH, so virFindFileInPath will do the right
thing to find them.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
19f2b047d3 util: remove use hardcoded MM_CTL path
Allow virCommand to find 'mm-ctl' in $PATH. This command is only used
when running privileged in which case both 'bin' and 'sbin' dirs will
be in $PATH, so virFindFileInPath will do the right thing to find it.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
d15cdacc3a nodedev: remove use hardcoded MDEVCTL path
Allow virCommand to find 'mdevctl' in $PATH. This command is only used
when running privileged in which case both 'bin' and 'sbin' dirs will
be in $PATH, so virFindFileInPath will do the right thing to find it.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
fa513d5845 util: remove hardcoded ISCSIADM command path
Gating the iscsi driver backend on a isciadm probe is likely to do
more harm than good as it needlessly disables the code if the dev
forgot to install iscsiadm at build time. As a Linux only command
it is simpler to gate the feature based on the platform choice and
allow missing binaries to be diagnose at runtime.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
ce7ac2f908 meson: remove check for 'ip' program
There are no references to an "IP" conf variable nor a meson
'ip_prog' variable so the check serves no purpose.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
5d36775747 util: remove use hardcoded DMIDECODE path
Allow virCommand to find 'dmidecode' in $PATH. This command is only
usable when running privileged since it relies on reading from a
privileged kernel file. Thus we can assume both 'bin' and 'sbin' dirs
will be in $PATH and virFindFileInPath will do the right thing to
find it when called by virCommand.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
f4e95d1215 meson: stop setting conf var for required programs
There is no reference to PERL, PYTHON3, XMLLINT or XSLTPROC conf
variables anywhere, only the ${name}_prog meson variables are
used.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
014bf667c6 build-aux: add missing definition of PERL variable
Currently $(PERL) is expanding to nothing, but the spacing-check.pl test
luckily still works via the shebang.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
46aab93457 docs: stop setting vars for docs tools
Nothing in the tree references RST2MAN or RST2HTML5 variables, only
rst2man_prog & rst2html5_prog, so the former can be removed.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
6bfead9893 util: stop hardcoding 'ifconfig' path
Change the source to assume use of 'ifconfig' on FreeBSD builds,
allowing virCommand to report missing commands at runtime.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
f7abafdd05 util: stop hardcoding bhyve, bhyvectl, bhyveload paths
Change the meson rules to always enable bhyve if on a FreeBSD host,
unless the meson options say not to.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
654e30b98c util: stop hardcoding numad path
Change the meson rules to always enable numad if on a Linux host, unless
the meson options say not to.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
88f560b619 tests: storage hardcoding paths for mount & vgchange
This is redundant since the tests will strip any path component from the
binary name before comparison.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Daniel P. Berrangé
69eff8ed22 storage: stop hardcoding paths for mkfs, mount, umount
This was always undesirable but now causes problems on Fedora 42
where at build time we detect a /sbin path but at runtime this
will only exist on upgraded machines, not fresh installs.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-02 09:31:27 +01:00
Jiri Denemark
62cf5ba3f9 Post-release version bump to 11.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-02 09:31:06 +02:00
Jiri Denemark
cc934f93a5 Release of libvirt-11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-02 09:25:45 +02:00
Remus-Gabriel Chelu
eeae25d07c Translated using Weblate (Romanian)
Currently translated at 35.4% (3875 of 10918 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-05-01 11:25:07 +02:00
Nicolás Gal
4792cc46b6 Translated using Weblate (Spanish)
Currently translated at 53.4% (5834 of 10918 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-05-01 11:25:07 +02:00
Remus-Gabriel Chelu
27f2900615 Translated using Weblate (Romanian)
Currently translated at 33.2% (3630 of 10918 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-04-29 11:08:35 +02:00
Yuri Chornoivan
742fca442d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10918 of 10918 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-04-29 11:08:35 +02:00
QiangWei Zhang
e1882a4ac4 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 92.1% (10066 of 10918 strings)

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

Signed-off-by: QiangWei Zhang <zhang.qiangwei@zte.com.cn>

Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 92.1% (10065 of 10918 strings)

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

Signed-off-by: QiangWei Zhang <zhang.qiangwei@zte.com.cn>
2025-04-29 11:08:35 +02:00
Weblate
afadcc7359 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>
2025-04-29 11:08:34 +02:00
Michal Privoznik
e1fdff61be scripts: Fix reading list of files in mock-noinline.py
The mock-noinline.py script is fed list of files through its
stdin, each file on its own line. Unfortunately, the way the
script is written does nothing as the trailing newline character
prevents any .endswith() match. Strip each line of white spaces.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-04-28 14:35:29 +02:00
Michal Privoznik
c19c8f1996 util: Add missing G_NO_INLINE annotation
There are two functions that are mocked, but are missing required
G_NO_INLINE attribute: virFirewallDIsRegistered() and
virHostCPUGetPhysAddrSize(). Add it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-04-28 14:35:22 +02:00
Jiri Denemark
b41577396f po: Refresh potfile for v11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-28 10:44:55 +02:00
Ricky Tigg
386cb6708b Translated using Weblate (Finnish)
Currently translated at 21.8% (2381 of 10917 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-04-25 12:21:58 +02:00
Weblate
408475296a Translated using Weblate (Georgian)
Currently translated at 4.2% (464 of 10917 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-04-25 12:21:58 +02:00
김인수
05ed4dde65 Translated using Weblate (Korean)
Currently translated at 100.0% (10917 of 10917 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.5% (10873 of 10917 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.3% (10850 of 10917 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.7% (10785 of 10917 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.7% (10781 of 10917 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-04-25 12:21:58 +02:00
Nicolás Gal
09798e46e3 Translated using Weblate (Spanish)
Currently translated at 53.2% (5808 of 10917 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 52.9% (5780 of 10917 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 52.7% (5759 of 10917 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-04-25 12:21:58 +02:00
Daniel P. Berrangé
7d3ac8017d remote: expand some debug messages for socket detection
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-25 11:18:23 +01:00
Daniel P. Berrangé
11abe72fad kbase: update docs to account for changed error message
The updated doc refers to both the old and new error message, as users
with old deployed versions will still be pointed to the current online
docs URL.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-25 11:18:19 +01:00
Daniel P. Berrangé
79e26b7b21 remote: improve error message when no URI is set
When no URI is set we try to guess what daemon to connect to by looking
for any listening sockets. If there are no listening sockets, however,
we don't even know what daemon the user expected to connect to. The
error message in this case is not especially clear

This tweaks the error message to try to make the problem easier to
understand.

Resolves: https://issues.redhat.com/browse/RHEL-87177
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-25 11:18:07 +01:00
Peter Krempa
a77cdea4cf qemucapabilitiestest: Final update for qemu-10.0 release on x86_64 of the 'amdsev' variant
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-24 15:38:31 +02:00
Peter Krempa
6e1448d8a8 qemucapabilitiestest: Final update for qemu-10.0 release on x86_64
Update the data after the release.

Notable changes:
 - the 7.0 machine types became deprecated

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-24 15:38:31 +02:00
Andrea Bolognani
2dd0ad6d52 rpm: Enable KVM for riscv64 on RHEL 10+
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-24 11:25:53 +02:00
Martin Kletzander
c5a73f75bc qemu_rdp: Fix a typo existance -> existence
Fixes: bd473480b4
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:40 +02:00
Martin Kletzander
750eaf2243 python: Do not explicitly state variables are global when only read
If a variable is not modified in a scope there is no need for the use of
global in such scope.  Without this patch build fails with:

F824 `global ...` is unused: name is never assigned in scope

It is a bit difficult to find more information on that message and error
code, I found it here:

    https://docs.astral.sh/ruff/rules/global-variable-not-assigned/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:40 +02:00
Martin Kletzander
ab1218c610 nwfilter: Fix erroneous pointer passing to g_clear_pointer
Commit 5de27c32a1 wanted to fix a possible double free, but by mistake
did not pass a reference to the variable.  This made virtnwfilterd
coredump in our daily CI build.

Fixes: 5de27c32a1
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:39 +02:00
Alexander Kuznetsov
8685923df0 virbitmap: Change return type of virBitmapToData to void
This function return value is invariant since e59b8f9, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 09:56:51 +02:00
Han Han
6387253c42 docs: formatdomain: Metion virtio model for currentAddress
As commit 50981052a5 mentioned, the currentAddress in live domain
XML, requires virtio model as well.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 15:46:28 +02:00
Roman Bogorodskiy
da062b4d6c bhyve: use const virDomainDef pointer in bhyveBuildNetArgStr()
As virDomainNet* functions were converted to use const virDomainDef
pointers, update bhyveBuildNetArgStr() as well, like it was before it was
changed in e1e40b5035.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-15 15:30:32 +02:00
Roman Bogorodskiy
16a34cedf3 conf: use const virDomainDef pointers
Some virDomainNet* functions use virDomainDef pointers even though they
don't modify the domain config, so switch to const pointers there.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-15 15:30:32 +02:00
Alexander Kuznetsov
faa98ca6d3 nss: Fix memory leak in findLease()
path is allocated by asprintf() and must be freed later if realloc() fails.

Restructure the code to allocate path only after realloc() succeeds,
avoiding the need for an extra free().

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 14:26:59 +02:00
Alexander Kuznetsov
5de27c32a1 nwfilter: Avoid possible double free in virNWFilterInstReset()
virNWFilterInstReset() may be called multiple times, leading to a double g_free()
Replace plain g_free() with g_clear_pointer() to prevent this

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 12:57:07 +02:00
Alexander Kuznetsov
9ccd9676a8 virsh: prevent potential NULL dereference
virXPathString() can return NULL so we need to use STRNEQ_NULLABLE here

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 12:54:54 +02:00
Roman Bogorodskiy
6230eed02c bhyve: capabilities: advertise RNG device support
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-15 11:34:31 +02:00
Roman Bogorodskiy
9b152fcf6f docs: drvbhyve: document virtio-rnd support
- Document the virtio random number generator device support
 - While here, remove mention of the specific FreeBSD version such as
   10-STABLE, and just refer to the latest supported release.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 11:28:40 +02:00
Roman Bogorodskiy
21e3cf978b NEWS: bhyve: document new features
Document the virtio random number generator device support
and <interface type='network'> support.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 11:27:56 +02:00
Michal Privoznik
ac6519084c vsh: Turn _vshControl::progname into a const string
The aim of the progname member of the _vshControl struct is to
point to argv[0] which is then used in vshOutputLogFile() to
create a prefix for a log message. But the member is never
modified (nor it should be) and thus can be a const char *.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-14 12:00:55 +02:00
Michal Privoznik
9e89ef3f2f vsh: Free commands in vshDeinit()
Whether virsh/virt-admin is running in interactive or
non-interactive mode, vshControl::cmd contains the batch of last
executed commands as a linked list. Just look into
vshCommandParse(). Free the linked list in vshDeinit() to avoid
memleak.

  3,312 bytes in 3 blocks are still reachable in loss record 572 of 577
     at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
     by 0x506AB29: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8200.5)
     by 0x1B74B8: vshCmdNew (vsh.c:1466)
     by 0x1B7A80: vshCommandParse (vsh.c:1615)
     by 0x1B8458: vshCommandStringParse (vsh.c:1874)
     by 0x1419C1: virshParseArgv (virsh.c:773)
     by 0x141D11: main (virsh.c:879)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-14 12:00:48 +02:00
Peter Krempa
32fb9af277 NEWS: Mention fix of crash on disk hotplug failure
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Peter Krempa
ba4de5e09e qemuDomainAttachDiskGeneric: Report errors from 'qemuBuildThrottleFiltersAttachPrepareBlockdev'
'qemuBuildThrottleFiltersAttachPrepareBlockdev' can fail when
constructing JSON props, but otherwise always retruns a pointer even if
there's nothing to do.

The code in 'qemuDomainAttachDiskGeneric' didn't handle this properly as
it considered NULL as "nothing to do". Return the failure instead and
check if tere's something to do by looking at 'nfilterdata'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Peter Krempa
727f42a8cd qemu: block: Don't crash if qemuBlockThrottleFiltersDetach gets NULL @data
'qemuBlockThrottleFiltersDetach' crashes if @data is NULL. That can
happen in 'qemuDomainAttachDiskGeneric' as it's used as a rollback path
in cases when we didn't yet initialize the filter struct.

Fix it by tolerating NULL @data.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/765
Fixes: 9a6560f066
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Laine Stump
44abaa0128 qemu: make passt+vhostuser reconnect behave identically to passt+user
When "original passt" support was added, we decided that we always
wanted to reconnect (i.e. restart the passt process) if it was somehow
terminated. Generic vhost-user, on the other hand, only turns on
reconnect if specified by the user in the config. But there is no
reason to require the user to specify this if the other end of the
vhost-user socket is a passt process - we know what has happened and
what we want to do; no reason to do the *wrong* thing by default, and
force the user to make an arbitrary decision about what to add to the
config in order to make it do the *right* thing; instead we just
hardcode it to always do the right thing.

(NB: when the backend is passt, <interface type='vhostuser'> has
always ignored the reconnect setting in <source> when parsing and
formatting, just as it has always ignored the socket path (since that
also is not user configurable for the passt backend)

Resolves: https://issues.redhat.com/browse/RHEL-80169

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:48:46 -04:00
Laine Stump
95ff77f289 qemu: put vhost-user code that's special for passt in a helper function
Rather than duplicating these two lines of chr device object setup for
hotplug and domain start, put them in a helper function that's called
from both places. That way when we need to setup *more* stuff specific
to passt+vhostuser, we can just add it in that one place.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:34 -04:00
Laine Stump
dedf1ada95 qemu: respond to NETDEV_VHOST_USER_DISCONNECTED event
This response to this event is identical to NETDEV_STREAM_DISCONNECTED
(start a new passt process to replace the one that just disappeared -
see commitf62ce81b8a5), except that the new passt process will have
"--vhost-user" appended to the commandline. Fortunately that
difference is already handled based on the virDomainNetDef contents,
so we can, in fact, respond to the new event in exactly the same
manner.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:25 -04:00
Laine Stump
03a6bc7752 qemu: make processNetDevStreamDisconnectedEvent() reusable
We will be adding a new event whose response will be *exactly* the
same as the response to NETDEV_STREAM_DISCONNECTED. Rather than doing
a copy-paste of the complete function that does the processing, turn
that function into something more generic that takes the name of the
event as an arg (the event name is only used in log messages).

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:21 -04:00
Laine Stump
51a54dc1c4 qemu: remove nonsensical sanity check in processNetdevStreamDisconnectedEvent()
By definition QEMU will never send a NETDEV_STREAM_DISCONNECTED event
if it doesn't support the reconnect option for a stream netdev. And
even if, by some comedy of errors, it did send
NETDEV_STREAM_DISCONNECTED in that case, our response to the event
doesn't request anything at all of QEMU (much less something that
would fail if QEMU didn't understand NETDEV_STREAM_DISCONNECTED) - it
just starts a new passt process to replace the one that has been
terminated, so we don't need to check the QEMU capabilities for
QEMU_CAPS_NETDEV_STREAM_RECONNECT.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:16 -04:00
Peter Krempa
68a83cac64 qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure
If the copy job fails to start up when calling the 'blockdev-mirror'
command the code would call qemuDomainStorageSourceChainAccessRevoke()
twice; once right after the monitor call and the second time in the
'endjob' section.

Remove the one directly after the monitor call and let the common
cleanup handle it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Peter Krempa
63c348e88a qemuDomainBlockCopyCommon: Reorder setup of 'mirror' data
While exploring an idea that modified the setup of the mirror I've
noticed that the code setting up the 'discard' field in the block copy
job happens after setup of the storage source, while normally e.g. in
qemuDomainPrepareStorageSource() it happens before.

Reorder it despite not having an effect currently.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Peter Krempa
93307c7a50 qemu: domain: Unexport 'qemuDomainPrepareStorageSourceBlockdevNodename'
The function is referenced only from within qemu_domain.c

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Ján Tomko
a55f1930d5 ch: fix double space in error message
Make it match the errors in bhyve and QEMU drivers, where it was copied
from.

Fixes: 9d6e2d127e
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 16:44:42 +02:00
Roman Bogorodskiy
e1e40b5035 bhyve: support interface type 'network'
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@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:14:54 +02:00
Roman Bogorodskiy
1ec1b765d6 bhyve: extend RNG device validation
Add a bunch of device def validation to catch unsupported RNG device
configurations early.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:06:18 +02:00
Roman Bogorodskiy
0464a9462c bhyve: argv2xml: support virtio-rnd devices
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:06:09 +02:00
Roman Bogorodskiy
03fac384c5 bhyve: support random number generator device
Bhyve supports the Virtio RNG interface. It's always using the
/dev/random device and doesn't have any configuration options.

Thus, in XML it's represented as:

  <rng model='virtio'>
    <backend model='random'/>
  </rng>

So extend the bhyve driver to support that and add a set of tests for
this feature.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:05:22 +02:00
Jiri Denemark
97ed7f22b0 qemu: Properly propagate migration state to TPM cleanup code
When migrating a domain with TPM state on a shared disk, we need to skip
TPM cleanup on both ends. So far the code only handled successful
migration and skipped the cleanup on the source host. But if the
migration failed for some reason, the cleanup would be incorrectly
called on the destination host removing the TPM files even though the
domain was still running on the source host.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 14:15:13 +02:00
Jiri Denemark
a5e4ca6f02 qemu: Rename outgoingMigration parameter in various TPM functions
The parameter is used to skip TPM state cleanup on outgoing migration
with shared storage. But we also need to skip the cleanup after a failed
incoming migration. Let's call the parameter "migration" to reflect its
usage on both sides of migration.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 14:15:13 +02:00
Michal Privoznik
ac5874ba87 network: Suppress reporting an error when D-Bus is unavailable in networkStateInitialize()
When the network driver initializes itself, it tries to subscribe
to signals from Firewalld sent over system D-Bus. Well, the code
is written in best effort mode, i.e. lack of D-Bus is not
considered an error. Problem is, virGDBusGetSystemBus() which is
used to obtain system D-Bus prints out an error in case of
lacking system D-Bus. This pollutes the logs (which may mislead
users) and goes against the best-effort nature of aforementioned
code. Check for the system D-Bus presence via
virGDBusHasSystemBus() first.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-10 13:22:43 +02:00
Michal Privoznik
4f502feebf virinhibitor: Suppress reporting an error when D-Bus is unavailable in virInhibitorAcquire()
At the beginning of virInhibitorAcquire() the system D-Bus
connection is obtained by calling virGDBusGetSystemBus(). If
there's no D-Bus available then an debug message is printed out
and function returns early. Problem is, in case of no D-Bus an
error message was reported by virGDBusGetSystemBus() and thus
logs were polluted which may mislead users.

Just check whether D-Bus is available first (by calling
virGDBusHasSystemBus()). If it is then virGDBusGetSystemBus()
should return a valid connection. Nevertheless, respect previous
logic and don't propagate error to the caller, just return 0.

Resolves: https://issues.redhat.com/browse/RHEL-79088
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-10 12:40:38 +02:00
Peter Krempa
4940e27321 NEWS: Mention fix for 'qemu-rdp' error being logged
Add the news entry stating that it's safe to ignore the error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-04-09 18:06:56 +02:00
Peter Krempa
bd473480b4 qemu: rdp: Fix 'qemuRdpAvailable()'
qemuRdpAvailable() is called from the capability filing code, thus:
- it must not report spurious errors
- it should not call any extra processes

We can solve the above by just checking existance of 'qemu-rdp' in the
path as:
- at the time of adding of qemuRdpAvailable() there was only one 'qemu-rdp' release
- it supported all the features
- the check can't change as we'd drop the capability

Add comments and gut the check to only check existance of the file.

Fixes: f5e5a9bec9
Closes: https://gitlab.com/libvirt/libvirt/-/issues/763
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-04-09 18:05:26 +02:00
Peter Krempa
59f40ba67c esx: Accept empty "path" URI component same way as "/"
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:04:11 +02:00
Peter Krempa
617e2dc319 manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh nodeinfo'
Adapt the disclarimer about the data not being accurate in many cases
from the API docs to the virsh command using the aforementioned API.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
6654cf472c virNodeGetInfo: Improve description of the case when fake data is reported
virNodeGetInfo due to the rigid desing of the filled struct can't
faithfully represent all topologies. Improve the description when that
happens and outline the fallback topology.

The function docs already state that users ought to use
virConnectGetCapabilities() instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
e54cc1500c libvirt-host: Clarify/fix description of the CPU frequency field
The 'virNodeInfo' field for CPU frequency is named 'mhz'. The docs were
mentioning 'mHZ', which is neither the field name nor proper spelling of
the unit.

Reword the paragraph to mention "CPU frequency" instead and explicitly
name the field in virNodeInfo struct.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
be29dbe187 virHostCPUGetInfoPopulateLinux: Remove 'cleanup'
As the cleanup section is empty; the code can now return directly on
errors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
f883dab020 virHostCPUGetInfoPopulateLinux: Use automatic memory freeing
Use 'g_autfree' for the two temporary strings.

'sysfs_cpudir' was used in two places, one of which is in a loop. Add
another helper variable for it and declare the other one in the loop.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
9a747afe6c qemu: capabilities: Retire QEMU_CAPS_NBD_BITMAP
The capability wasn't used since it's inception. It now refers to a
deprecated QMP command. Drop it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
4675e7d3a8 qemu: capabilities: Retire QEMU_CAPS_BLOCK_EXPORT_ADD
The 'block-export-add' command was added in qemu-5.2 so we now use it
unconditionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
57b9b969fb qemu: monitor: Drop wrappers for 'nbd-server-add'
The code is no longer used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
cb332d616a qemu: block: Always assume support for 'block-export-add'
'block-export-add' QMP command which replaces 'nbd-server-add' was
introduced in qemu-5.2. We can thus drop the old code now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
fe88f3f151 docs: drvqemu: Fix required minimum qemu version to 6.2.0
Commit 8824af826d (and also commit 073bf16784 before it) which bumped
minimu, qemu version forgot to update the qemu driver documentation page

Fixes: 8824af826d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:08 +02:00
Kirill Shchetiniuk via Devel
cdf599cfb6 NEWS: mention vol-create bug fix
Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 14:31:35 +02:00
Kirill Shchetiniuk via Devel
b8c3d847a9 storage: virStorageVolDefParse and storageVolCreateXML flags fix
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_VOL_XML_PARSE_VALIDATE flag before
virStorageVolDefParseXML() and the VIR_STORAGE_VOL_CREATE_VALIDATE before
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@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 14:27:15 +02:00
Peter Krempa
7f07cf5a72 docs: Render API and XML sections one per line in HTML
Finding the correct link to a XML description or API reference section
in a big blob of links concatenated in a paragraph is unpleasand and
especially for 'capabilities' and 'domain capabilities' following each
other.

Turn the API and XML reference sections into a list in RST and add CSS
to fromat it a bit more compact.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-07 15:26:32 +02:00
Peter Krempa
d8d7d970c3 docs: Re-order XML schema after API documentation on 'docs' page
Swap the order of links to XML schema docs and to the other language
docs. The XML schema is usually accessed more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-07 15:26:32 +02:00
Jiri Denemark
4ba5b659dc NEWS: Document ARM CPU map bug fix
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:43 +02:00
Jiri Denemark
701b2c0fca cpu_map: Install Ampere-1 ARM CPU models
Fixes: 282f38ad3d
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/762
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:42 +02:00
Jiri Denemark
b72270fafd tests: Add a basic CPU test for aarch64
The purpose of this test is to enforce loading and parsing of ARM CPU
map so that possible issues are found earlier.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:42 +02:00
Michal Privoznik
73d8cbaae5 meson: Drop workaround for -Wframe-larger-than and clang
After previous cleanups, all functions have their stack smaller
than 2048 bytes and thus the workaround is no longer needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:23 +02:00
Michal Privoznik
01a098ebc7 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotCreateFakeDiffStorage()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:19 +02:00
Michal Privoznik
61e1e61f81 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotAddRWDisks()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:15 +02:00
Michal Privoznik
cccdb33ced vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotAddDisksToMediaRegistry()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:11 +02:00
Michal Privoznik
de3ea81270 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotReplaceRWDisks()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:07 +02:00
Michal Privoznik
f9c4f20d8f doRemoteOpen: Drop needless typecast of @transport
The @transport variable is already pass into the function with
proper type. There's no need to typecast it to its very same type
inside the function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:03 +02:00
Michal Privoznik
62ba268cd7 doRemoteOpen: Move RPC talk to a separate function
When opening a connection, the client does some RPC talk
(most notably REMOTE_PROC_CONNECT_OPEN, and in some cases
REMOTE_PROC_CONNECT_GET_URI even).

Now, calling RPC means that local variables must be created.
Having them in doRemoteOpen() increases its stack size which goes
against our effort in bringing the size down (see one of previous
commits).

Move that part of the code into a separate function.

This brings the stack size of doRemoteOpen() even further: from
1320 bytes to 1272.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:42:54 +02:00
Michal Privoznik
063222801a remote_driver: Move URI arg extraction into a separate function
There's a problem with glib: what we might consider functions are
in fact macros and to make things worse - they do declare local
variables. For instance here's the declaration of
g_clear_pointer() macro:

#define g_clear_pointer(pp, destroy)                     \
  G_STMT_START                                           \
  {                                                      \
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
    glib_typeof ((pp)) _pp = (pp);                       \
    glib_typeof (*(pp)) _ptr = *_pp;                     \
    *_pp = NULL;                                         \
    if (_ptr)                                            \
      (destroy) (_ptr);                                  \
  }                                                      \
  G_STMT_END                                             \

Now, as of v6.2.0-rc1~267 our VIR_FREE() macro is in fact a
redeclaration of g_clear_pointer(). Thus, calling VIR_FREE()
increases stack size!

Ideally, this wouldn't be a problem, because those variables
(_pp, _ptr) live in their own block. And clever compiler can just
reuse space created for one block.

But then there's clang where we are hitting this exact problem in
functions like doRemoteOpen() where either g_clear_pointer() is
called directly, or there are macros like EXTRACT_URI_ARG_STR()
which hide the call away.

That's why despite our previous efforts decreasing stack size we
still needed v9.8.0-rc1~208.

Well, moving URI argument extraction (those calls to
EXTRACT_URI_ARG_* macros) into a separate function helps us
decrease stack size from 2296 bytes to 1320.

Even after this there are still more possibilities for
improvements, but those will be addressed in future commits.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:42:20 +02:00
Michal Privoznik
008ccd3518 ch: Fix printf format strings wrt size_t argument
In a few places, when a size_t typed argument is passed to a
printf-like function the corresponding specifier is %ld instead
of %zu. Fix those places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:26 +02:00
Michal Privoznik
b065df3d04 ch: Drop pid from monitor
The domain object already has a member that allows storing
hypervisor's PID (vm->pid). There's no need to duplicate it in
_virCHMonitor struct. Switch CH code to use the former.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:23 +02:00
Michal Privoznik
3dae81c8d7 ch: Use CH_DOMAIN_PRIVATE() more
There are two instances where vm->privateData is typecasted only
so that it can be dereferenced further. Well, that's exactly what
CH_DOMAIN_PRIVATE() macro is for. Use that instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:13 +02:00
Will
6e147f6eac Add NEWS item for <hyperv/> flags with Xen
Signed-off-by: Will <tcosprojects@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-04-03 15:48:01 -06:00
Will
410dfde9bb libxl_conf: Implement hyperv domain flags for Xen
Adds support for configuring <hyperv/> flags for domains
running under Xen.

The following flags, making use of QEMU's existing flags, are now
configurable for Xen: vapic, synic, stimer, frequencies, tlbflush and
ipi.

Tests have been added validating translation to libxl's viridian flags

Updated docs section on <hyperv/> flags to note support and to specify
which flags work with Xen.

Signed-off-by: Will <tcosprojects@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-04-03 15:47:52 -06:00
Ján Tomko
312088d9b6 tools: virsh: metadata: do not report error on missing metadata
Similarly to `desc` and `net-desc`, return an empty string if
there is no metadata to be returned.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-03 14:08:30 +02:00
Yuri Chornoivan
d7492f5225 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10917 of 10917 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-04-03 13:20:43 +02:00
Laine Stump
60b37479f8 docs: add table showing guest IP/DNS/gateway settings when using SLIRP
When using the default SLIRP backend for <interface type='user'>, the
<ip address='blah' prefix='blur'/> setting doesn't behave as might be
expected (i.e. it doesn't set the guest interface IP/prefix to exactly
the provided values). This *should* have created questions when users
originally encountered it, but instead it has become more apparent as
people are contemplating switching from using the SLIRP backend to
using passt instead (with passt, the <ip> settings do behave "as
expected").

In order to make this difference in behavior less mysterious, Yalan
Zhang kindly took the time to test and document the effect of various
representative <ip> settings on guest interface config when SLIRP is
used (see https://issues.redhat.com/browse/RHEL-46601); this patch
adds that same table to libvirt's documentation.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:33:10 -04:00
Kirill Shchetiniuk via Devel
4c5e3b1ca0 ch: virCHProcessEvent() vm shutdown event handler fix
When the domain shutdown was executed from virsh, only the VM
process (a child of the CH monitor) was terminated. Since we assume
only one VM per monitor, the monitor process should also be
terminated.

Modified the VM shutdown event handler to match the VMM shutdown
behavior, ensuring the VM monitor stops along with the VM. Also
updated the virCHEventStopProcess job type, as it only destroys the
domain rather than modifying anything.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:35:28 +02:00
Kirill Shchetiniuk via Devel
ad22460a75 ch: virCHProcessEvent() update domain info after reboot
When the domain was rebooted, some of its properties were changed but
not updated in the transient domain definition. This led to the
inability to connect to the serial console as its path had changed
during the reboot but was not updated in the domain definition.

Added VIR_CH_EVENT_VM_REBOOTED event handling to update the
information in transient domain definition after domain's reboot is
completed to maintain it in consistent state.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:35:28 +02:00
Kirill Shchetiniuk via Devel
9d6e2d127e ch: virCHMonitorNew() run new CH monitor daemonized
When the new CH monitor was started, it ran as a non-daemonized
process and was a child of the CH driver process. This led to a
situation where if the CH driver died, the monitor process were
killed too, terminating the running VM under the monitor. This
led to termination of all VM started under the libvirt.

Make new monitor running daemonized to avoid VMs shutdown when
driver dies. Also added a pidfile its preparetion to be able
to aquire daemon's PID.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:35:28 +02:00
Peter Krempa
e677faa11e qemu: capabilities: Retire QEMU_CAPS_SNAPSHOT_INTERNAL_QMP
The code now always assumes support for the QMP internal snapshot
commands so the capability is no longer needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
38d47345e2 qemu: monitor: Remove HMP monitor code
Now that we've replaced the final two HMP commands used by libvirt we
can fully drop the 'text' monitor support.

The only thing we keep is the HMP passtrhough with
'virsh qemu-monitor-command'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
edc541129f qemu: Always revert internal snapshots via QMP rather than '-loadvm'
As all supported qemu versions now support the QMP internal snapshot
commands (QEMU_CAPS_SNAPSHOT_INTERNAL_QMP is always present) we can
remove the code for loading snapshots during startup via '-loadvm'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
31896db4d5 qemu: snapshot: Always assume support for QEMU_CAPS_SNAPSHOT_INTERNAL_QMP
The 'snapshot-save' QMP command was introduced in 'qemu-6.0' and libvirt
now requires at least 'qemu-6.2'. Thus we can assume that the QMP
command can be used always.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
4d548a2458 qemuSnapshotCreateActiveInternal: Fix error logic
The 'ret' variable is set to 0 before a call which can theoretically
fail. Not in practice really as the failure scenarion includes only
object initialization.

Since the code already has another variable for checking monitor returns
use that one properly so that the code makes sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:40 +02:00
Peter Krempa
62d6794827 qemu: domain: Don't check return value of 'virCPUDefCopy'
As 'virCPUDefCopy' can't fail any more (without aborting) remove the
last two return value checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:40 +02:00
Peter Krempa
8c2872d72c qemu: monitor: Improve field annotations in QEMU_CHECK_MONITOR
The macro checking monitor object state also logs information such as
the monitor object pointer and the number of the monitor FD.

Name the field 'monfd' instead of 'fd' as it's confusing when debugging
FD pasing via monitor.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
e2c6f436dc tests: domainbackupxml2xml: Add test case for pull-mode backup with NBD transport='fd'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
eb768a556d backup: Add support for passing server socket file descriptor to backup NBD server
In deployments where libvirt is containerized together with the VM it
may be hard for the management application to access listening sockets
inside the container from the outside.

This patch implements "transport='fd'" for the NBD server definition for
backups which allows to use the existing "virDomainFDAssociate()" to
pass FD to a pre-opened server socket to qemu instead of trying to
create it by qemu.

Add schema, enable the parser, add formatter and implement the actual
passing for the qemu backup code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
2e014dfae6 qemu: monitor: Support FD passing of sockets to 'qemuMonitorJSONNBDServerStart'
Upcoming patches will extend the FD passing infrastructure to the backup
job so that users can pass an opened socket instead of qemu opening it
themself to bypass difficulities caused by containerizing libvirt.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
5da6b62419 virStorageNetHostDefClear: Move into virStorageNetHostDefFree
There are no other callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
ee49106dbf conf: Introduce VIR_STORAGE_NET_HOST_TRANS_FD
Prepare the parser code and anything using 'virStorageNetHostTransport'
to support passing a FD instead of opening the connection by qemu
itself.

For now this just prepares the parser and data structures, but the code
is dormant.

Only code paths which will actually support FD passing will then enable
it in the future.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
081f3ec3dd virDomainStorageNetworkParseHost: Refactor cleanup
Use a 'switch' statement instead of a bunch of if statements to do
validation and selection what to parse.

Remove the pre-clearing of the struct as we always allocate cleared
memory for it and we can reorder assignments to avoid the need for
cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
aa3c1de260 virDomainStorageNetworkParseHost: Remove unpopulated 'transport' variable
Since the refactor to use proper enum type for the network transport the
'transport' variable is no longer filled. Remove it and fix the error
message which references it without using NULLSTR.

Fixes: 452695926d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
93ecaec845 virDomainDiskDefValidateSourceChainOne: Fix validation of 'data-file' nesting
As the 'dataStore' is internally represented as a virStorageSource
object it has provisions for nesting which is not supported.

When I've reviewed and modified the commit adding data file parsing
support I've added code that was supposed to reject any 'backingStore'
and 'dataStore' structures nested in a source of a 'dataStore'.

Unfortunately the check was broken as one of the terms checked the
presence of parent's 'backingStore' instead of the nesting.

Fix it and add tests.

Fixes: b3171cf8da
Resolves: https://issues.redhat.com/browse/RHEL-85320
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 16:16:05 +02:00
Peter Krempa
7d4de62cfa esxConnectListAllDomains: Don't propagate failure to lookup a single domain
In esxConnectListAllDomains if the lookup of the VM name and UUID fails
for a single VM (possible e.g. with broken storage) the whole API would
return failure even when there are working VMs.

Rework the lookup so that if a subset fails we ignore the failure on
those. We report an error only if lookup of all of the objects failed.
Failure is reported from the last one.

Resolves: https://issues.redhat.com/browse/RHEL-80606
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:15:24 +02:00
Daniel P. Berrangé
904b5e9d06 news: document dropping apparmor < 3.0.0
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 13:38:01 +01:00
Daniel P. Berrangé
5ed5673ebf meson: drop remaining checks for apparmor version
Now that we mandate version 3, any remaining conditional checks
in meson/source code can be removed.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:29 +01:00
Daniel P. Berrangé
2c46d5c216 Revert "apparmor: Allow version-specific bits in profiles"
This reverts commit 19eb8abc9a.

There is no longer any need to dynamically generate version specific
rules. This revert can be reverted, if the need ever arises again
in the future.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:27 +01:00
Daniel P. Berrangé
b8b60c4bee Revert "apparmor: Allow version-specific bits in abstractions too"
This reverts commit 63a312fa2d.

There is no longer any need to dynamically generate version specific
rules. This revert can be reverted, if the need ever arises again
in the future.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:24 +01:00
Daniel P. Berrangé
933494237a apparmor: assume at least apparmor >= 3
By assuming version 3, we can drop all the conditional version
substitutions from the profiles.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:20 +01:00
Daniel P. Berrangé
21b7b02b72 meson: mandate apparmor >= 3.0.0
We can now assume at least version three:

 * Debian 12: 3.0.8
 * openSUSE Leap 15.5: 3.0.4
 * openSUSE Leap 15.6: 3.1.7
 * Ubuntu 22.04: 3.0.4
 * Ubuntu 24.04: 4.0.0

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:27:13 +01:00
Jiri Denemark
52638fb16a Post-release version bump to 11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 12:03:39 +02:00
Jiri Denemark
73329aa737 Release of libvirt-11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 11:59:33 +02:00
김인수
803671de80 Translated using Weblate (Korean)
Currently translated at 98.6% (10775 of 10917 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-03-31 10:55:57 +02:00
Andi Chandler
60d3a62c35 Translated using Weblate (English (United Kingdom))
Currently translated at 48.2% (5270 of 10917 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2025-03-31 10:55:57 +02:00
Harikumar Rajkumar
40f5082683 NEWS: qemu: support block disk along with throttle filters
Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-31 10:52:39 +02:00
Michal Privoznik
0123456789 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: Jiri Denemark <jdenemar@redhat.com>
2025-03-31 09:06:24 +02:00
Peter Krempa
d84b249577 NEWS: Mention bump to qemu-6.2, vhost-user shmem check and stats params discoverabilty
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-28 09:34:55 +01:00
Philipp Schuster
8a48877a5a doc: remove wrong comment
This comment is wrong as later qemuMigrationSrcRun() is called which
checks if TLS should be used and activated. QEMU has built-in support
for TLS, which this refers to.

The comment originates from a time when tunneled support was the only
way to get encryption.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2025-03-26 14:25:43 +01:00
Jim Fehlig
3cb6e14343 lib: virDomain{Save,Restore}Params: Ensure absolute path
When invoking virDomainSaveParams with a relative path, the image is
saved to the daemon's CWD. Similarly, when providing virDomainRestoreParams
with a relative path, it attempts to restore from the daemon's CWD. In most
configurations, the daemon's CWD is set to '/'. Ensure a relative path is
converted to absolute before invoking the driver domain{Save,Restore}Params
functions.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-25 10:24:22 -06:00
Weblate
fa86037eb5 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>
2025-03-25 13:25:31 +01:00
Pavel Hrdina
52e3f3041f qemu_driver: Fix virDomainSaveImageDefineXML
Commit 28a0621528 added support to restore
sparse images but changed the boolean that controls if we open the file
as read-only or read-write. Editing XML in the save image resulted in
following error message:

    failed to write header to domain save file '/data/images/fedora40.save': Bad file descriptor

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-25 12:50:30 +01:00
1483 changed files with 432966 additions and 54913 deletions

463
NEWS.rst
View File

@@ -8,13 +8,402 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v11.2.0 (unreleased)
v11.8.0 (2025-10-01)
====================
* **Security**
* **New features**
* ch: Disk hotplug Support
Users can now attach and detach disks of Cloud Hypervisor domains at
runtime.
* qemu: Add support for NUMA affinity of PCI devices
To support NVIDIA Multi-Instance GPU (MIG) configurations, libvirt now
handles QEMU's acpi-generic-initiator device internally. MIG enables
partitioning a physical GPU into multiple isolated instances, each
associated with one or more virtual NUMA nodes.
On the XML side, the existing ``<acpi>`` element has been extended with a
``nodeset`` attribute to specify the NUMA node affinity of a PCI device.
* **Improvements**
* ch: Events emitting
The CH driver not only emits more domain lifecycle events but also
implements ``virConnectDomainEventRegister()`` and
``virConnectDomainEventDeregister()`` APIs for management applications to
listen on those events.
* **Bug fixes**
* qemu: Fix selection of stateless/combined firmware
A stateless firmware will now be correctly chosen when appropriate,
e.g. for domains configured to use SEV-SNP.
* ch: Make sure the cloud-hypervisor process is killed in ``virCHProcessStop()``
Due to wrong assumptions in the CH driver, calling ``virDomainDestroy()``
did not kill the corresponding cloud-hypervisor process. Domains can be now
destroyed reliably.
v11.7.0 (2025-09-01)
====================
* **New features**
* Allow setting the log level of Cloud Hypervisor
Users can now configure the verbosity of Cloud Hypervisor by setting
the "log_level" option in ch.conf
* bhyve: experimental NAT networking support
The bhyve driver now has experimental NAT networking support
using the Packet Filter (pf) firewall.
* bhyve: domain statistics reporting
The bhyve driver now supports querying domain block, interface,
and memory statistics. Not all statistics fields are supported though.
* **Improvements**
* bhyve: improve 'efi' configuration autofill
When a domain is configured with ``<os firmware='efi'/>``, NVRAM configuration
is now autofilled.
v11.6.0 (2025-08-01)
====================
* **New features**
* Introduce VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag
This new flag for virConnectBaselineHypervisorCPU can be used for computing
a baseline CPU on any host. Without the VIR_CONNECT_BASELINE_CPU_IGNORE_HOST
flag the baseline API would return reasonable output only when run on one of
the hosts that the input CPU definitions were collected from.
* Allow control over QEMU TLS priority strings
The qemu.conf file now has multiple settings allowing control over the
QEMU TLS priority strings, for the different subsystems in QEMU that
can support TLS. This can be used to workaround a current bug in GNUTLS
that is liable to cause crashes of the source QEMU when performing long
running live migration operations with TLS enabled.
* Add support for disabling deprecated CPU model features by default for s390 domains
Starting an s390 domain with host-model will now default to setting the
``deprecated_features`` attribute to ``off``, ensuring the domain starts
with a migration-compatible CPU model to newer systems. This behavior can
be modified by setting the ``default_cpu_deprecated_features`` option in
the qemu.conf file.
* bhyve: Add TCP console support
TCP serial devices can now be configured with ``<serial type='tcp'>``::
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='12345'/>
<target type='serial' port='0'/>
</serial>
Additionally, number of supported consoles increased to 4.
* qemu: Add support for RBD namespaces
Allow specifying the 'namespace' within a RBD image pool.
* **Improvements**
* qemu: Change default SCSI controller model to ``virtio-scsi`` for ARM and RISC-V
The previous default of ``lsilogic`` is unsupported by modern operating
systems. ``virtio-scsi`` is a more suitable default for ARM and RISC-V
``virt`` machine types.
* Clarify documentation of virConnectBaselineHypervisorCPU
The documentation makes it clear virConnectBaselineHypervisorCPU is
supposed to be called on one of the hosts represented in the input CPU
definitions. Otherwise the API will give unexpected results.
* Allow specifying zero discard granularity for block devices
This can be used to tell some guest operating systems (notably Windows) to
not trim the disk.
* bhyve: Add timeout handling for bhyveload
It is now possible to run ``bhyveload`` with the ``timeout`` tool, which
can send ``SIGTERM`` and ``SIGKILL`` signals when timeout is reached.
Timeout values are set using the ``bhyveload_timeout`` and
``bhyveload_timeout_kill`` configuration options in ``bhyve.conf``.
* nss: Improve debugging
Debugging messages from NSS modules can be now enabled by setting the
``LIBVIRT_NSS_DEBUG`` environment variable. So far, there is no special
meaning to its value.
* rpc: Removed requirement for TLS certificates to support 'key encipherment'
With TLS 1.3, key encipherment is not required even for RSA keys. Other key
types didn't even support it so they were wrongly refused even in cases when
they would work with libvirt. The TLS certificate validation now no longer
requires 'key encipherment' to be enabled.
* **Bug fixes**
* bhyve: Fix resetting of the autostart flag of the domain on destroy.
* The nwfilter driver no longer recreates the base iptable/ip6tables chains
The nwfilter driver had a impl mistake causing it to recreate the
base chains for iptables/ip6tables every time a VM was started.
This allowed a small window where traffic might not be fully
filtered. It now handles iptables/ip6tables the same way as
ebtables, creating the base chains only if they did not already
exist.
* Fix systemd unit ordering for auto-shutdown of domains via the daemon
The ordering of systemd units created by libvirt for individual machines
needed to be adapted when the shutdown of VMs on host shutdown is done
via the virt daemon itself (rather than ``libvirt-guests.service``) to
ensure that the VMs are not terminated before the virt daemon can deal with
them.
v11.5.0 (2025-07-01)
====================
* **Removed features**
* qemu: Don't accept VIR_DUMP_LIVE flag in virDomainCoreDumpWithFormat()
Unfortunately, QEMU always pauses vCPUs when doing a core dump. Therefore,
there is no way for Libvirt to honor VIR_DUMP_LIVE flag semantics. Instead
of silently pretending the flag works, an appropriate error is now
reported.
* **New features**
* vmx: Add support for reporting NVMe disks in the domain XML
* qemu: Add support for NVMe disks
NVMe disks can now be emulated by using an ``nvme`` bus, but require a
serial due to the hypervisor::
<target dev='nvme0n1' bus='nvme'/>
<serial>qwertyuiop</serial>
Multiple disks can be represented as different namespaces on the same
controller, but they cannot have a different serial number due to the fact
that it is the controller which ultimately has the serial number attached to
it, but for ease of use it is automatically copied from the disk serial.
* esx: Add support for specifying alternative CA bundle for remote peer verification
Users can now use ``cacert`` parameter in the URI to specify a file path
with CA certificate(s) that will be used for remote peer certificate
validation.
* qemu: add support for AMD IOMMU device
The ``amd`` model for the ``<iommu>`` device is now supported.
New attributes ``passtrhough`` and ``xtsup`` are also supported for this
model.
* **Improvements**
* Include supported console types in domain capabilities
Domain capabilities now include information about supported console types, such as::
<console supported='yes'>
<enum name='type'>
<value>pty</value>
<value>tcp</value>
</enum>
</console>
* virsh: Add waiting for domain state via ``virsh await``
The new helper command ``virsh await`` simplifies waiting on domain state
which is normally announced via events. Currently two waiting conditions are
implemented: ``domain-inactive``, and ``guest-agent-available``.
* **Bug fixes**
* qemu: Be more forgiving when acquiring QUERY job when formatting domain XML
Since ``libvirt-11.0.0`` the ``virDomainGetXMLDesc()`` API used to format
domain XML acquires QUERY job. But this caused a regression when the API
might timeout for incoming migration. This is now fixed.
* qemu: Fix shared filesystem detection on nonexistent paths
Since ``libvirt-11.1.0`` nonexistent paths within directories marked as
shared filesystem (via the ``shared_filesystems`` option in ``qemu.conf``
would not be properly detected as being on a shared filesystem.
* qemu: Properly emulate USB cdrom device
CD-ROM devices on USB bus are now properly emulated as such which was not
the case since libvirt switched to the modern qemu commandline syntax for
storage backends.
v11.4.0 (2025-06-02)
====================
* **New features**
* qemu: ppc64 POWER11 processor support
Support for the recently released IBM POWER11 processor was added.
* **Packaging changes**
* All helper programs are now detected from ``$PATH`` during runtime
All of the code was now converted to dynamically look up helper programs
in ``$PATH`` rather than doing the lookup at build time and then compiling
in the result.
Programs ``mount``, ``umount``, ``mkfs``, ``modprobe``, ``rmmod``,
``numad``, ``dmidecode``, ``ip``, ``tc``, ``mdevctl``, ``mm-ctl``,
``iscsiadm``, ``ovs-vsctl``, ``pkttyagent``, ``bhyveload``, ``bhyvectl``,
``bhyve``, ``ifconfig``, ``vzlist``, ``vzctl``, ``vzmigrate``, and the
tools from the lvm suite (``vgchange``, ``lvcreate``, etc..) are now not
needed during build and will still work properly if placed in ``$PATH``.
This also ensures that libvirt works correctly on distros that are
transitioning ``/sbin`` into ``/bin`` and upgraded installations have
a different layout from fresh installations.
* **Improvements**
* virsh: Add option ``--no-pkttyagent``
That option suppresses registration of pkttyagent with polkitd.
* bhyve: support NVRAM configuration for UEFI firmwares
The bhyve driver now supports specifying NVRAM store file, such as::
<os firmware='efi'>
<nvram/>
</os>
* qemu: Improve accuracy of FDC/floppy device support statement in capabilities XML
The data is now based on the presence of the controller in qemu rather than
just a denylist of machine types where floppies not work.
* **Bug fixes**
* qemu: Fix failure when reverting to internal snapshots
A regression in ``libvirt-11.2`` and ``libvirt-11.3`` prevents reverting to
an internal snapshot. Attempts to revert would produce the following error::
error: operation failed: load of internal snapshot 'foo1' job failed: Device 'libvirt-1-format' is writable but does not support snapshots
The only workaround is to avoid the broken versions.
* qemu: Fix virtqemud crash when resuming failed post-copy migration
A regression introduced in ``libvirt-11.2.0`` caused virtqemud on the
destination host to crash when trying to resume failed post-copy
migration.
* qemu: Treat the ``queues`` configuration of ``virtio-net`` as guest ABI
The queue count itself isn't a device frontend property but libvirt uses
it to calculate ``vectors`` option of the device which is a guest OS visible
property, thus ``queues`` must not change during migration. The ABI stability
check now handles this properly.
v11.3.0 (2025-05-02)
====================
* **Removed features**
* Support for AppArmor versions prior to 3.0.0 has been dropped.
* **New features**
* xen: Support configuration of ``<hyperv/>`` flags for Xen domains.
The following flags are now configurable for Xen: ``vapic``, ``synic``,
``stimer``, ``frequencies``, ``tlbflush`` and ``ipi``.
* bhyve: Support virtio random number generator devices
Domain XMLs can now include virtio random number generator devices.
They are configured with::
<rng model='virtio'>
<backend model='random'/>
</rng>
* bhyve: Support ``<interface type='network'>``
At the moment it doesn't provide any new features compared to
``<interface type='bridge'>``, but allows a more flexible configuration.
* **Bug fixes**
* cpu_map: Install Ampere-1 ARM CPU models
The Ampere-1 CPU models added in the previous release were not properly
installed and thus every attempt to start an ARM domain with custom
CPU definition would fail.
* storage: Fix new volume creation
No more errors occur when new storage volume is being created using ``virsh
vol-create`` with ``--validate`` option and/or ``virStorageVolCreateXML()``
with ``VIR_VOL_XML_PARSE_VALIDATE`` flag.
* Don't spam logs 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.
* Fix libvirt daemon crash on failure to hotplug a disk into a ``qemu`` VM
Some failures of disk hotplug could cause the libvirt daemon to crash due
to a bug when rolling back disk throttling filters.
v11.2.0 (2025-04-01)
====================
* **Removed features**
* Remove support for qemu-6.1 and older
Libvirt now requires *qemu-6.2* or newer based on our platform support
policy.
* **New features**
* qemu: Add new 'image_format' parameter to virDomainSaveParams
@@ -75,6 +464,26 @@ v11.2.0 (unreleased)
system are printed. A user may specify ``--all`` to also print models which
are not supported on the host.
* qemu: Introduce os/shim element
For secure boot environments where ``<loader/>`` is signed, it may be
unfeasible to keep the binary up to date (esp. when revoking certificates
contained within). To address that, new ``<shim/>`` element is introduced
which allows hypervisor to side load another UEFI binary, which can then
contain new certification authorities and/or list of revocations.
* ch: Enable SEV SNP support
Cloud Hypervisor guests can be now started with SEV SNP enabled.
* qemu: Support for Block Disk Along with Throttle Filters
Introduce support for multiple throttle groups per block disk in QEMU,
enhancing I/O control and performance optimization. This update builds
on the existing throttling functionality by allowing more granular control
with the ability to assign different throttle groups to multiple block
devices, improving shared throttling across devices.
* **Improvements**
* qemu: Improved guest agent corner case error reporting
@@ -87,6 +496,28 @@ v11.2.0 (unreleased)
The new error codes are ``VIR_ERR_AGENT_COMMAND_TIMEOUT`` and
``VIR_ERR_AGENT_COMMAND_FAILED``.
* qemu: Use common check for shared memory use for ``vhost-user`` network devices
Historically libvirt printed only a warning if the ``vhost-user`` network
was misconfigured. Since we enforce proper configuration for other device
types using ``vhost-user`` it is now enforced also for network devices and
prints an actual error on misconfiguration.
* Introduce constants for discoverability of entries in bulk stats APIs
Libvirt introduced constants exposed by our API description XML which allows
discoverability of new entries in typed parameter names returned by
``virConnectGetAllDomainStats``, ``virDomainListGetStats``, and
``virDomainGetGuestInfo``.
* qemu: Reflect MAC address change in live domain XML
When a guest changes MAC address on one of its vNICs the new MAC address is
now visible in the live XML under ``currentAddress`` attribute of
``<mac/>`` element. At the same time,
``VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE`` event is emitted so that management
applications can update their internal state.
* **Bug fixes**
* qemu: attach virtio-mem with CCW address
@@ -95,6 +526,11 @@ v11.2.0 (unreleased)
default type CCW address assigned. A specified CCW address is now used for
the virtio-mem device instead of getting overwritten by a PCI address.
* ch: Various memory leak fixes
There were some memory leaks identified in the Cloud Hypervisor driver.
They are fixed now.
v11.1.0 (2025-03-03)
====================
@@ -131,7 +567,7 @@ v11.1.0 (2025-03-03)
* ch: Support handling events from cloud-hypervisor
The ch driver now supports handling events from the cloud-hypervisor.
Events include VM lifecyle operations such as shutdown, pause, resume,
Events include VM lifecycle operations such as shutdown, pause, resume,
etc. Libvirt will now read these events and take actions such as
updating domain state, etc.
@@ -285,7 +721,7 @@ v10.10.0 (2024-12-02)
* qemu: Support for the 'data-file' QCOW2 image feature
The QEMU hypervisor driver now supports QCOW2 images with 'data-file'
feature present (both when probing form the image itself and when specified
feature present (both when probing from the image itself and when specified
explicitly via ``<dataStore>`` element). This can be useful when it's
required to keep data "raw" on disk, but the use case requires features
of the QCOW2 format such as incremental backups.
@@ -367,7 +803,7 @@ v10.9.0 (2024-11-01)
warning : qemuSnapshotActiveInternalDeleteGetDevices:3841 : inconsistent internal snapshot state (deletion): VM='snap' snapshot='1727959843' missing='vda ' unexpected='' extra=''
Users are encouraged to report any occurence of the above message along
Users are encouraged to report any occurrence of the above message along
with steps they took to the upstream tracker.
* qemu: improve documentation of image format settings
@@ -384,6 +820,7 @@ v10.9.0 (2024-11-01)
``<blockers model='...'>`` element is added for that CPU model listing
features required by the CPU model, but not supported on the host.
v10.8.0 (2024-10-01)
====================
@@ -402,7 +839,7 @@ v10.8.0 (2024-10-01)
the bridge interface (normally it would not be set, as is done
with other forward modes).
* storage: Lessen dependancy on the ``showmount`` program
* storage: Lessen dependency on the ``showmount`` program
Libvirt now automatically detects presence of ``showmount`` during runtime
as we do with other helper programs and also the
@@ -449,7 +886,7 @@ v10.8.0 (2024-10-01)
* 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.
monitoring APIs are called during a backup job.
* Fix various memleaks and overflows
@@ -519,6 +956,7 @@ v10.7.0 (2024-09-02)
Cloud-Hypervisor driver now supports Ethernet, Network (NAT) and Bridge
networking modes.
v10.6.0 (2024-08-05)
====================
@@ -956,7 +1394,7 @@ v10.1.0 (2024-03-01)
``virt-admin`` doesn't try to guess the URI of the daemon to manage so a
failure to connect may be confusing for users if modular daemons are used.
Add a hint to use the URI of the dameon to manage.
Add a hint to use the URI of the daemon to manage.
* **Bug fixes**
@@ -1002,7 +1440,7 @@ v10.1.0 (2024-03-01)
* qemu: Fix reservation of manually specified port for disk migration
A manually specified port would not be relased after disk migration making
A manually specified port would not be released after disk migration making
it impossible to use it again.
@@ -1355,7 +1793,8 @@ v9.5.0 (2023-07-03)
* **Bug fixes**
* lxc: Allow seeking in ``/proc/meminfo`` to resove failure with new ``procps`` package
* lxc: Allow seeking in ``/proc/meminfo`` to resolve failure with new
``procps`` package
New version of the ``free`` command from ``procps`` package seeks into the
``/proc/meminfo`` file, which was not supported by the instance of the file
@@ -5597,7 +6036,7 @@ v4.5.0 (2018-07-02)
* qemu: Fix a potential libvirtd crash on VM reconnect
Initialization of the driver worker pool needs to come before libvirtd
trying to reconnect to all machines, since one of the QEMU processes migh
trying to reconnect to all machines, since one of the QEMU processes might
have already emitted events which need to be handled prior to us getting to
the worker pool initialization.
@@ -6937,7 +7376,7 @@ v3.0.0 (2017-01-17)
* Event notifications for the secret object
The secret object now supports event notifications, covering lifcycle
The secret object now supports event notifications, covering lifecycle
changes and secret value changes.
* New localPtr attribute for "ip" element in network XML

View File

@@ -6,6 +6,7 @@ FLAKE8 = @flake8_path@
BLACK = @black_path@
RUNUTF8 = @runutf8@
PYTHON = @PYTHON3@
PERL = @PERL@
GREP = @GREP@
SED = @SED@
AWK = @AWK@

View File

@@ -13,23 +13,10 @@ if git and tests_enabled[0]
if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin'
make_prog = find_program('gmake')
sed_prog = find_program('gsed')
grep_prog = find_program('ggrep')
else
make_prog = find_program('make')
sed_prog = find_program('sed')
endif
if host_machine.system() == 'freebsd'
grep_prog = find_program('grep')
grep_cmd = run_command(grep_prog, '--version', check: true)
if grep_cmd.stdout().startswith('grep (BSD grep')
grep_prog = find_program('/usr/local/bin/grep', required: false)
if not grep_prog.found()
error('GNU grep not found')
endif
endif
elif host_machine.system() == 'darwin'
grep_prog = find_program('ggrep')
else
grep_prog = find_program('grep')
endif
@@ -42,6 +29,7 @@ if git and tests_enabled[0]
'black_path': black_path,
'runutf8': ' '.join(runutf8),
'PYTHON3': python3_prog.full_path(),
'PERL': perl_prog.full_path(),
'GREP': grep_prog.full_path(),
'SED': sed_prog.full_path(),
'AWK': awk_prog.full_path(),

View File

@@ -247,6 +247,12 @@ sc_prohibit_canonicalize_file_name:
halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \
$(_sc_search_regexp)
sc_prohibit_realpath:
@prohibit='\<realpath\(' \
exclude='exempt from syntax-check' \
halt='use virFileCanonicalizePath() instead of realpath()' \
$(_sc_search_regexp)
# qsort from glibc has unstable sort ordering for "equal" members
sc_prohibit_qsort:
@prohibit='\<(qsort|qsort_r) *\(' \
@@ -1326,9 +1332,9 @@ sc_spacing-check:
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl || \
{ echo 'incorrect formatting' 1>&2; exit 1; }
sc_mock-noinline:
sc_mockable-attribute:
$(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | $(RUNUTF8) \
$(PYTHON) $(top_srcdir)/scripts/mock-noinline.py
$(PYTHON) $(top_srcdir)/scripts/mockable-attribute.py
sc_header-ifdef:
$(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[h]$$' | $(RUNUTF8) xargs \
@@ -1349,6 +1355,13 @@ sc_rst_since:
halt='format :since: correctly' \
$(_sc_search_regexp)
sc_prohibit_inline_functions:
@prohibit='\binline\b' \
in_vc_files='\.c$$' \
exclude='exempt from syntax-check' \
halt='avoid inline functions in .c files' \
$(_sc_search_regexp)
## ---------- ##
## Exceptions ##
@@ -1413,8 +1426,11 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \
exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \
^(build-aux/syntax-check\.mk|tests/virfilemock\.c)$$
exclude_file_name_regexp--sc_prohibit_realpath = \
^(build-aux/syntax-check\.mk|src/cpu_map/sync_qemu_features_i386\.py|tests/virfilemock\.c)$$
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
^(docs/advanced-tests\.rst|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c|tools/nss/libvirt_nss(_leases|_macs)?\.c)$$
^(docs/advanced-tests\.rst|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c|tools/nss/libvirt_nss(_leases|_log|_macs)?\.[ch])$$
exclude_file_name_regexp--sc_prohibit_readlink = \
^src/(util/virutil|lxc/lxc_container)\.c$$
@@ -1506,6 +1522,9 @@ exclude_file_name_regexp--sc_black = \
exclude_file_name_regexp--sc_spacing-check = \
^scripts/rpcgen/tests/test_demo\.[ch]$$
exclude_file_name_regexp--sc_prohibit_inline_functions = \
^src/storage_file/storage_source.*.c$$
## -------------- ##
## Implementation ##
## -------------- ##

View File

@@ -33,12 +33,7 @@ function install_buildenv() {
glibc-langpack-en \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-docutils \
python3-flake8 \

View File

@@ -29,10 +29,8 @@ function install_buildenv() {
glib-dev \
gnutls-dev \
grep \
iproute2 \
iptables \
json-c-dev \
kmod \
libcap-ng-dev \
libnl3-dev \
libpcap-dev \
@@ -44,19 +42,15 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
libxslt \
lvm2 \
lvm2-dev \
make \
meson \
musl-dev \
netcf-dev \
nfs-utils \
numactl-dev \
open-iscsi \
parted-dev \
perl \
pkgconf \
polkit \
py3-docutils \
py3-flake8 \
py3-pytest \

View File

@@ -29,10 +29,8 @@ function install_buildenv() {
glib-dev \
gnutls-dev \
grep \
iproute2 \
iptables \
json-c-dev \
kmod \
libcap-ng-dev \
libnl3-dev \
libpcap-dev \
@@ -44,19 +42,15 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
libxslt \
lvm2 \
lvm2-dev \
make \
meson \
musl-dev \
netcf-dev \
nfs-utils \
numactl-dev \
open-iscsi \
parted-dev \
perl \
pkgconf \
polkit \
py3-docutils \
py3-flake8 \
py3-pytest \

View File

@@ -34,12 +34,7 @@ function install_buildenv() {
glibc-langpack-en \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -59,17 +54,13 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-docutils \
python3-flake8 \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -26,9 +26,6 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -65,16 +62,11 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -77,7 +69,6 @@ function install_buildenv() {
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -77,7 +69,6 @@ function install_buildenv() {
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
@@ -86,7 +77,6 @@ function install_buildenv() {
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \
systemtap-sdt-dev:armhf
mkdir -p /usr/local/share/meson/cross

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -77,7 +69,6 @@ function install_buildenv() {
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -24,23 +24,15 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -26,9 +26,6 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -65,16 +62,11 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -33,12 +33,7 @@ function install_buildenv() {
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -23,22 +23,13 @@ function install_buildenv() {
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -23,22 +23,13 @@ function install_buildenv() {
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -9,7 +9,7 @@ function install_buildenv() {
dnf install -y \
audit-libs-devel \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
clang \
@@ -33,12 +33,7 @@ function install_buildenv() {
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -82,6 +73,7 @@ function install_buildenv() {
systemd-devel \
systemd-rpm-macros \
systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \
xen-devel
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED

View File

@@ -24,22 +24,13 @@ function install_buildenv() {
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -24,22 +24,13 @@ function install_buildenv() {
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -34,12 +34,7 @@ function install_buildenv() {
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -59,17 +54,13 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \

View File

@@ -33,9 +33,6 @@ function install_buildenv() {
glibc-locale \
glusterfs-devel \
grep \
iproute2 \
iptables \
kmod \
libacl-devel \
libapparmor-devel \
libattr-devel \
@@ -60,17 +57,12 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja \
numad \
open-iscsi \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3-base \
python3-docutils \
python3-flake8 \

View File

@@ -32,9 +32,6 @@ function install_buildenv() {
glibc-locale \
glusterfs-devel \
grep \
iproute2 \
iptables \
kmod \
libacl-devel \
libapparmor-devel \
libattr-devel \
@@ -59,17 +56,12 @@ function install_buildenv() {
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja \
numad \
open-iscsi \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3-base \
python3-black \
python3-docutils \

View File

@@ -26,9 +26,6 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -66,16 +63,11 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -26,9 +26,6 @@ function install_buildenv() {
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -66,16 +63,11 @@ function install_buildenv() {
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \

View File

@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8'
PKGS='augeas bash-completion ca_root_nss ccache4 codespell cppi curl cyrus-sasl diffutils fusefs-libs gettext git glib gmake gnugrep gnutls gsed json-c libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PKGS='augeas bash-completion ca_root_nss ccache4 codespell cppi curl cyrus-sasl diffutils fusefs-libs gettext git glib gmake gnugrep gnutls gsed json-c libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PYPI_PKGS=''
PYTHON='/usr/local/bin/python3'

View File

@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip'
PKGS='augeas bash-completion ca_root_nss ccache4 codespell cppi curl cyrus-sasl diffutils fusefs-libs gettext git glib gmake gnugrep gnutls gsed json-c libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PKGS='augeas bash-completion ca_root_nss ccache4 codespell cppi curl cyrus-sasl diffutils fusefs-libs gettext git glib gmake gnugrep gnutls gsed json-c libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PYPI_PKGS=''
PYTHON='/usr/local/bin/python3'

View File

@@ -34,12 +34,7 @@ RUN dnf update -y && \
glibc-langpack-en \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -59,17 +54,13 @@ RUN dnf update -y && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-docutils \
python3-flake8 \
@@ -97,8 +88,8 @@ RUN dnf update -y && \
RUN /usr/bin/pip3 install black
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/alpine:3.21
FROM docker.io/library/alpine:3.22
RUN apk update && \
apk upgrade && \
@@ -30,10 +30,8 @@ RUN apk update && \
glib-dev \
gnutls-dev \
grep \
iproute2 \
iptables \
json-c-dev \
kmod \
libcap-ng-dev \
libnl3-dev \
libpcap-dev \
@@ -45,19 +43,15 @@ RUN apk update && \
libxml2-dev \
libxml2-utils \
libxslt \
lvm2 \
lvm2-dev \
make \
meson \
musl-dev \
netcf-dev \
nfs-utils \
numactl-dev \
open-iscsi \
parted-dev \
perl \
pkgconf \
polkit \
py3-docutils \
py3-flake8 \
py3-pytest \
@@ -76,8 +70,8 @@ RUN apk update && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -30,10 +30,8 @@ RUN apk update && \
glib-dev \
gnutls-dev \
grep \
iproute2 \
iptables \
json-c-dev \
kmod \
libcap-ng-dev \
libnl3-dev \
libpcap-dev \
@@ -45,19 +43,15 @@ RUN apk update && \
libxml2-dev \
libxml2-utils \
libxslt \
lvm2 \
lvm2-dev \
make \
meson \
musl-dev \
netcf-dev \
nfs-utils \
numactl-dev \
open-iscsi \
parted-dev \
perl \
pkgconf \
polkit \
py3-docutils \
py3-flake8 \
py3-pytest \
@@ -76,8 +70,8 @@ RUN apk update && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -35,12 +35,7 @@ RUN dnf distro-sync -y && \
glibc-langpack-en \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -60,17 +55,13 @@ RUN dnf distro-sync -y && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-docutils \
python3-flake8 \
@@ -98,8 +89,8 @@ RUN dnf distro-sync -y && \
RUN /usr/bin/pip3 install black
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture arm64 && \
@@ -120,5 +112,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
ENV ABI "aarch64-linux-gnu"
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
ENV ABI="aarch64-linux-gnu"
ENV MESON_OPTS="--cross-file=aarch64-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armel && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-gcc
ENV ABI "arm-linux-gnueabi"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
ENV ABI="arm-linux-gnueabi"
ENV MESON_OPTS="--cross-file=arm-linux-gnueabi"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armhf && \
@@ -120,5 +112,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
ENV ABI "arm-linux-gnueabihf"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
ENV ABI="arm-linux-gnueabihf"
ENV MESON_OPTS="--cross-file=arm-linux-gnueabihf"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture i386 && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-gcc
ENV ABI "i686-linux-gnu"
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
ENV ABI="i686-linux-gnu"
ENV MESON_OPTS="--cross-file=i686-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mips64el && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-gcc
ENV ABI "mips64el-linux-gnuabi64"
ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"
ENV ABI="mips64el-linux-gnuabi64"
ENV MESON_OPTS="--cross-file=mips64el-linux-gnuabi64"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mipsel && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-gcc
ENV ABI "mipsel-linux-gnu"
ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
ENV ABI="mipsel-linux-gnu"
ENV MESON_OPTS="--cross-file=mipsel-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture ppc64el && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-gcc
ENV ABI "powerpc64le-linux-gnu"
ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"
ENV ABI="powerpc64le-linux-gnu"
ENV MESON_OPTS="--cross-file=powerpc64le-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture s390x && \
@@ -119,5 +111,5 @@ endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-gcc
ENV ABI "s390x-linux-gnu"
ENV MESON_OPTS "--cross-file=s390x-linux-gnu"
ENV ABI="s390x-linux-gnu"
ENV MESON_OPTS="--cross-file=s390x-linux-gnu"

View File

@@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -67,16 +64,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -96,8 +88,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture arm64 && \
@@ -120,5 +112,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
ENV ABI "aarch64-linux-gnu"
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
ENV ABI="aarch64-linux-gnu"
ENV MESON_OPTS="--cross-file=aarch64-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armel && \
@@ -88,7 +80,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \
@@ -118,5 +109,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-gcc
ENV ABI "arm-linux-gnueabi"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
ENV ABI="arm-linux-gnueabi"
ENV MESON_OPTS="--cross-file=arm-linux-gnueabi"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armhf && \
@@ -88,7 +80,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
@@ -97,7 +88,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \
systemtap-sdt-dev:armhf && \
eatmydata apt-get autoremove -y && \
@@ -119,5 +109,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
ENV ABI "arm-linux-gnueabihf"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
ENV ABI="arm-linux-gnueabihf"
ENV MESON_OPTS="--cross-file=arm-linux-gnueabihf"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture i386 && \
@@ -88,7 +80,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
@@ -118,5 +109,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-gcc
ENV ABI "i686-linux-gnu"
ENV MESON_OPTS "--cross-file=i686-linux-gnu"
ENV ABI="i686-linux-gnu"
ENV MESON_OPTS="--cross-file=i686-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mips64el && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-gcc
ENV ABI "mips64el-linux-gnuabi64"
ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"
ENV ABI="mips64el-linux-gnuabi64"
ENV MESON_OPTS="--cross-file=mips64el-linux-gnuabi64"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture ppc64el && \
@@ -119,5 +111,5 @@ endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-gcc
ENV ABI "powerpc64le-linux-gnu"
ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"
ENV ABI="powerpc64le-linux-gnu"
ENV MESON_OPTS="--cross-file=powerpc64le-linux-gnu"

View File

@@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \
libnbd-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -55,11 +47,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture s390x && \
@@ -119,5 +111,5 @@ endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-gcc
ENV ABI "s390x-linux-gnu"
ENV MESON_OPTS "--cross-file=s390x-linux-gnu"
ENV ABI="s390x-linux-gnu"
ENV MESON_OPTS="--cross-file=s390x-linux-gnu"

View File

@@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -67,16 +64,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -96,8 +88,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -44,12 +44,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -69,17 +64,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -105,8 +96,8 @@ exec "$@"\n' > /usr/bin/nosync && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:41
FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@@ -34,22 +34,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -63,11 +54,11 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf clean all -y && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN nosync dnf install -y \
mingw32-curl \
@@ -88,5 +79,5 @@ RUN nosync dnf install -y \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-gcc
ENV ABI "i686-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"
ENV ABI="i686-w64-mingw32"
ENV MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw32.meson"

View File

@@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:41
FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@@ -34,22 +34,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -63,11 +54,11 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf clean all -y && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN nosync dnf install -y \
mingw64-curl \
@@ -88,5 +79,5 @@ RUN nosync dnf install -y \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc
ENV ABI "x86_64-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
ENV ABI="x86_64-w64-mingw32"
ENV MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw64.meson"

View File

@@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40
FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf install -y \
audit-libs-devel \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
clang \
@@ -44,12 +44,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -69,17 +64,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -93,6 +84,7 @@ exec "$@"\n' > /usr/bin/nosync && \
systemd-devel \
systemd-rpm-macros \
systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \
xen-devel && \
nosync dnf autoremove -y && \
@@ -104,8 +96,8 @@ exec "$@"\n' > /usr/bin/nosync && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -35,22 +35,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -64,11 +55,11 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf clean all -y && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN nosync dnf install -y \
mingw32-curl \
@@ -89,5 +80,5 @@ RUN nosync dnf install -y \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-gcc
ENV ABI "i686-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"
ENV ABI="i686-w64-mingw32"
ENV MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw32.meson"

View File

@@ -35,22 +35,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \
glibc-langpack-en \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \
libxml2 \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numad \
perl-base \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -64,11 +55,11 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf clean all -y && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"
RUN nosync dnf install -y \
mingw64-curl \
@@ -89,5 +80,5 @@ RUN nosync dnf install -y \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc
ENV ABI "x86_64-w64-mingw32"
ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
ENV ABI="x86_64-w64-mingw32"
ENV MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw64.meson"

View File

@@ -45,12 +45,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \
gnutls-devel \
grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \
kmod \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -70,17 +65,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja-build \
numactl-devel \
numad \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3 \
python3-black \
python3-docutils \
@@ -106,8 +97,8 @@ exec "$@"\n' > /usr/bin/nosync && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -34,9 +34,6 @@ RUN zypper update -y && \
glibc-locale \
glusterfs-devel \
grep \
iproute2 \
iptables \
kmod \
libacl-devel \
libapparmor-devel \
libattr-devel \
@@ -61,17 +58,12 @@ RUN zypper update -y && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja \
numad \
open-iscsi \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3-base \
python3-docutils \
python3-flake8 \
@@ -98,8 +90,8 @@ RUN zypper update -y && \
RUN /usr/bin/pip3 install black
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -33,9 +33,6 @@ RUN zypper dist-upgrade -y && \
glibc-locale \
glusterfs-devel \
grep \
iproute2 \
iptables \
kmod \
libacl-devel \
libapparmor-devel \
libattr-devel \
@@ -60,17 +57,12 @@ RUN zypper dist-upgrade -y && \
libxml2 \
libxml2-devel \
libxslt \
lvm2 \
make \
meson \
nfs-utils \
ninja \
numad \
open-iscsi \
parted-devel \
perl-base \
pkgconfig \
polkit \
python3-base \
python3-black \
python3-docutils \
@@ -94,8 +86,8 @@ RUN zypper dist-upgrade -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -68,16 +65,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -97,8 +89,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
@@ -68,16 +65,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
polkitd \
python3 \
python3-docutils \
python3-pytest \
@@ -97,8 +89,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
ENV CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
ENV LANG="en_US.UTF-8"
ENV MAKE="/usr/bin/make"
ENV NINJA="/usr/bin/ninja"
ENV PYTHON="/usr/bin/python3"

View File

@@ -33,15 +33,15 @@ x86_64-almalinux-9-clang:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9
x86_64-alpine-321:
x86_64-alpine-322:
extends: .native_build_job
needs:
- job: x86_64-alpine-321-container
- job: x86_64-alpine-322-container
optional: true
allow_failure: false
variables:
NAME: alpine-321
TARGET_BASE_IMAGE: docker.io/library/alpine:3.21
NAME: alpine-322
TARGET_BASE_IMAGE: docker.io/library/alpine:3.22
x86_64-alpine-edge:
@@ -103,21 +103,6 @@ x86_64-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
x86_64-fedora-40:
extends: .native_build_job
needs:
- job: x86_64-fedora-40-container
optional: true
allow_failure: false
variables:
NAME: fedora-40
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40
artifacts:
expire_in: 1 day
paths:
- libvirt-rpms
x86_64-fedora-41:
extends: .native_build_job
needs:
@@ -133,6 +118,21 @@ x86_64-fedora-41:
- libvirt-rpms
x86_64-fedora-42:
extends: .native_build_job
needs:
- job: x86_64-fedora-42-container
optional: true
allow_failure: false
variables:
NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
artifacts:
expire_in: 1 day
paths:
- libvirt-rpms
x86_64-fedora-rawhide:
extends: .native_build_job
needs:
@@ -416,29 +416,29 @@ s390x-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
mingw32-fedora-41:
mingw32-fedora-42:
extends: .cross_build_job
needs:
- job: mingw32-fedora-41-container
- job: mingw32-fedora-42-container
optional: true
allow_failure: false
variables:
CROSS: mingw32
JOB_OPTIONAL: 1
NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
mingw64-fedora-41:
mingw64-fedora-42:
extends: .cross_build_job
needs:
- job: mingw64-fedora-41-container
- job: mingw64-fedora-42-container
optional: true
allow_failure: false
variables:
CROSS: mingw64
NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
mingw32-fedora-rawhide:

View File

@@ -14,11 +14,11 @@ x86_64-almalinux-9-container:
NAME: almalinux-9
x86_64-alpine-321-container:
x86_64-alpine-322-container:
extends: .container_job
allow_failure: false
variables:
NAME: alpine-321
NAME: alpine-322
x86_64-alpine-edge-container:
@@ -49,13 +49,6 @@ x86_64-debian-sid-container:
NAME: debian-sid
x86_64-fedora-40-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-40
x86_64-fedora-41-container:
extends: .container_job
allow_failure: false
@@ -63,6 +56,13 @@ x86_64-fedora-41-container:
NAME: fedora-41
x86_64-fedora-42-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-42
x86_64-fedora-rawhide-container:
extends: .container_job
allow_failure: true
@@ -220,19 +220,19 @@ s390x-debian-sid-container:
NAME: debian-sid-cross-s390x
mingw32-fedora-41-container:
mingw32-fedora-42-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: fedora-41-cross-mingw32
NAME: fedora-42-cross-mingw32
mingw64-fedora-41-container:
mingw64-fedora-42-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-41-cross-mingw64
NAME: fedora-42-cross-mingw64
mingw32-fedora-rawhide-container:

View File

@@ -27,9 +27,6 @@ packages:
- glusterfs
- gnutls
- grep
- ip
- iptables
- iscsiadm
- json-c
- libacl
- libattr
@@ -54,16 +51,12 @@ packages:
- libtirpc
- libudev
- libxml2
- lvm2
- make
- meson
- modprobe
- netcf
- ninja
- numad
- openwsman
- perl
- pkcheck
- pkg-config
- portablexdr
- python3
@@ -74,10 +67,8 @@ packages:
- rpmbuild
- sanlock
- sed
- showmount
- systemd-rpm-macros
- systemtap
- tc
- wireshark
- xen
- xmllint

View File

@@ -19,7 +19,7 @@ targets:
RPM: skip
CC: clang
alpine-321: x86_64
alpine-322: x86_64
alpine-edge:
jobs:
@@ -104,7 +104,7 @@ targets:
containers: false
builds: false
fedora-40:
fedora-41:
jobs:
- arch: x86_64
artifacts:
@@ -112,7 +112,7 @@ targets:
paths:
- libvirt-rpms
fedora-41:
fedora-42:
jobs:
- arch: x86_64
artifacts:

View File

@@ -332,16 +332,6 @@ Backup
Create online, thin provisioned full and incremental or differential backups
of your kvm/qemu virtual machines.
Other
-----
`Cuckoo Sandbox <https://cuckoosandbox.org/>`__
Cuckoo Sandbox is a malware analysis system. You can throw any
suspicious file at it and in a matter of seconds Cuckoo will provide
you back some detailed results outlining what such file did when
executed inside an isolated environment. And libvirt is one of the
backends that can be used for the isolated environment.
.. |libvirt powered 96| image:: logos/logo-square-powered-96.png
.. |libvirt powered 128| image:: logos/logo-square-powered-128.png
.. |libvirt powered 192| image:: logos/logo-square-powered-192.png

View File

@@ -76,6 +76,20 @@ Linux Distribution specific bug reports
like to have your procedure for filing bugs mentioned here, please mail the
libvirt development list.
Use of automated tools / AI agents
----------------------------------
If any automated tool / AI agent is used to identify a bug / security
flaw, the following additional expectations apply when filing a report:
- The tool / agent used **MUST** be clearly declared in the description
- All stated facts **MUST** be validated as correct and free from AI
hallucinations prior to filing
- The problem **MUST** be described against an upstream release that is
no more than 3 months old.
- The problem **SHOULD** be analysed and accompanied with a proposed
patch that can be directly applied to current git
How to file high quality bug reports
------------------------------------

View File

@@ -633,7 +633,7 @@ analysis tools understand the code better:
``G_GNUC_FALLTHROUGH``
allow code reuse by multiple switch cases
``G_NO_INLINE``
``ATTRIBUTE_MOCKABLE``
the function is mocked in the test suite
``G_GNUC_NORETURN``

View File

@@ -105,8 +105,8 @@ Notes:
~~~~~~
By default when the ``meson`` is run from within a GIT checkout, it will turn
on -Werror for builds. This can be disabled with --werror=false, but this is
not recommended.
on -Werror for builds. This can be disabled with
``-Dwerror=false -Dgit_werror=disabled``, but this is not recommended.
Please ensure that you have the appropriate minimal ``meson`` version installed
in your build environment. The minimal version for a specific package can be

View File

@@ -91,6 +91,32 @@ pre {
padding: 1em;
}
.admonition-title {
font-size: 110%;
font-weight: bold;
}
div.admonition,
aside.admonition {
border: 1px solid #999999;
}
.admonition p {
padding: 0 1em 0 1em;
}
.note .admonition-title {
margin: 0;
padding: 0.5em 1em 0.5em 1em;
background: #6cb5ac;
}
.warning .admonition-title {
margin: 0;
padding: 0.5em 1em 0.5em 1em;
background: #ffcc44;
}
a {
color: rgb(0, 95, 97);
}

View File

@@ -123,6 +123,17 @@ img.diagram {
margin-bottom: 1em;
}
#documentation #application-development ul li p {
padding-bottom: 0px;
padding-top: 0px;
}
#documentation #application-development ul {
margin-left: 2em;
padding-top: 0px;
padding-bottom: 0px;
}
.removedhv {
color: darkred;
}

View File

@@ -60,24 +60,46 @@ Application development
-----------------------
`API reference <html/index.html>`__
Reference manual for the C public API, split in
`common <html/libvirt-libvirt-common.html>`__,
`domain <html/libvirt-libvirt-domain.html>`__,
`domain checkpoint <html/libvirt-libvirt-domain-checkpoint.html>`__,
`domain snapshot <html/libvirt-libvirt-domain-snapshot.html>`__,
`error <html/libvirt-virterror.html>`__,
`event <html/libvirt-libvirt-event.html>`__,
`host <html/libvirt-libvirt-host.html>`__,
`interface <html/libvirt-libvirt-interface.html>`__,
`network <html/libvirt-libvirt-network.html>`__,
`node device <html/libvirt-libvirt-nodedev.html>`__,
`network filter <html/libvirt-libvirt-nwfilter.html>`__,
`secret <html/libvirt-libvirt-secret.html>`__,
`storage <html/libvirt-libvirt-storage.html>`__,
`stream <html/libvirt-libvirt-stream.html>`__ and
`admin <html/libvirt-libvirt-admin.html>`__,
`QEMU <html/libvirt-libvirt-qemu.html>`__,
`LXC <html/libvirt-libvirt-lxc.html>`__ libs
Reference manual for the C public API, split in:
* `common <html/libvirt-libvirt-common.html>`__
* `domain <html/libvirt-libvirt-domain.html>`__
* `domain checkpoint <html/libvirt-libvirt-domain-checkpoint.html>`__
* `domain snapshot <html/libvirt-libvirt-domain-snapshot.html>`__
* `error <html/libvirt-virterror.html>`__
* `event <html/libvirt-libvirt-event.html>`__
* `host <html/libvirt-libvirt-host.html>`__
* `interface <html/libvirt-libvirt-interface.html>`__
* `network <html/libvirt-libvirt-network.html>`__
* `node device <html/libvirt-libvirt-nodedev.html>`__
* `network filter <html/libvirt-libvirt-nwfilter.html>`__
* `secret <html/libvirt-libvirt-secret.html>`__
* `storage <html/libvirt-libvirt-storage.html>`__
* `stream <html/libvirt-libvirt-stream.html>`__
and the documentation for the API of the additional libs:
* `admin <html/libvirt-libvirt-admin.html>`__
* `QEMU <html/libvirt-libvirt-qemu.html>`__
* `LXC <html/libvirt-libvirt-lxc.html>`__
`XML schemas <format.html>`__
Description of the XML schemas for
* `domains <formatdomain.html>`__
* `networks <formatnetwork.html>`__
* `network ports <formatnetworkport.html>`__
* `network filtering <formatnwfilter.html>`__
* `storage <formatstorage.html>`__
* `storage encryption <formatstorageencryption.html>`__
* `capabilities <formatcaps.html>`__
* `domain capabilities <formatdomaincaps.html>`__
* `storage pool capabilities <formatstoragecaps.html>`__
* `node devices <formatnode.html>`__
* `secrets <formatsecret.html>`__
* `snapshots <formatsnapshot.html>`__
* `checkpoints <formatcheckpoint.html>`__
* `backup jobs <formatbackup.html>`__
`Language bindings and API modules <bindings.html>`__
Bindings of the libvirt API for
@@ -92,23 +114,6 @@ Application development
and integration API modules for
`D-Bus <dbus.html>`__
`XML schemas <format.html>`__
Description of the XML schemas for
`domains <formatdomain.html>`__,
`networks <formatnetwork.html>`__,
`network ports <formatnetworkport.html>`__,
`network filtering <formatnwfilter.html>`__,
`storage <formatstorage.html>`__,
`storage encryption <formatstorageencryption.html>`__,
`capabilities <formatcaps.html>`__,
`domain capabilities <formatdomaincaps.html>`__,
`storage pool capabilities <formatstoragecaps.html>`__,
`node devices <formatnode.html>`__,
`secrets <formatsecret.html>`__,
`snapshots <formatsnapshot.html>`__,
`checkpoints <formatcheckpoint.html>`__,
`backup jobs <formatbackup.html>`__
`URI format <uri.html>`__
The URI formats used for connecting to libvirt

View File

@@ -326,13 +326,7 @@ repositories on GitHub:
::
https://github.com/libvirt/
And there are also read-only mirrors on libvirt.org:
::
git clone https://libvirt.org/git/[module name].git
git clone https://github.com/libvirt/[module name].git
Note that for most repositories, development happens via merge requests
on GitLab. However, for the main `libvirt.git` repository all patch review and

View File

@@ -6,6 +6,7 @@ Internal drivers
- `Storage drivers <storage.html>`__
- `Node device driver <drvnodedev.html>`__
- `Secret driver <drvsecret.html>`__
- `Network driver <drvnetwork.html>`__
The libvirt public API delegates its implementation to one or more internal
drivers, depending on the `connection URI <uri.html>`__ passed when initializing

View File

@@ -7,8 +7,10 @@ Bhyve driver
.. contents::
Bhyve is a FreeBSD hypervisor. It first appeared in FreeBSD 10.0. However, it's
recommended to keep tracking FreeBSD 10-STABLE to make sure all new features of
bhyve are supported. In order to enable bhyve on your FreeBSD host, you'll need
recommended to use the
`latest supported release <https://www.freebsd.org/releases/>`__
to make sure all new features of bhyve are supported.
In order to enable bhyve on your FreeBSD host, you'll need
to load the ``vmm`` kernel module. Additionally, ``if_tap`` and ``if_bridge``
modules should be loaded for networking support. Also, :since:`since 3.2.0` the
``virt-host-validate(1)`` supports the bhyve host validation and could be used
@@ -327,6 +329,26 @@ This uses the UEFI firmware provided by the
`sysutils/bhyve-firmware <https://www.freshports.org/sysutils/bhyve-firmware/>`__
FreeBSD port.
:since:`Since 11.4.0`, it's possible to configure an NVRAM file:
::
<os>
<type>hvm</type>
<loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader>
<nvram template='/usr/local/share/edk2-bhyve/BHYVE_UEFI_VARS.fd'>/var/lib/libvirt/bhyve/nvram/myvm.fd</nvram>
</os>
Alternatively, it's also possible to let the driver automatically configure
the firmware and NVRAM:
::
<os firmware='efi'>
<type>hvm</type>
<nvram/>
</os>
VNC and the tablet input device could be configured this way:
::
@@ -582,3 +604,37 @@ Note that these extensions are for testing and development purposes only. They
are **unsupported**, using them may result in inconsistent state, and upgrading
either bhyve or libvirtd maybe break behavior of a domain that was relying on a
specific commands pass-through.
Random number generator device
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:since:`Since 11.3.0` it's possible to use the virtio random number generator devices.
Example:
::
...
<rng model='virtio'>
<backend model='random'/>
</rng>
...
TCP console
~~~~~~~~~~~
:since:`Since 11.6.0` it's possible to configure TCP console.
Example:
::
...
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='12345'/>
<target type='serial' port='0'/>
</serial>
...
Note: there's no direct way to check if the actual ``bhyve`` binary supports
the TCP console. Thus, libvirt always assumes it's supported. Please
refer to the ``bhyve(1)`` manual page to make sure.

View File

@@ -91,7 +91,7 @@ Multiple parameters are separated by ``&``.
::
?no_verify=1&auto_answer=1&proxy=socks://example-proxy.com:23456
?no_verify=1&auto_answer=1&proxy=socks://example-proxy.com:23456&cacert=certs/ca-bundle.pem
The driver understands the extra parameters shown below.
@@ -146,6 +146,16 @@ The driver understands the extra parameters shown below.
| | | ``port`` allows to override |
| | | the default port 1080. |
+-----------------+-----------------------------+-----------------------------+
| ``cacert`` | Path to a file with one | The specified file will be |
| | or more certificates | used for verifying the |
| | | remote host certificate |
| | | instead of the default |
| | | system one. |
| | | :since:`Since 11.5.0`. |
| | | Does nothing if |
| | | ``no_verify`` is set |
| | | to ``1``. |
+-----------------+-----------------------------+-----------------------------+
Authentication
~~~~~~~~~~~~~~
@@ -181,8 +191,10 @@ error like this one:
error: internal error curl_easy_perform() returned an error: Peer certificate cannot be authenticated with known CA certificates (60)
Where are two ways to solve this problem:
Where are three ways to solve this problem:
- Use the ``cacert`` `Extra parameters`_ to point to a certificate bundle
with the CA that signed the SSL certificate used on the ESX server.
- Use the ``no_verify=1`` `Extra parameters`_ to disable server
certificate verification.
- Generate new SSL certificates signed by a CA known to your client computer

28
docs/drvnetwork.rst Normal file
View File

@@ -0,0 +1,28 @@
==============
Network driver
==============
.. contents::
Platform-specific notes
=======================
FreeBSD
-------
FreeBSD netowork driver uses the pf firewall. Libvirt managed pf rules
are created within anchors. Anchors need to be configured manually by
the user. Sample ``/etc/pf.conf`` might look like:
::
scrub all
nat-anchor "libvirt\*"
anchor "libvirt\*"
pass all
Users are not expected to manually modify rules in the ``"libvirt\*"``
subanchors because the changes will be lost on restart.

View File

@@ -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

View File

@@ -285,7 +285,6 @@ useful rules:
fb57c546-76dc-a372-513f-e8179011b48a no-mac-spoofing
dba10ea7-446d-76de-346f-335bd99c1d05 no-other-l2-traffic
f5c78134-9da4-0c60-a9f0-fb37bc21ac1f no-other-rarp-traffic
7637e405-4ccf-42ac-5b41-14f8d03d8cf3 qemu-announce-self
9aed52e7-f0f3-343e-fe5c-7dcb27b594e5 qemu-announce-self-rarp
Most of these are just building blocks. The interesting one here is

View File

@@ -1,3 +1,5 @@
.. role:: since
Backup XML format
=================
@@ -42,6 +44,29 @@ were supplied). The following child elements and attributes are supported:
necessary to set up an NBD server that exposes the content of each disk at
the time the backup is started.
In addition to the above the NBD server used for backups allows using
``transport='fd' fdgroup='NAME'`` where ``NAME`` is the name used with
``virDomainFDAssociate()`` to pass a pre-opened server socket file descriptor
to qemu. :since:`Since 11.3.0`
Example code to pass a socket with libvirt-python bindings::
import socket
import libvirt
import selinux
# Optionally setup selinux context for the socket if the distro uses it
# selinux.setsockcreatecon_raw("system_u:object_r:svirt_t:s0")
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.bind("/path/to/socket")
fdlist = [ s.fileno() ]
conn = libvirt.open()
dom = conn.lookupByName("VMNAME")
dom.FDAssociate("NAME", fdlist)
Note that for the QEMU hypervisor the TLS environment in controlled using
``backup_tls_x509_cert_dir``, ``backup_tls_x509_verify``, and
``backup_tls_x509_secret_uuid`` properties in ``/etc/libvirt/qemu.conf``.

View File

@@ -97,6 +97,50 @@ The ``<host/>`` element consists of the following child elements:
parse this element. In contrast with the former elements, this is repeated
for each security model the libvirt daemon currently supports.
Host CPU model and features
^^^^^^^^^^^^^^^^^^^^^^^^^^^
As described previously in this section, libvirt exposes to
users the list of Host CPU features. Libvirt has a special way to
expose this list: Instead of providing the full (and thereby often
very long) set of features, libvirt specifies a CPU model as
baseline and additional features on top of it (as can be seen in
`Examples`_ where the baseline is ``Skylake-Client-noTSX-IBRS``).
The ideal case would be that the baseline CPU model definition matches
exactly the CPU present in the system, and no additional feature is
needed to express the capabilities of the CPU. For example, if you are
running on a Server CPU you bought as ``Icelake`` type, the returned
CPU model name could be ``Icelake-Server``. However, this ideal
situation rarely happens, for two main reasons:
- Manufacturers do not ship a single type of CPU under a given name,
there are various different SKUs with different features under the
same name. Yet it is not practical to have a database listing all of
those variants.
- Some features might be in the hardware but unavailable for various
reasons (BIOS and kernel configuration, disabled for security,
...). One typical example where this situation happens is related to
the `TSX mitigation <https://docs.kernel.org/arch/x86/tsx_async_abort.html>`__.
As a mitigation to the TAA side channel attack, the Linux kernel disables
by default TSX and its 2 features, ``rtm`` and ``hle``. Since many Linux
distributions keep this safer default behavior, these 2 features appear
as missing.
Because for backward compatibility reasons, host capabilities cannot
list features that would need to be removed from the baseline model to
describe the host CPU, libvirt has to often use a rather old CPU
model, for example, ``Broadwell`` rather than ``Icelake``. Therefore,
users *should not* expect the reported CPU model name to have any
implications other than that of a named baseline to build the complete
available feature set of the Host CPU.
`Domain capabilities <formatdomaincaps.html#cpu-configuration>`_ do
not have such limitation, and the ``host-model`` CPU definition would
show the correct CPU model in almost all cases.
Guest capabilities
~~~~~~~~~~~~~~~~~~

View File

@@ -54,6 +54,13 @@ General metadata
:since:`Since 0.8.7`, it is also possible to provide the UUID via a
`SMBIOS System Information`_ specification.
``hwuuid``
The optional ``hwuuid`` element can be used to supply an alternative UUID for
identifying the virtual machine from the domain ``uuid`` above. The difference
between using the ``hwuuid`` element and simply providing an alternative UUID
via a `SMBIOS System Information`_ specification is that the ``hwuuid`` affects
all devices that expose the UUID to the guest.
:since:`Since 11.7.0 QEMU/KVM only`
``genid``
:since:`Since 4.4.0`, the ``genid`` element can be used to add a Virtual
Machine Generation ID which exposes a 128-bit, cryptographically random,
@@ -1139,7 +1146,7 @@ influence how virtual memory pages are backed by host pages.
element is introduced. It has one compulsory attribute ``size`` which
specifies which hugepages should be used (especially useful on systems
supporting hugepages of different sizes). The default unit for the ``size``
attribute is kilobytes (multiplier of 1024). If you want to use different
attribute is kiB (multiplier of 1024). If you want to use different
unit, use optional ``unit`` attribute. For systems with NUMA, the optional
``nodeset`` attribute may come handy as it ties given guest's NUMA nodes to
certain hugepage sizes. From the example snippet, one gigabyte hugepages are
@@ -1674,6 +1681,14 @@ In case no restrictions need to be put on CPU model and its features, a simpler
</cpu>
...
``deprecated_features``
:since:`Since 11.0.0`, S390 guests may utilize the ``deprecated_features``
attribute to specify toggling of CPU model features that are flagged as
deprecated by the hypervisor. When this attribute is set to ``off``, the
active guest XML will reflect the respective features with the disable
policy. When this attribute is set to ``on``, the respective features will
be enabled.
``cache``
:since:`Since 3.3.0` the ``cache`` element describes the virtual CPU cache.
If the element is missing, the hypervisor will use a sensible default.
@@ -2132,32 +2147,34 @@ are:
based virtualization drivers, such as LXC.
``hyperv``
Enable various features improving behavior of guests running Microsoft
Windows.
Windows. :since:`Since 11.3.0` some of these flags are also available for
Xen domains running Microsoft Windows.
=============== ====================================================================== ============================================ ========================================================================
Feature Description Value Since
=============== ====================================================================== ============================================ ========================================================================
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0)`
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0)`
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0), 11.3.0 (Xen, always on)`
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0), 11.3.0 (Xen)`
spinlocks Enable spinlock support on, off; retries - at least 4095 :since:`1.1.0 (QEMU 2.0)`
vpindex Virtual processor index on, off :since:`1.3.3 (QEMU 2.5)`
vpindex Virtual processor index on, off :since:`1.3.3 (QEMU 2.5), 11.3.0 (Xen, always on)`
runtime Processor time spent on running guest code and on behalf of guest code on, off :since:`1.3.3 (QEMU 2.5)`
synic Enable Synthetic Interrupt Controller (SynIC) on, off :since:`1.3.3 (QEMU 2.6)`
stimer Enable SynIC timers, optionally with Direct Mode support on, off; direct - on,off :since:`1.3.3 (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1)`
synic Enable Synthetic Interrupt Controller (SynIC) on, off :since:`1.3.3 (QEMU 2.6), 11.3.0 (Xen)`
stimer Enable SynIC timers, optionally with Direct Mode support on, off; direct - on,off :since:`1.3.3 (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1), 11.3.0 (Xen, on/off only)`
reset Enable hypervisor reset on, off :since:`1.3.3 (QEMU 2.5)`
vendor_id Set hypervisor vendor id on, off; value - string, up to 12 characters :since:`1.3.3 (QEMU 2.5)`
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12)`
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12), 11.3.0 (Xen)`
reenlightenment Enable re-enlightenment notification on migration on, off :since:`4.7.0 (QEMU 3.0)`
tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0)`
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1)`
tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0), 11.3.0 (Xen, on/off only)`
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1), 11.3.0 (Xen)`
evmcs Enable Enlightened VMCS on, off :since:`4.10.0 (QEMU 3.1)`
avic Enable use Hyper-V SynIC with hardware APICv/AVIC on, off :since:`8.10.0 (QEMU 6.2)`
emsr_bitmap Avoid unnecessary updates to L2 MSR Bitmap upon vmexits. on, off :since:`10.7.0 (QEMU 7.1)`
xmm_input Enable XMM Fast Hypercall Input on, off :since:`10.7.0 (QEMU 7.1)`
=============== ====================================================================== ============================================ ========================================================================
:since:`Since 8.0.0`, the hypervisor can be configured further by setting
the ``mode`` attribute to one of the following values:
:since:`Since 8.0.0 (QEMU) Since 11.3.0 (Xen)`, the hypervisor can be
configured further by setting the ``mode`` attribute to one of the following
values:
``custom``
Set exactly the specified features.
@@ -2822,7 +2839,7 @@ paravirtualized driver is specified via the ``disk`` element.
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' />
<source file='/var/lib/libvirt/images/disk.qcow2'/>
<target dev='vdh' bus='virtio'/>
<target dev='nvme0n1' bus='nvme'/>
<throttlefilters>
<throttlefilter group='limit2'/>
<throttlefilter group='limit012'/>
@@ -2860,10 +2877,25 @@ paravirtualized driver is specified via the ``disk`` element.
``model``
Indicates the emulated device model of the disk. Typically this is
indicated solely by the ``bus`` property but for ``bus`` "virtio" the
model can be specified further with "virtio", "virtio-transitional" or
"virtio-non-transitional". See `virtio device models`_
for more details. :since:`Since 5.2.0`
indicated solely by the ``bus`` property.
For ``bus`` "virtio" the model can be specified further with "virtio",
"virtio-transitional" or "virtio-non-transitional". See `virtio device
models`_ for more details. :since:`Since 5.2.0`
For ``bus`` "usb" the model can be specified further with ``usb-storage``
or ``usb-bot``. There is no difference between the two models for
``<disk type='disk'>``. However with ``usb-bot`` a device configured as
``<disk type='cdrom'>`` is properly exposed as a cdrom device inside the
guest OS. Unfortunately this configuration is not ABI compatible with
``usb-storage`` and thus it can't be interchanged during migration.
The QEMU hypervisor driver will pick ``usb-bot`` for cold starts or
hotplug for cdrom devices to properly configure the devices. This is
not compatible for migration to older versions of libvirt and explicit
configuration needs to be used.
:since:`Since 11.5.0`; relevant only for ``QEMU`` hypervisor.
``rawio``
Indicates whether the disk needs rawio capability. Valid settings are
"yes" or "no" (default is "no"). If any one disk in a domain has
@@ -2941,6 +2973,12 @@ paravirtualized driver is specified via the ``disk`` element.
the optional attribute ``tlsHostname`` can be used to override the
expected host name of the NBD server used for TLS certificate verification.
For "rbd", the ``name`` attribute could be two formats: the format of
``pool_name/image_name`` includes the rbd pool name and image name with
default rbd pool namespace; for the customized namespace, the format is
``pool_name/namespace/image_name`` ( :since:`Since 11.6.0 and QEMU 5.0` ).
The pool name, namespace and image are separated by slash.
For protocols ``http`` and ``https`` an optional attribute ``query``
specifies the query string. ( :since:`Since 6.2.0` )
@@ -3311,7 +3349,8 @@ paravirtualized driver is specified via the ``disk`` element.
name in the guest OS. Treat it as a device ordering hint. The optional
``bus`` attribute specifies the type of disk device to emulate; possible
values are driver specific, with typical values being "ide", "scsi",
"virtio", "xen", "usb", "sata", or "sd" :since:`"sd" since 1.1.2`. If
"virtio", "xen", "usb", "sata", "sd", or "nvme"
:since:`"sd" since 1.1.2, "nvme" since 11.5.0`. If
omitted, the bus type is inferred from the style of the device name (e.g. a
device named 'sda' will typically be exported using a SCSI bus). The optional
attribute ``tray`` indicates the tray status of the removable disks (i.e.
@@ -3449,8 +3488,12 @@ paravirtualized driver is specified via the ``disk`` element.
and sync requests from guest are ignored).
:since:`Since 0.6.0`
- The optional ``error_policy`` attribute controls how the hypervisor will
behave on a disk read or write error, possible values are "stop",
"report" (:since:`since 0.9.7`), "ignore", and "enospace".
behave on a disk read or write error, possible values are ``stop``
(suspend/pause the domain on error), ``report`` (report the error to the
guest OS; :since:`since 0.9.7`), ``ignore`` (ignore the error and try to
continue), and ``enospace`` (suspend/pause the domain only if host storage
is full; report the error to the guest OS otherwise).
The default is left to the discretion of the hypervisor.
:since:`Since 0.8.0`.
- The optional ``rerror_policy`` attribute controls behavior for read
@@ -3645,7 +3688,9 @@ paravirtualized driver is specified via the ``disk`` element.
If present, this specify serial number of virtual hard drive. For example, it
may look like ``<serial>WD-WMAP9A966149</serial>``. Not supported for
scsi-block devices, that is those using disk ``type`` 'block' using
``device`` 'lun' on ``bus`` 'scsi'. :since:`Since 0.7.1`
``device`` 'lun' on ``bus`` 'scsi'. Also not supported for multiple NVMe
devices on the same controller since those have serial number per controller
and not per disk. :since:`Since 0.7.1`
Note that depending on hypervisor and device type the serial number may be
truncated silently. IDE/SATA devices are commonly limited to 20 characters.
@@ -4134,6 +4179,10 @@ device hotplug is expected.
<address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
</controller>
<controller type='xenbus' maxGrantFrames='64' maxEventChannels='2047'/>
<controller type='nvme'>
<serial>
...
</serial>
...
</devices>
...
@@ -4180,6 +4229,12 @@ specific features, such as:
specifies maximum number of event channels (PV interrupts) that can be used
by the guest.
``nvme``
Supported :since:`Since 11.5.0`, the ``nvme`` controller can be used to
support NVMe disks. It has an optional ``serial`` sub-element just like
regular disks do.
Note: The PowerPC64 "spapr-vio" addresses do not have an associated controller.
For controllers that are themselves devices on a PCI or USB bus, an optional
@@ -4292,7 +4347,7 @@ attribute are
- ``pcie-to-pci-bridge`` ( :since:`since 4.3.0` )
The root controllers (``pci-root`` and ``pcie-root``) have an optional
``pcihole64`` element specifying how big (in kilobytes, or in the unit specified
``pcihole64`` element specifying how big (in kiB, or in the unit specified
by ``pcihole64``'s ``unit`` attribute) the 64-bit PCI hole should be. Some
guests (like Windows XP or Windows Server 2003) might crash when QEMU and
Seabios are recent enough to support 64-bit PCI holes, unless this is disabled
@@ -4594,15 +4649,15 @@ or:
...
<devices>
<hostdev mode='subsystem' type='mdev' model='vfio-pci'>
<source>
<address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/>
</source>
<source>
<address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='mdev' model='vfio-ccw'>
<source>
<address uuid='9063cba3-ecef-47b6-abcf-3fef4fdcad85'/>
</source>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
</hostdev>
</devices>
...
@@ -4839,6 +4894,55 @@ or:
host device. :since:`Since 1.0.6`, but only works as expected
:since:`since 1.2.2`.
ACPI Generic Initiators
^^^^^^^^^^^^^^^^^^^^^^^^
A host device may include an ``<acpi>`` element to create ACPI Generic
Initiator objects for the device in QEMU.
This can be used for **NVIDIA Multi-Instance GPU (MIG)** configurations,
where a physical GPU is partitioned into multiple isolated instances, each
associated with one or more virtual NUMA nodes.
By attaching an ``<acpi nodeset=.../>`` element to the MIG device in the
domain XML, the guest will configure the correct partitioning for that
instance.
::
<numa>
<cell id='0' cpus='0-15' memory='8388608' unit='KiB'/>
<cell id='1' memory='0' unit='KiB'/>
<cell id='2' memory='0' unit='KiB'/>
<cell id='3' memory='0' unit='KiB'/>
<cell id='4' memory='0' unit='KiB'/>
<cell id='5' memory='0' unit='KiB'/>
<cell id='6' memory='0' unit='KiB'/>
<cell id='7' memory='0' unit='KiB'/>
<cell id='8' memory='0' unit='KiB'/>
</numa>
...
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x06' slot='0x12' function='0x1'/>
</source>
<acpi nodeset='1-8'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</hostdev>
Attributes of ``<acpi>``:
``nodeset``
A list of NUMA node IDs that will be associated with the device.
Each node in the set causes libvirt to create an
``acpi-generic-initiator`` object in QEMU, tied to this device.
The value uses the standard libvirt *nodeset* syntax (e.g. ``0-3,5``).
If the ``<acpi>`` element is omitted, no acpi-generic-initiator objects are
created for the device.
Block / character devices
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -5054,8 +5158,8 @@ MAC address is outside of the reserved VMWare ranges.
:since:`Since 11.2.0`, the ``<mac/>`` element can optionally contain
``currentAddress`` attribute (output only), which contains new MAC address if the
guest changed it. This is currently implemented only for QEMU/KVM and requires
setting ``trustGuestRxFilters`` to ``yes``.
guest changed it. This is currently implemented only for the model type ``virtio``
in QEMU/KVM and requires setting ``trustGuestRxFilters`` to ``yes``.
:since:`Since 7.3.0`, one can set the ACPI index against network interfaces.
With some operating systems (eg Linux with systemd), the ACPI index is used
@@ -5244,15 +5348,7 @@ network address by including an ``ip`` element specifying an IPv4
address in its one mandatory attribute, ``address``. Optionally, a
second ``ip`` element with a ``family`` attribute set to "ipv6" can be
specified to add an IPv6 address to the interface. ``address``.
Optionally, an address ``prefix`` can be specified. These settings are
surprisingly **not** used by SLIRP to set the exact IP address;
instead they are used to determine what network/subnet the guest's IP
address should be on, and the guest will be given an address in that
subnet, but the host portion of the address will still be "2.15". In
the example below, for example, the guest will be given the IP address
172.17.2.15 (**note that the '1.1' in the host portion of the address
has been ignored**), default route of 172.17.2.2, and DNS server
172.17.2.3.
Optionally, an address ``prefix`` can be specified.
::
@@ -5268,6 +5364,59 @@ has been ignored**), default route of 172.17.2.2, and DNS server
</devices>
...
These settings are surprisingly **not** used by SLIRP to set the exact
IP address; instead they are used to determine what **network/subnet**
the guest's IP address should be on, and the guest will be given an
address in that subnet, but the host portion of the address will still
be the host portion of "10.0.2.15" (based on the configured prefix (or
a prefix of 24 if no prefix is specified). The DNS and default gateway
addresses given to the guest will be similarly based on the network
portion of the configuration-provided <ip> combined with the host
portion of SLIRPs default settings for DNS/gateway
(10.0.2.3/10.0.2.2). To help resolve the confusion of the previous
sentences, the table below shows examples of the settings that will be
provided to the guest (via a DHCP response) to use for its interface
config (ip/prefix, DNS, default gateway) for various settings of <ip>
element address and prefix in libvirt's <interface type='user'>
config:
.. list-table::
:header-rows: 1
* - libvirt <ip> element
- guest ip/prefix
- guest DNS
- guest default gateway
* - (unspecified)
- 10.0.2.15/24
- 10.0.2.3
- 10.0.2.2
* - address='172.17.1.1'
prefix='16'
- 172.17.2.15/16
- 172.17.2.3
- 172.17.2.2
* - address='172.17.1.1'
prefix='24'
- 172.17.1.15/24
- 172.17.1.3
- 172.17.1.2
* - address='172.17.1.1'
prefix='8'
- 172.0.2.15/16
- 172.0.2.3
- 172.0.2.2
* - address='172.17.1.1'
prefix='23'
- 172.17.0.15/23
- 172.17.0.3
- 172.17.0.2
Userspace connection using passt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -5309,27 +5458,36 @@ any conflict).
Also different from SLIRP's behavior: if you do specify IP
address(es), the exact address and netmask/prefix you specify will be
provided to the guest (i.e. passt doesn't interpret the <ip> settings
as a network address like SLIRP does, but as a host address). In
example given above, the guest IP would be set to exactly 172.17.1.1.
as a network address like SLIRP does, but as a host address). In the
table of examples given above, the guest IP would be set to exactly
172.17.1.1 in all cases (the DNS and default gateway will be set
the same as they are on the host).
Just as with SLIRP, though, once traffic from the guest leaves the
host towards the rest of the network, it will always appear as if it
came from the host's IP.
There are a few other options that are configurable only for the passt
backend. For example, the ``<backend>`` attribute ``logFile`` can be
used to tell the passt process for this interface where to write its
message log, and the ``<source>`` attribute ``dev`` can tell it a
particular host interface to use when deriving the routes given to the
guest for forwarding traffic upstream. Due to the design decisions of
passt, when using SELinux on the host, it is recommended that the log
file reside in the runtime directory of the user under which the passt
process will run, most probably ``/run/user/$UID`` (where ``$UID`` is
the UID of that user), e.g. ``/run/user/1000``. Be aware that libvirt
does not create this directory if it does not already exist to avoid
possible, however unlikely, issues with orphaned directories or
permissions, etc. The logfile attribute is meant mostly for debugging,
so it shouldn't be set under normal circumstances.
backend. For example, the ``<backend>`` subelement's attribute
``logFile`` can be used to tell the passt process for this interface
where to write its message log (:since:`since 9.0.0`)[\*], while the
``hostname`` attribute is used to set the hostname sent to the guest
in a DHCPv4 response (using option 12) (:since:`since 11.8.0`), and
``fqdn`` sets the "fully qualified domain name" sent to the guest in
DHCPv4 response option 81 and DHCPv6 response option 39 (:since:`since
11.8.0`). Also, the ``<source>`` subelement attribute ``dev`` can
tell passt a particular host interface to use when deriving the routes
given to the guest for forwarding traffic upstream.
[\*] *Due to the design decisions of passt, when using SELinux on the
host, it is recommended that the log file reside in the runtime
directory of the user under which the passt process will run, most
probably ``/run/user/$UID`` (where ``$UID`` is the UID of that user),
e.g. ``/run/user/1000``. Be aware that libvirt does not create this
directory if it does not already exist to avoid possible, however
unlikely, issues with orphaned directories or permissions, etc. The
logfile attribute is meant mostly for debugging, so it shouldn't be
set under normal circumstances.*
Additionally, when passt is used, multiple ``<portForward>`` elements
can be added to forward incoming network traffic for the host to this
@@ -5363,7 +5521,7 @@ ports **with the exception of some subset**.
<devices>
...
<interface type='user'>
<backend type='passt' logFile='/run/user/$UID/passt-domain.log'/>
<backend type='passt' hostname='bob' logFile='/run/user/$UID/passt-domain.log'/>
<mac address="00:11:22:33:44:55"/>
<source dev='eth0'/>
<ip family='ipv4' address='172.17.5.4' prefix='24'/>
@@ -6506,10 +6664,10 @@ setting guest-side IP addresses with ``<ip>`` and port forwarding with
...
<devices>
<interface type='vhostuser'>
<backend type='passt'/>
<backend type='passt' fqdn='bob.example.com'/>
<mac address='52:54:00:3b:83:1a'/>
<source dev='enp1s0'/>
<ip address='10.30.0.5 prefix='24'/>
<ip address='10.30.0.5' prefix='24'/>
</interface>
</devices>
...
@@ -6644,7 +6802,7 @@ interaction with the admin.
<listen type='address' address='1.2.3.4'/>
</graphics>
<graphics type='rdp' autoport='yes' multiUser='yes'/>
<graphics type='desktop' fullscreen='yes'/>
<graphics type='desktop'/>
<graphics type='spice'>
<listen type='network' network='rednet'/>
</graphics>
@@ -6825,8 +6983,7 @@ interaction with the admin.
``desktop``
This value is reserved for VirtualBox domains for the moment. It displays
a window on the host desktop, similarly to "sdl", but using the VirtualBox
viewer. Just like "sdl", it accepts the optional attributes ``display``
and ``fullscreen``.
viewer. Just like "sdl", it accepts the optional attribute ``display``.
``egl-headless`` :since:`Since 4.6.0`
This display type provides support for an OpenGL accelerated display
@@ -7009,6 +7166,14 @@ A video device.
sub-element is valid for model types "vga", "qxl", "bochs", "gop",
and "virtio".
:since:`Since 11.7.0` (QEMU driver only), the ``model`` element may have an
optional ``edid`` attribute that can be set to ``on`` or ``off``. If the
``edid`` attribute is not specified then the device will use its default value.
Otherwise setting ``edid`` to ``on`` will expose the device EDID blob to the
guest, whilst setting it to ``off`` will hide the device EDID blob from the
guest. The ``edid`` attribute is only valid for model types ``vga``, ``bochs``,
and ``virtio``.
``acceleration``
Configure if video acceleration should be enabled.
@@ -8995,8 +9160,9 @@ Example:
``model``
Supported values are ``intel`` (for Q35 guests) ``smmuv3``
(:since:`since 5.5.0`, for ARM virt guests), and ``virtio``
(:since:`since 8.3.0`, for Q35 and ARM virt guests).
(:since:`since 5.5.0`, for ARM virt guests), ``virtio``
(:since:`since 8.3.0`, for Q35 and ARM virt guests) and
``amd`` (:since:`since 11.5.0`).
``driver``
The ``driver`` subelement can be used to configure additional options, some
@@ -9011,14 +9177,15 @@ Example:
``caching_mode``
The ``caching_mode`` attribute with possible values ``on`` and ``off`` can
be used to turn on the VT-d caching mode (useful for assigned devices).
:since:`Since 3.4.0` (QEMU/KVM only)
:since:`Since 3.4.0` (QEMU/KVM and ``intel`` model only)
``eim``
The ``eim`` attribute (with possible values ``on`` and ``off``) can be
used to configure Extended Interrupt Mode. A q35 domain with split I/O
APIC (as described in `Hypervisor features`_), and
both interrupt remapping and EIM turned on for the IOMMU, will be able to
use more than 255 vCPUs. :since:`Since 3.4.0` (QEMU/KVM only)
use more than 255 vCPUs. :since:`Since 3.4.0` (QEMU/KVM and ``intel`` model
only)
``iotlb``
The ``iotlb`` attribute with possible values ``on`` and ``off`` can be
@@ -9028,14 +9195,22 @@ Example:
``aw_bits``
The ``aw_bits`` attribute can be used to set the address width to allow
mapping larger iova addresses in the guest. :since:`Since 6.5.0` (QEMU/KVM
only)
and ``intel`` model only)
``dma_translation``
The ``dma_translation`` attribute with possible values ``on`` and ``off`` can
be used to turn off the dma translation for IOMMU. It is useful when only
interrupt remapping is required but dma translation overhead is unwanted, for
example to efficiently enable more than 255 vCPUs.
:since:`Since 10.7.0` (QEMU/KVM only)
:since:`Since 10.7.0` (QEMU/KVM and ``intel`` model only)
``passthrough``
Enable passthrough. In this mode, DMA read/writes are not translated.
:since:`Since 11.5.0` (QEMU/KVM and ``amd`` model only)
``xtsup``
Enable x2APIC mode. Useful for higher number of guest CPUs.
:since:`Since 11.5.0` (QEMU/KVM and ``amd`` model only)
The ``virtio`` IOMMU devices can further have ``address`` element as described
in `Device addresses`_ (address has to by type of ``pci``).
@@ -9438,6 +9613,69 @@ The ``<launchSecurity/>`` element then accepts the following child elements:
the SNP_LAUNCH_FINISH command in the SEV-SNP firmware ABI.
The contents of the ``<launchSecurity type='tdx'>`` element is used to provide
the guest owners input used for creating an encrypted VM using the Intel TDX
(Trusted Domain eXtensions). Intel TDX refers to an Intel technology that
extends Virtual Machine Extensions (VMX) and Multi-Key Total Memory Encryption
(MKTME) with a new kind of virtual machine guest called a Trust Domain (TD).
A TD runs in a CPU mode that is designed to protect the confidentiality of its
memory contents and its CPU state from any other software, including the hosting
Virtual Machine Monitor (VMM), unless explicitly shared by the TD itself.
Example configuration:
::
<domain>
...
<launchSecurity type='tdx'>
<policy>0x10000001</policy>
<mrConfigId>xxx</mrConfigId>
<mrOwner>xxx</mrOwner>
<mrOwnerConfig>xxx</mrOwnerConfig>
<quoteGenerationService path="/var/run/tdx-qgs/qgs.socket"/>
</launchSecurity>
...
</domain>
``policy``
The optional ``policy`` element provides the guest TD attributes which is
passed by the host VMM as a guest TD initialization parameter as part of
TD_PARAMS, it exactly matches the definition of TD_PARAMS.ATTRIBUTES in
(Intel TDX Module Spec Table 22.2: ATTRIBUTES Definition). It is reported
to the guest TD by TDG.VP.INFO and as part of TDREPORT_STRUCT returned by
TDG.MR.REPORT. The guest policy is 64bit unsigned with the fields shown
in Table:
====== ====================================================================================
Bit(s) Description
====== ====================================================================================
0 Guest TD runs in off-TD debug mode when set
1:27 reserved
28 Disable EPT violation conversion to #VE on guest TD access of PENDING pages when set
29:63 reserved
====== ====================================================================================
``mrConfigId``
The optional ``mrConfigId`` element provides ID for non-owner-defined
configuration of the guest TD, e.g., run-time or OS configuration
(base64 encoded SHA384 digest).
``@mrOwner``
The optional ``@mrOwner`` element provides ID for the guest TDs owner
(base64 encoded SHA384 digest).
``mrOwnerConfig``
The optional ``mrOwnerConfig`` element provides ID for owner-defined
configuration of the guest TD, e.g., specific to the workload rather than
the run-time or OS (base64 encoded SHA384 digest).
``quoteGenerationService``
The optional ``quoteGenerationService`` subelement provides Quote Generation
Service(QGS) daemon socket address configuration. It includes an optional
``path`` attribute to determine the UNIX socket address, when omitted,
``/var/run/tdx-qgs/qgs.socket`` is used as default. User in TD guest cannot
get TD quoting for attestation if this subelement is not provided.
Example configs
===============

View File

@@ -720,6 +720,7 @@ capabilities. All features occur as children of the main ``features`` element.
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<tdx supported='yes'/>
<sev>
<cbitpos>47</cbitpos>
<reduced-phys-bits>1</reduced-phys-bits>

View File

@@ -468,10 +468,10 @@ follows, where accepted values for each attribute is an integer number.
``average``
Specifies the desired average bit rate for the interface being shaped (in
kilobytes/second).
kiB/second).
``peak``
Optional attribute which specifies the maximum rate at which the bridge can
send data (in kilobytes/second). Note the limitation of implementation: this
send data (in kiB/second). Note the limitation of implementation: this
attribute in the ``outbound`` element is ignored (as Linux ingress filters
don't know it yet).
``burst``

View File

@@ -438,7 +438,7 @@ several other filters.
<filterref filter='allow-incoming-ipv4'/>
<filterref filter='no-arp-spoofing'/>
<filterref filter='no-other-l2-traffic'/>
<filterref filter='qemu-announce-self'/>
<filterref filter='qemu-announce-self-rarp'/>
</filter>
To reference another filter, the XML node ``filterref`` needs to be provided

View File

@@ -321,9 +321,10 @@ be omitted if the file contents are base64-encoded.
# virsh secret-set-value 6dd3e4a5-1d76-44ce-961f-f119f5aad935 --file secretinfile --plain
Secret value set
**WARNING** The following approach is **insecure** and deprecated. The secret
can also be set via an argument. Note that other users may see the actual secret
in the process listing! The secret must be base64 encoded.
.. warning::
The following approach is **insecure** and deprecated. The secret
can also be set via an argument. Note that other users may see the actual
secret in the process listing! The secret must be base64 encoded.
::

View File

@@ -90,6 +90,58 @@ formal ID documents, but should not be anonymous, nor misrepresent
who you are. The presence of this line attests that the contributor
has read the above linked DCO and agrees with its statements.
Use of AI content generators
============================
TL;DR:
**Current libvirt project policy is to DECLINE any contributions which are
believed to include or derive from AI generated content. This includes
ChatGPT, Claude, Copilot, Llama and similar tools.**
The increasing prevalence of AI-assisted software development results in a
number of difficult legal questions and risks for software projects, including
libvirt. Of particular concern is content generated by `Large Language Models
<https://en.wikipedia.org/wiki/Large_language_model>`__ (LLMs).
The libvirt community requires that contributors certify their patch submissions
are made in accordance with the rules of the `Developer Certificate of
Origin`_.
To satisfy the DCO, the patch contributor has to fully understand the
copyright and license status of content they are contributing to libvirt. With
AI content generators, the copyright and license status of the output is
ill-defined with no generally accepted, settled legal foundation.
Where the training material is known, it is common for it to include large
volumes of material under restrictive licensing/copyright terms. Even where
the training material is all known to be under open source licenses, it is
likely to be under a variety of terms, not all of which will be compatible
with libvirt's licensing requirements.
How contributors could comply with DCO terms (b) or (c) for the output of AI
content generators commonly available today is unclear. The libvirt project is
not willing or able to accept the legal risks of non-compliance.
The libvirt project thus requires that contributors refrain from using AI
content generators on patches intended to be submitted to the project, and
will decline any contribution if use of AI is either known or suspected.
This policy does not apply to other uses of AI, such as researching APIs or
algorithms, static analysis, or debugging, provided their output is not to be
included in contributions.
Examples of tools impacted by this policy includes GitHub's CoPilot, OpenAI's
ChatGPT, Anthropic's Claude, and Meta's Code Llama, and code/content
generation agents which are built on top of such tools.
This policy may evolve as AI tools mature and the legal situation is
clarified. In the meanwhile, requests for exceptions to this policy will be
evaluated by the libvirt project on a case by case basis. To be granted an
exception, a contributor will need to demonstrate clarity of the license and
copyright status for the tool's output in relation to its training model and
code, to the satisfaction of the project maintainers.
Further reading
===============

View File

@@ -211,7 +211,10 @@ operation. There is no specific operation to indicate a "restart" is occurring.
/etc/libvirt/hooks/qemu guest_name stopped end -
Then, after libvirt has released all resources, the hook is called again,
:since:`since 0.9.0`, to allow any additional resource cleanup:
:since:`since 0.9.0`, to allow any additional resource cleanup.
The ``shutoff-reason`` argument (:since:`since 10.5.0`; before that
'-' was passed instead) provides the reason for the shutdown of
the domain.
::
@@ -331,7 +334,10 @@ operation. There is no specific operation to indicate a "restart" is occurring.
/etc/libvirt/hooks/lxc guest_name stopped end -
Then, after libvirt has released all resources, the hook is called again,
:since:`since 0.9.0`, to allow any additional resource cleanup:
:since:`since 0.9.0`, to allow any additional resource cleanup.
The ``shutoff-reason`` argument (:since:`since 10.5.0`; before that
'-' was passed instead) provides the reason for the shutdown of
the domain.
::

View File

@@ -28,6 +28,16 @@ not work when run as root:
error: Operation not supported: Cannot use direct socket mode if no URI is set.
For more information see https://libvirt.org/kbase/failed_connection_after_install.html
Or
::
# virsh list
error: failed to connect to the hypervisor
error: Operation not supported: No URI is provided and cannot identify any listening
daemon socket path to attempt to connect to. For more information see
https://libvirt.org/kbase/failed_connection_after_install.html
Root cause
==========

View File

@@ -13,7 +13,7 @@ that using libvirt's APIs. This method involves concepts: the notion of
`backing chains <backing_chains.html>`_,
`QCOW2 overlays
<https://www.qemu.org/docs/master/interop/live-block-operations.html#disk-image-backing-chain-notation>`_,
and a special operation called "active block-commit", which allows
and a special operation called *active block-commit*, which allows
live-merging an overlay disk image into its backing file.
Two kinds of backup: "push" and "pull"
@@ -43,7 +43,7 @@ This document covers only the full backups using the "push" mode.
Full disk backup using "push" mode
==================================
The below approach uses the modern backup API, virDomainBackupBegin().
The below approach uses the modern backup API, ``virDomainBackupBegin()``.
This requires libvirt-7.2.0 and QEMU-4.2, or higher versions.
#. Start the guest::
@@ -92,8 +92,13 @@ This is the alternative in case you cannot use libvirt-7.2.0 and
QEMU-4.2 for some reason. But this assumes you're using *at least* QEMU
2.1 and libvirt-1.2.9.
.. warning::
We strongly suggest that the backup api (``virsh backup-begin``) is used
as it doesn't require deleting files as deleting a wrong file can lead
to data loss.
This backup approach is slightly more involved, and predates the
virDomainBackupBegin() API: Assuming a guest with a single disk image,
``virDomainBackupBegin()`` API: Assuming a guest with a single disk image,
create a temporary live QCOW2 overlay (commonly called as "external
snapshot") to track the live guest writes. Then backup the original
disk image while the guest (live QEMU) keeps writing to the temporary
@@ -120,13 +125,13 @@ it.
$ virsh snapshot-create-as --domain vm1 overlay1 \
--diskspec vda,file=/var/lib/libvirt/images/overlay1.qcow2 \
--disk-only
--disk-only --no-metadata
The disk image chain looks as follows::
base.raw <-- overlay1.qcow2 (live QEMU)
.. note::
.. note::
Above, if you have QEMU guest agent installed in your virtual
machine, use the ``--quiesce`` option with ``virsh
snapshot-create-as [...]`` to ensure you have a consistent disk
@@ -141,8 +146,7 @@ it.
#. Now, take a backup the original image, ``base.raw``, to a different
location using ``cp`` or ``rsync``::
$ cp /var/lib/libvirt/images/base.raw
/export/backups/copy1_base.raw
$ cp /var/lib/libvirt/images/base.raw /export/backups/copy1_base.raw
# Or:
@@ -156,7 +160,7 @@ it.
$ virsh domblklist vm1
Target Source
------------------------------------------------
vda vda,file=/var/lib/libvirt/images/overlay1.qcow2
vda /var/lib/libvirt/images/overlay1.qcow2
#. Once the backup of the original image completes, now perform the
"active block-commit" to live-merge the contents of

View File

@@ -139,7 +139,7 @@ As a last resort it is possible to disable security protection host wide which
will affect all virtual machines. These settings are all made in
``/etc/libvirt/qemu.conf``
* SELinux - set ``security_default_confied = 0`` to make QEMU run unconfined by
* SELinux - set ``security_default_confined = 0`` to make QEMU run unconfined by
default, while still allowing explicit opt-in to SELinux for VMs.
* DAC - set ``user = root`` and ``group = root`` to make QEMU run as the root

Some files were not shown because too many files have changed in this diff Show More