1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-08-23 05:50:03 +03:00

Compare commits

...

1616 Commits

Author SHA1 Message Date
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
35fc21b659 fix typos in NEWS.rst
Signed-off-by: Michael Ablassmeier <abi@grinser.de>
2025-08-21 10:49:54 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
b405bc6799 po: Refresh potfile for v11.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-28 11:09:07 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
64ad0c3f57 Release of libvirt-11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-07-01 11:21:40 +02:00
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
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
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
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
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
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
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
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
4bcab57d7e po: Refresh potfile for v11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-06-24 16:55:43 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
0020966fee po: Refresh potfile for v11.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-27 10:42:44 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
cc934f93a5 Release of libvirt-11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-02 09:25:45 +02:00
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
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
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
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
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
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
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
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
b41577396f po: Refresh potfile for v11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-28 10:44:55 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
a442f46b0e po: Refresh potfile for v11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-25 12:23:31 +01:00
50981052a5 qemu: Emit NIC_MAC_CHANGE event
So far, we only process NIC_RX_FILTER_CHANGED event when the
corresponding device has 'trustGuestRxFilters' enabled. And the
event is emitted only for virtio model. IOW, this is fairly
limited situation and other scenarios don't emit any event (e.g.
change of MAC address on a PCI passthrough device).

Resolves: https://issues.redhat.com/browse/RHEL-7035
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-25 11:49:30 +01:00
057872df2d Introduce NIC_MAC_CHANGE event
The aim off this event is to notify management application that
guest changed MAC address on one of its vNICs so the app can
update its internal records, e.g. for finding match between
guest/host view of vNICs.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-25 11:49:30 +01:00
ac95617d3d qemu: Reflect MAC address change in live domain XML
If a guest changes MAC address on its vNIC, then QEMU emits
NIC_RX_FILTER_CHANGED event (the event is emitted in other cases
too, but that's not important right now). Now, domain XML allows
users to chose whether to trust these events or not:

  <interface trustGuestRxFilters='yes|no'/>

For the 'no' case no action is performed and the event is
ignored. But for the 'yes' case, some host side features of
corresponding vNIC (well tap/macvtap device) are tweaked to
reflect changed MAC address. But what is missing is reflecting
this new MAC address in domain XML.

Basically, what happens is: the host sees traffic with new MAC
address, all tools inside the guest see the new MAC address
(including 'virsh domifaddr --source agent') which makes it
harder to match device in the guest with the one in the domain
XML.

Therefore, report this new MAC address as another attribute of
the <mac/> element:

  <mac address="52:54:00:a4:6f:91" currentAddress="00:11:22:33:44:55"/>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-25 11:49:30 +01:00
d5666b3c2e NEWS: Mention virsh hypervisor-cpu-models command
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-25 11:34:22 +01:00
bd21e22fe6 Translated using Weblate (Spanish)
Currently translated at 52.6% (5708 of 10838 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-03-24 17:13:04 +01:00
631fceade9 NEWS: Mention guest agent error code improvements
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:08 +01:00
8ab9c74df9 qemuAgentCheckError: Rewort error if neither return nor error is found
Disambiguate the case from other types of error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:08 +01:00
b38d66e81e qemuAgentCheckError: Use 'VIR_ERR_AGENT_COMMAND_FAILED'
In the two cases when we know that the command returned failure switch
to the new error code so that management applications can
programatically detect failure of the guest agent command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:08 +01:00
c3a92081c8 lib: error: Introduce 'VIR_ERR_AGENT_COMMAND_FAILED'
Add a special error code for when the guest agent returned a failure
message.

Allow management applications to deterministically detect failure of the
guest agent command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:08 +01:00
8b40067ece docs: Point to VIR_ERR_AGENT_COMMAND_TIMEOUT when setting timeout
In addition to the error constant appearing add docs hinting that this
new error code can be produced on timeouts.

The most relevant place is to do it when setting the timeout.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:08 +01:00
54312df15b qemuAgentCommandFull: Use VIR_ERR_AGENT_COMMAND_TIMEOUT when agent disappears
When the agent disappears after geting a proper command we ought to
report the same error code as if we timed out as it's uncertain whether
the guest agent did anything.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:07 +01:00
305e91dc21 qemu: agent: Differentiate timeouts when syncing from command timeout
As the guest agent code uses timeouts it is possible that we stop
waiting before the guest agent replies. If this happens while syncing
everything is okay because we didn't send any state-changing command.

In case when the timeout happens after a real command was transmitted
it's unknown if the guest-agent processed it or not.

Use the new special error code VIR_ERR_AGENT_COMMAND_TIMEOUT for cases
when we sent non-sync commands, so that the management applications or
users have possibility to react to this situation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:07 +01:00
ae499e4536 lib: error: Introduce 'VIR_ERR_AGENT_COMMAND_TIMEOUT'
Introduce a new special error code for guest agent commands.

The error code will be specifically reported only when an actual command
(not a sync) was issued to the guest agent and the timeout time was
reached.

This will allow users and management applications to differentiate
between the cases when the sync timed out and thus there's no risk in
the agent actually having executed the command and when the actual
command was sent.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 17:46:07 +01:00
d61ca2665e NEWS: fix one more typo
s/ an / a /

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-21 16:30:03 +01:00
50cc071858 NEWS: hotplug virtio-mem device
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-21 16:29:48 +01:00
25a26bd97b Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 2.4% (264 of 10838 strings)

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

Signed-off-by: hsu zangmen <chzang55@gmail.com>
2025-03-21 11:13:12 +01:00
0ae12c6173 Translated using Weblate (English (United Kingdom))
Currently translated at 48.5% (5262 of 10838 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-21 11:13:12 +01:00
5801e3ce26 Translated using Weblate (Russian)
Currently translated at 83.8% (9086 of 10838 strings)

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

Signed-off-by: "Sergey A." <Ser82-png@yandex.ru>
2025-03-21 11:13:12 +01:00
ec16313f8b NEWS: Mention support for mapped-ram
Add a 'New features' entry for mapped-ram itself, and another
for the parallel save/restore feature built on top.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-21 10:56:19 +01:00
6bd9b06484 qemu: Fix build on 32-bit platforms
Commits c2518f7bc7 and 28a0621528 introduced build failures on 32-bit
platforms by using incorrect format specifiers with g_strdup_printf.

In one case, an 'unsigned long' format specifier is used with a
'long long int' variable. Fix by changing the format specifier to
'uintmax_t', and casting the variable likewise.

In a second case, an 'unsigned long' format specifier is used with a
'size_t' variable, which is 'unsigned int' on 32-bit systems. Fix by
changing the format specifier to use the 'z' modifier.

Fixes: c2518f7bc7
Fixes: 28a0621528
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-21 10:56:19 +01:00
ddb8305049 virsh: add --image-format option to the save command
Option --parallel-channels would require changing configuration file to
be used so introduce this option as well to make it convenient for
users.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
73cf89e8f2 tools: use virDomainSaveParams only when necessary
We should use the newest API only when user sets parallel-channels.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
b982583d92 tools: use virDomainRestoreParams only when necessary
We should use the newest API only when user sets parallel-channels.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
ff22383b34 qemu: remove VIR_DOMAIN_SAVE_PARALLEL flag
There is no need to use extra flag in addition to the new
"parallel.channels" param.

Using the flag without param would result in using uninitialized
variable. Fixing it would result in error that parallel channels cannot
be less then 1 or setting 1 as default.

Using the param without the flag is ignored.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
2582f4dcab tools: remote --parallel from virsh save command
There is no need to have --parallel and --parallel-channels especially
when --parallel on its own is the same as not used at all. In both cases
libvirt will default to single channel.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
ec274a96b6 tools: remove --parallel from virsh restore command
There is no need to have --parallel and --parallel-channels especially
when --parallel on its own is the same as not used at all. In both cases
libvirt will default to single channel.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-03-21 10:56:19 +01:00
743f49aa66 NEWS: fix even more typos
The 'editting one' was:
Reported-by: Martin Kletzander <mkletzan@redhat.com>
I found the rest myself.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 10:49:25 +01:00
37429530cc qemu/dbus: Allow connections from root to the dbus-daemon
In commit dbfb96d18c libvirt started connecting to the daemon to set
RDP credentials, but our configuration file did not allow connections
from the root user, so the connection failed and the VM failed to start.

In order to avoid such issue allow root to connect if the daemon is
running privileged.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-21 10:12:54 +01:00
c2f6feb54f Fix typo in NEWS files
Reported-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 17:51:05 +00:00
a6aa0f0c7e Add NEWS item for auto-shutdown feature
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 17:41:09 +00:00
a274048196 tools: add parallel parameter to virsh restore command
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
380cffda23 tools: add parallel parameter to virsh save command
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
f0169f4d6c qemu: Add support for parallel save and restore
Add support for parallel save and restore by mapping libvirt's
"parallel-channels" parameter to QEMU's "multifd-channels"
migration parameter.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
3637c4dd8b include: Define constants for parallel save/restore
Add a new VIR_DOMAIN_SAVE_PARALLEL flag to the save and restore APIs,
which can be used to specify the use of multiple, parallel channels
for saving and restoring a domain. The number of parallel channels
can be set using the VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS
typed parameter.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
da4273db05 qemu: Support O_DIRECT with mapped-ram on restore
When using the mapped-ram migration capability, direct IO is
enabled by setting the "direct-io" migration parameter to
"true" and passing QEMU an additional fd with O_DIRECT set.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
06bdb1b6c7 qemu: Support O_DIRECT with mapped-ram on save
When using the mapped-ram migration capability, direct IO is
enabled by setting the "direct-io" migration parameter to
"true" and passing QEMU an additional fd with O_DIRECT set.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
28a0621528 qemu: Add support for mapped-ram on restore
Add support for the mapped-ram migration capability on restore.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
138737b203 qemu: Apply migration parameters in qemuMigrationDstRun
Similar to qemuMigrationSrcRun, apply migration parameters in
qemuMigrationDstRun. This allows callers to create customized
migration parameters, but delegates their application to the
function performing the migration.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
5b324c0a73 qemu: Move creation of qemuProcessIncomingDef struct
qemuProcessStartWithMemoryState() is the only caller of qemuProcessStart()
that uses the qemuProcessIncomingDef struct. Move creation of the struct
to qemuProcessStartWithMemoryState().

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
c2518f7bc7 qemu: Add support for mapped-ram on save
Introduce support for QEMU's new mapped-ram stream format [1].
mapped-ram can be enabled by setting the 'save_image_format'
setting in qemu.conf to 'sparse'.

To use mapped-ram with QEMU:
- The 'mapped-ram' migration capability must be set to true
- The 'multifd' migration capability must be set to true and
  the 'multifd-channels' migration parameter must set to 1
- QEMU must be provided an fdset containing the migration fd
- The 'migrate' qmp command is invoked with a URI referencing the
  fdset and an offset where to start reading or writing the data
  stream, e.g.

  {"execute":"migrate",
   "arguments":{"detach":true,"resume":false,
                "uri":"file:/dev/fdset/0,offset=0x11921"}}

The mapped-ram stream, in conjunction with direct IO and multifd
support provided by subsequent patches, can significantly improve
the time required to save VM memory state. The following tables
compare mapped-ram with the existing, sequential save stream. In
all cases, the save and restore operations are to/from a block
device comprised of two NVMe disks in RAID0 configuration with
xfs (~8600MiB/s). The values in the 'save time' and 'restore time'
columns were scraped from the 'real' time reported by time(1). The
'Size' and 'Blocks' columns were provided by the corresponding
outputs of stat(1).

VM: 32G RAM, 1 vcpu, idle (shortly after boot)

                       | save    | restore |
		       | time    | time    | Size         | Blocks
-----------------------+---------+---------+--------------+--------
legacy                 | 6.193s  | 4.399s  | 985744812    | 1925288
-----------------------+---------+---------+--------------+--------
mapped-ram             | 5.109s  | 1.176s  | 34368554354  | 1774472
-----------------------+---------+---------+--------------+--------
legacy + direct IO     | 5.725s  | 4.512s  | 985765251    | 1925328
-----------------------+---------+---------+--------------+--------
mapped-ram + direct IO | 4.627s  | 1.490s  | 34368554354  | 1774304
-----------------------+---------+---------+--------------+--------
mapped-ram + direct IO |         |         |              |
 + multifd-channels=8  | 4.421s  | 0.845s  | 34368554318  | 1774312
-------------------------------------------------------------------

VM: 32G RAM, 30G dirty, 1 vcpu in tight loop dirtying memory

                       | save    | restore |
		       | time    | time    | Size         | Blocks
-----------------------+---------+---------+--------------+---------
legacy                 | 25.800s | 14.332s | 33154309983  | 64754512
-----------------------+---------+---------+--------------+---------
mapped-ram             | 18.742s | 15.027s | 34368559228  | 64617160
-----------------------+---------+---------+--------------+---------
legacy + direct IO     | 13.115s | 18.050s | 33154310496  | 64754520
-----------------------+---------+---------+--------------+---------
mapped-ram + direct IO | 13.623s | 15.959s | 34368557392  | 64662040
-----------------------+-------- +---------+--------------+---------
mapped-ram + direct IO |         |         |              |
 + multifd-channels=8  | 6.994s  | 6.470s  | 34368554980  | 64665776
--------------------------------------------------------------------

As can be seen from the tables, one caveat of mapped-ram is the logical
file size of a saved image is basically equivalent to the VM memory size.
Note however that mapped-ram typically uses fewer blocks on disk, hence
the name 'sparse' for 'save_image_format'.

Also note the mapped-ram stream is incompatible with the existing stream
format, hence mapped-ram cannot be used to restore an image saved with
the existing format and vice versa.

[1] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/mapped-ram.rst?ref_type=heads

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
a24f10f91e qemu: Add helper function for creating save image fd
Move the code in qemuSaveImageCreate that opens, labels, and wraps the
save image fd to a helper function, providing more flexibility for
upcoming mapped-ram support.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
fa68f78f13 qemu_saveimage: add "sparse" to supported save image formats
Extend the list of formats to include "sparse", which uses QEMU's mapped-ram
stream format [1] to write guest memory blocks at fixed offsets in the save
image file.

[1] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/mapped-ram.rst?ref_type=heads

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
c939bf537e qemu: Add function to get migration params for save
Introduce qemuMigrationParamsForSave() to create a
qemuMigrationParams object initialized with appropriate migration
capabilities and parameters for a save operation.

Note that mapped-ram capability also requires the multifd capability.
For now, the number of multifd channels is set to 1. Future work
to support parallel save/restore can set the number of channels to
a user-specified value.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
ac2f196ddd qemu: Add mapped-ram migration capability
Add the mapped-ram migration capability introduced in QEMU 9.0.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
f80d59afe1 qemu: Add function to get bool value from migration params
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:48 -06:00
61a095cfc7 qemu: Add function to check capability in migration params
Add new function qemuMigrationParamsCapEnabled() to check if a
capability is set in the caller-provided migration parameters.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:47 -06:00
3f53bfac41 qemu: Add function to get FDPass object from monitor
Add new function qemuFDPassNewFromMonitor to get an fdset previously
passed to qemu, based on the 'prefix' provided when the qemuFDPass
object was initially created.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 11:17:47 -06:00
9cbc2b9c51 virsh: Add option "throttle-groups" to "attach_disk"
Update "attach_disk" to support new option: throttle-groups to
form filter chain in QEMU for specific disk

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* apply suggested coding style changes.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Fixed alignment of child elements in the XML
* Fixed placement of the throttlegroups element
* Removed completer wrapper

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
180d41934c virsh: Add support for throttle group operations
Implement new throttle cmds

* Add new virsh cmds: domthrottlegroupset, domthrottlegrouplist,
  domthrottlegroupinfo, domthrottlegroupdel
* Add doc for new cmds at docs/manpages/virsh.rst
* Add cmd helper "virshDomainThrottleGroupCompleter", which is used by
  domthrottlegroupset, domthrottlegroupinfo, domthrottlegroupdel

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Update of code documentation comments.
* Reimplement Get throttle group from XML.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>a

* Fixed memleaks
* Rewrote getter to avoid extra copies
* Simplified name extractor

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
f839ff5887 virsh: Refactor iotune options for re-use
Define macro for iotune options, this macro is used by opts_blkdeviotune and
later throttle group opts

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
53088d8cab qemustatusxml2xmldata: Add 'throttlefilter' tests
* Add tests for throttlefilter nodename parse and format for statusxml
(disk/privateData/nodenames/nodename with type='throttle-filter')
* Add iotune limited disk tests to make sure iotune refactory works

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Isolate status xml test

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
18a912f55f qemuxmlconftest: Add 'throttlefilter' tests
* Add tests for throttlegroup domain xml processing, including
groups referenced and not referenced by filters
* Add tests for throttlefilter domain xml processing, including
throttle group referenced by different disks
* Add negative test case to report error when iotune is configured
together with throttle filters

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Isolate domain xml test

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Added test case with copy on read

Reviewed-by-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
2279f9e0ff config: validate: Verify iotune, throttle group and filter
Refactor iotune verification, and verify some rules

* Disk iotune validation can be reused for throttle group validation,
  refactor it into common method "virDomainDiskIoTuneValidate"
* Add "virDomainDefValidateThrottleGroups" to validate throttle groups,
  which in turn calls "virDomainDiskIoTuneValidate"
* Make sure referenced throttle group exists
* Use "iotune" and "throttlefilters" exclusively for specific disk
* Throttle filters cannot be used together with CDROM

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Update of code documentation comments.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Moved validation code from parser to validator
* Removed dead checks after validation

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
9a6560f066 qemu: block: Support block disk along with throttle filters
For hot attaching/detaching
* Leverage qemuBlockThrottleFiltersData to prepare attaching/detaching
  throttle filter data for qemuMonitorBlockdevAdd and qemuMonitorBlockdevDel
* For hot attaching, within qemuDomainAttachDiskGeneric,prepare throttle
  filters json data, and create corresponding blockdev for QMP request
  ("blockdev-add" with "driver":"throttle")
* Each filter has a nodename, and those filters are chained up,
  create them in sequence, and delete them reversely
* Delete filters by "qemuBlockThrottleFiltersDetach"("blockdev-del")
  when detaching device

For throttle group commandline
* Add qemuBuildThrottleGroupCommandLine in qemuBuildCommandLine to add
  "object" of throttle-group
* Verify throttle group definition when lauching vm
* Check QEMU_CAPS_OBJECT_JSON before "qemuBuildObjectCommandlineFromJSON",
  which is to build "-object" option

For throttle filter commandline
* Add qemuBuildDiskThrottleFiltersCommandLine in qemuBuildDiskCommandLine
  to add "blockdev"

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Apply suggested coding style changes.
* Update of code documentation comments.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Removed QEMU_CAPS_OBJECT_JSON_CHECK

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:44 +01:00
80307f4823 qemu: helper: throttle filter nodename and preparation processing
It contains throttle filter nodename processing(new nodename,
topnodename, parse and format nodename), throttle filter
attaching/detaching preparation and implementation.

* Updated "qemuDomainDiskGetTopNodename", so if throttlefilter is used
  together with copyOnRead, top node is throttle filter node, e.g.
  device -> throttle -> copyOnRead Layer-> image chain
* In qemuBuildThrottleFiltersAttachPrepareBlockdev, if copy_on_read
  is on, build throttle nodename chain on top of copy_on_read nodename
* In status xml, throttle filter nodename(virDomainDiskDef.nodename) is
  saved at disk/privateData/nodenames/nodename(type='throttle-filter'),
  corresponding parse/format sits in qemuDomainDiskPrivateParse and
  qemuDomainDiskPrivateFormat
* If filter nodename hasn't been set by qemuDomainDiskPrivateParse,
  in qemuDomainPrepareThrottleFilterBlockdev, filter nodename index
  can be generated by reusing qemuDomainStorageIDNew and current
  global sequence number is persistented in virDomainObj-
  >privateData(qemuDomainObjPrivate)->nodenameindex.
  qemuDomainPrepareThrottleFilterBlockdev is called by
  qemuDomainPrepareDiskSourceBlockdev, which in turn used by both
  hotplug and qemuProcessStart to prepare throttle filter node name
* Define method qemuBlockThrottleFilterGetProps, which is used by
  both hotplug and command to build throttle object for QEMU
* Define methods for throttle filter attach/detach/rollback

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Apply suggested coding style changes.
* Update of code documentation comments.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
937f300c56 qemu: Implement qemu driver for throttle API
ThrottleGroup lifecycle implementation, note, in QOM, throttlegroup name is prefixed with
"throttle-" to clearly separate throttle group objects into their own namespace.
* "qemuDomainSetThrottleGroup", this method is to add("object-add") or update("qom-set")
  throttlegroup in QOM and update corresponding objects in DOM
* "qemuDomainGetThrottleGroup", this method queries throttlegroup info by groupname
* "qemuDomainDelThrottleGroup", this method checks if group is referenced by any throttle
  in disks and delete it if it's not used anymore
* Check flag "QEMU_CAPS_OBJECT_JSON" during qemuDomainSetThrottleGroup when vm is active,
  throttle group feature requries such flag
* "objectAddNoWrap"("props") check is done by reusing qemuMonitorAddObject in
  qemuDomainSetThrottleGroup

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Apply suggested coding style changes.
* cleanup qemu Get ThrottleGroup.
* Update the version to 11.1.0.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Removed QEMU_CAPS_OBJECT_JSON check as the flag no longer exists.
* Update the version to 11.2.0.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
9f29461704 qemu: Refactor qemuDomainSetBlockIoTune to extract common methods
extract common methods from "qemuDomainSetBlockIoTune" to be reused
by throttle handling later, common methods include:
* "qemuDomainValidateBlockIoTune", which is to validate that PARAMS
  contains only recognized parameter names with correct types
* "qemuDomainSetBlockIoTuneFields", which is to load parameters into
  internal object virDomainBlockIoTuneInfo
* "qemuDomainCheckBlockIoTuneMutualExclusion", which is to check rules
  like "total and read/write of bytes_sec cannot be set at the same time"
* "qemuDomainCheckBlockIoTuneMax", which is to check "max" rules within iotune

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Apply suggested coding style changes.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
a10b3ffebb remote: New APIs for ThrottleGroup lifecycle management
Defined new public APIs:
* virDomainSetThrottleGroup to add or update throttlegroup within specific domain,
  it will be referenced by throttlefilter later in disk to do limits
* virDomainGetThrottleGroup to get throttlegroup info, old-style is discarded
  (APIs to query first for the number of parameters and then give it a
  reasonably-sized pointer), instead, the new approach is adopted that
  API returns allocated array of fields and number of fileds that are in it.
* virDomainDelThrottleGroup to delete throttlegroup, it fails if this throttlegroup
  is still referenced by some throttlefilter

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Reimplement getter API to fetch data from XML.
* Apply suggested coding style changes.
* Update of code documentation comments.
* Update the version to 11.2.0.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
5023d974b1 tests: Test qemuMonitorJSONGetThrottleGroup and qemuMonitorJSONUpdateThrottleGroup
Within "testQemuMonitorJSONqemuMonitorJSONUpdateThrottleGroup"
* Test qemuMonitorJSONGetThrottleGroup
* Test qemuMonitorJSONUpdateThrottleGroup, which updates limits through "qom-set"

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* fix test

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Deleted getter-related code.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
8beb51f23d qemu: monitor: Add support for ThrottleGroup operations
This change contains QMP requests for ThrottleGroup

* ThrottleGroup is updated through "qemuMonitorJSONUpdateThrottleGroup"
* ThrottleGroup is retrieved through "qemuMonitorJSONGetThrottleGroup"
* ThrottleGroup is deleted by reusing "qemuMonitorDelObject"
* ThrottleGroup is added by reusing "qemuMonitorAddObject"
* "qemuMonitorMakeThrottleGroupLimits" will be used by building qemu cmd as well

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* change throttle group config conversions P to U allow zero.
* Apply suggested coding style changes.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Deleted all getter code.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
7b4ea19772 config: Introduce ThrottleFilter and corresponding XML parsing
Introduce throttle filter along with corresponding operations.

* Define new struct 'virDomainThrottleFilterDef' and corresponding destructor
* Update _virDomainDiskDef to include virDomainThrottleFilterDef
* Support throttle filter "Parse" and "Format" for operations between DOM XML
  and structs. Note, this commit just contains parse/format of group name for
  throttle filter in domain_conf.c, there is other commit to handle throttle
  filter nodename parse/format between throttlefilter and diskPrivateData for
  statusxml in qemu_domain.c when processing qemuDomainDiskPrivate and
  qemuDomainDiskPrivate

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Error handling for null throttle group.
* Update of code documentation comments.
* Apply suggested coding style changes.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>

* Fixed naming of virDomainThrottleFilterDefClear to ...Free
* Fixed memleak of the throttle filter definitions

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:43 +01:00
644a97b87d config: Introduce ThrottleGroup and corresponding XML parsing
Introduce throttlegroup into domain and provide corresponding methods

* Define new struct 'virDomainThrottleGroupDef' and corresponding destructor
* Add operations(Add, Update, Del, ByName, Copy, Free) for 'virDomainThrottleGroupDef'
* Update _virDomainDef to include virDomainThrottleGroupDef
* Support new resource "Parse" and "Format" for operations between struct and DOM XML
* Make sure "group_name" is defined in xml

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>

* Validation check for zero throttle groups.
* Update of code documentation comments.

Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:42 +01:00
8ce2d2df0e schema: Add new domain elements to support multiple throttle filters
Introduce schema for defining '<throttlefilters>' element which
references throttling groups to form filter chain in qemu for specific
disk

* Add new elements '<throttlefilters>'
* <ThrottleFilters> can include multiple throttlegroup references to
  form filter chain in qemu
* Chained throttle filters feature in qemu is described at
  https://gitlab.com/qemu-project/qemu/blob/master/docs/throttle.txt

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>
Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:42 +01:00
2463533aad schema: Add new domain elements to support multiple throttle groups
Introduce schema for defining '<throttlegroups>' element which
configures throttling groups which can be configured for multiple
disks.

* Refactor "diskIoTune" to extract common schema "iotune"
* Add new elements '<throttlegroups>'
* <ThrottleGroups> contains <ThrottleGroup> defintion, which references
  "iotune"

Signed-off-by: Chun Feng Wu <danielwuwy@163.com>
Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:43:42 +01:00
65eeaf12d0 virsh: Introduce new hypervisor-cpu-models command
Add new virsh command 'hypervisor-cpu-models'.  Command pulls from the
existing domcapabilities XML and uses xpath to parse CPU model strings.
By default, only models reported as usable by the hypervisor on the
host system are printed.  User may specify "--all" to also print
models which are not supported on the host.

Signed-off-by: David Judkovics <djudkovi@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-20 17:14:26 +01:00
563d3cfb86 hypervisor: emit systemd status & log messages while saving
Since processing running VMs on OS shutdown can take a while, it is
beneficial to send systemd status messages about the progress.

The systemd status is a point-in-time message, with no ability to
look at the history of received messages. So in the systemd status
we include the progress information. For the same reason there is
no benefit in sending failure messages, as they'll disappear as soon
as a status is sent for the subsequent VM to be processed.

The libvirt log statements can be viewed as a complete log record
so don't need progress info, but do include warnings about failures
(present from earlier commits).

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
364977b94a rpc: don't let systemd shutdown daemon while saving VMs
The service unit "TimeoutStopSec" setting controls how long systemd
waits for a service to stop before aggressively killing it, defaulting
to 30 seconds if not set.

When we're processing shutdown of VMs in response to OS shutdown, we
very likely need more than 30 seconds to complete this job, and can
not stop the daemon during this time.

To avoid being prematurely killed, setup a timer that repeatedly
extends the "TimeoutStopSec" value while stop of running VMs is
arranged.

This does mean if libvirt hangs while stoppping VMs, systemd won't
get to kill the libvirt daemon, but this is considered less harmful
that forcefully killing running VMs.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
27020d20ee admin: add 'daemon-shutdown' command
The daemons are wired up to shutdown in responsible to UNIX process
signals, as well as in response to login1 dbus signals, or loss of
desktop session. The latter two options can optionally preserve state
(ie running VMs).

In non-systemd environments, as well as for testing, it would be useful
to have a way to trigger shutdown with state preservation more directly.

Thus a new admin protocol API is introduced

  virAdmConnectDaemonShutdown

which will trigger a daemon shutdown, and preserve running VMs if the
VIR_DAEMON_SHUTDOWN_PRESERVE flag is set.

It has a corresponding 'virt-admin daemon-shutdown [--preserve]' command
binding.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
94029c9d64 rpc: fix shutdown sequence when preserving state
The preserving of state (ie running VMs) requires a fully functional
daemon and hypervisor driver. If any part has started shutting down
then saving state may fail, or worse, hang.

The current shutdown sequence does not guarantee safe ordering, as
we synchronize with the state saving thread only after the hypervisor
driver has had its 'shutdownPrepare' callback invoked. In the case of
QEMU this means that worker threads processing monitor events may well
have been stopped.

This implements a full state machine that has a well defined ordering
that an earlier commit documented as the desired semantics.

With this change, nothing will start shutting down if the state saving
thread is still running.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
4acd18b5b8 rpc: don't unconditionally quit after preserving state
The call to preserve state (ie running VMs) is triggered in response to
the desktop session dbus terminating (session daemon), or logind sending
a "PrepareForShutdown" signal. In the case of the latter, daemons
should only save their state, not actually exit yet. Other things on the
system may still expect the daemon to be running at this stage.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
1cad0a1c78 rpc: move state stop into virNetDaemon class
Currently the remote daemon code is responsible for calling virStateStop
in a background thread. The virNetDaemon code wants to synchronize with
this during shutdown, however, so the virThreadPtr must be passed over.

Even the limited synchronization done currently, however, is flawed and
to fix this requires the virNetDaemon code to be responsible for calling
virStateStop in a thread more directly.

Thus the logic is moved over into virStateStop via a further callback
to be registered by the remote daemon.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
77c32d2d53 rpc: rename virNetDaemonSetShutdownCallbacks
The next patch will be introducing a new callback, so rename the method
to virNetDaemonSetLifecycleCallbacks to reflect the more general usage.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
256ed0c9f9 src: clarify semantics of the various virStateNNN methods
It is not documented what the various virStateNNN methods are each
responsible for doing and the names give little guidance either.
Provide some useful documentation comments to explain the intended
usage of each.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
da1d0f32d0 qemu: add config to control if auto-shutdown VMs are restored
If shutting down running VMs at host shutdown, it can be useful to
automatically start them again on next boot. This adds a config
parameter 'auto_shutdown_restore', which defaults to enabled, which
leverages the autostart once feature.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
7e153492e7 qemu: wire up support for once only autostart
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
602f2e60ca hypervisor: wire up support for auto restore of running domains
When performing auto-shutdown of running domains, there is now the
option to mark them as "autostart once",  so that their state is
restored on next boot. This applies on top of the traditional
autostart flag.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
c6018e5f87 conf: implement support for autostart once feature
This is maintained in the same way as the autostart flag, using a
symlink. The difference is that instead of '.xml', the symlink
suffix is '.xml.once'.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
65345dbf47 src: add new APIs for marking a domain to autostart once
When a domain is marked for autostart, it will be started on every
subsequent host OS boot. There may be times when it is desirable to
mark a domain to be autostarted, on the next boot only.

Thus we add virDomainSetAutostartOnce / virDomainGetAutostartOnce.

An alternative would have been to overload the existing
virDomainSetAutostart method, to accept values '1' or '2' for
the autostart flag. This was not done because it is expected
that language bindings will have mapped the current autostart
flag to a boolean, and thus turning it into an enum would create
a compatibility problem.

A further alternative would have been to create a new method
virDomainSetAutostartFlags, with a VIR_DOMAIN_AUTOSTART_ONCE
flag defined. This was not done because it is felt desirable
to clearly separate the two flags. Setting the "once" flag
should not interfere with existing autostart setting, whether
it is enabled or disabled currently.

The 'virsh autostart' command, however, is still overloaded
by just adding a --once flag, while current state is added
to 'virsh dominfo'.

No ability to filter by 'autostart once' status is added to
the domain list APIs. The most common use of autostart once
will be to automatically set it on host shutdown, and it be
cleared on host startup. Thus there would rarely be scenarios
in which a running app will need to filter on this new flag.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
543d259ad3 qemu: add config parameter to control auto-save bypass cache
When doing managed save of VMs, triggered by OS shutdown, it may
be desirable to control cache usage.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
b11c76e514 hypervisor: support bypassing cache for managed save
Bypassing cache can make save performance more predictable and avoids
trashing the OS cache with data that will not be read again.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
faa7a082a1 qemu: configurable delay for shutdown before poweroff
Allow users to control how many seconds libvirt waits for QEMU
shutdown before force powering off a guest.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
eb51f97870 qemu: improve shutdown defaults for session daemon
Currently the session daemon will try a managed save on all VMs,
leaving them running if that fails.

This limits the managed save just to persistent VMs, as there will
usually not be any way to restore transient VMs later.

It also enables graceful shutdown and then forced poweroff, should
save fail for some reason.

These new defaults can be overridden in the config file if needed.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
f48f700f3d qemu: support automatic VM managed save in system daemon
Currently automatic VM managed save is only performed in session
daemons, on desktop session close, or host OS shutdown request.

With this change it is possible to control shutdown behaviour for
all daemons. A recommended setup might be:

  auto_shutdown_try_save = "persistent"
  auto_shutdown_try_shutdown = "all"
  auto_shutdown_poweroff = "all"

Each setting accepts 'none', 'persistent', 'transient', and 'all'
to control what types of guest it applies to.

For historical compatibility, for the system daemon, the settings
currently default to:

  auto_shutdown_try_save = "none"
  auto_shutdown_try_shutdown = "none"
  auto_shutdown_poweroff = "none"

while for the session daemon they currently default to

  auto_shutdown_try_save = "persistent"
  auto_shutdown_try_shutdown = "none"
  auto_shutdown_poweroff = "none"

The system daemon settings should NOT be enabled if the traditional
libvirt-guests.service is already enabled.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
84bb136c31 hypervisor: custom shutdown actions for transient vs persistent VMs
It may be desirable to treat transient VMs differently from persistent
VMs. For example, while performing managed save on persistent VMs makes
sense, the same not usually true of transient VMs, since by their
nature they will have no config to restore from.

This also lets us fix a long standing problem with incorrectly
attempting to perform managed save on transient VMs.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
f4f5e6bdc4 hypervisor: expand available shutdown actions
The auto shutdown code can currently only perform managed save,
which may fail in some cases, for example when PCI devices are
assigned. On failure, shutdown inhibitors remain in place which
may be undesirable.

This expands the logic to try a sequence of operations

 * Managed save
 * Graceful shutdown
 * Forced poweroff

Each of these operations can be enabled or disabled, but they
are always applied in this order.

With the shutdown option, a configurable time is allowed for
shutdown to complete, defaulting to 30 seconds, before moving
onto the forced poweroff phase.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
2b792b35a4 remote: always invoke virStateStop for all daemons
Currently the virStateStop method is only wired up to run save for
the unprivileged daemons, so there is no functional change.

IOW, session exit, or host OS shutdown will trigger VM managed saved
for QEMU session daemon, but not the system daemon.

This changes the daemon code to always run virStateStop for all
daemons. Instead the QEMU driver is responsible for skipping its
own logic when running privileged...for now.

This means that virStateStop will now be triggered by logind's
PrepareForShutdown signal.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
991a20a938 hypervisor: move support for auto-shutdown out of QEMU driver
This is a move of the code that currently exists in the QEMU
driver, into the common layer that can be used by multiple
drivers.

The code currently supports performing managed save of all
running guests, ignoring any failures.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-20 14:55:17 +00:00
f48fb17d72 qemuHotplugRemoveManagedPR: Integrate check whether removal is needed
Calls to 'qemuHotplugRemoveManagedPR' needed to be guarded by a check if
the removed elements actually caused us to add the manager in the first
place.

The two new calls added in commit 1697323bfe were
not guarded by such check and thus would spam the debug log with:

  [{"id": "libvirt-59", "error": {"class": "GenericError", "desc": "object 'pr-helper0' not found"}}]

Luckily 'qemuHotplugRemoveManagedPR' didn't request the error to be
reported as a proper error.

Don't attempt the removal unless needed.

Fixes: 1697323bfe
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-20 06:42:43 +01:00
ad94d8fb19 qemuDomainChangeEjectableMedia: Separate rollback and success code paths
Do not use the rollback code path on success just to avoid extra call to
qemuHotplugRemoveManagedPR.

Rename the label and use it only when rolling back.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-20 06:42:43 +01:00
1f00a208ea qemu: Remove return value from 'qemuHotplugRemoveManagedPR'
The only place which actually checked the return value would skip code
e.g. to delete unused files or stop no longer used services. The rest of
the callers ignored the value.

As this is expected to be used on cleanup code paths which have no
possibility to report errors we should remove the return value
completely.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-20 06:42:43 +01:00
d87e5a1de1 qemu: Do not replace filter nodes with virDomainBlockCopy
The block copy operation is supposed to just move the disk to a new
destination. While in certain scenarios it'd make sense to drop the
copy-on-read layer, the definition would not correspond to it.

This was caused by a fix to the behaviour of the block job after
conversion to -blockdev as 'blockdev-mirror' requires the top node of
the disk to be selected. This also causes that the 'copy-on-read' filter
is ejected but libvirt doesn't unplug it.

Instead we need to use the 'replaces' argument of 'blockdev-mirror'
which allows to keep filters in place. This will preserve the
configuration (which can be optimized later) and also fixes a spurious
error logged when trying to unplug the first real file node after
copy-on-read which still looks used to qemu.

This is also needed for the upcoming feature which adds 'throttle'
filter layers as we need to keep those in place too to facilitate the
throttling.

Resolves: https://issues.redhat.com/browse/RHEL-40077
Fixes: e3137539a9
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-20 06:42:43 +01:00
ca429f102c qemu: monitor: Wire up 'replaces' attribute for 'blockdev-mirror'
The 'replaces' field controls which node will be replaced by the job.
This can be used to e.g. keep filter nodes in place after the copy
finishes.

This will be used to keep the 'copy-on-read' and 'throttle' layers in
place after a copy.

This patch wires up the monitor and test, but the real callers pass NULL
for now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-20 06:42:43 +01:00
6ccf67f5a7 NEWS: Mention multiple iothread support for 'virtio-scsi' controller
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
a4cbad35c9 qemuxmlconftest: Add 'iothreads-virtio-scsi-mapping' case
Test the XML and commandline for iothread<->virtqueue mapping for
'virtio-scsi' controllers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
adb812f068 qemu: Implement support for iothread <-> virtqueue mapping for 'virtio-scsi' controllers
Similarly to 'virtio-blk' users can map multiple iothreads and pin them
appropriately for 'virtio-scsi' controllers to ensure the best
performance.

Implement the validation and command line generation based on the
helpers we have for 'virtio-blk'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
9c4664e8e5 conf: Add support for iothread to queue mapping config for 'virtio-scsi'
Upcoming qemu release will support configuring mapping iothreads to
virtio queues for 'virtio-scsi' controllers in order to improve
performance.

Reuse the infrastructure we have from the same configuration for
'virti-blk' to implement the conf support for this feature.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
285ae7feb3 qemu: capabilities: Introduce QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING
The 'virtio-scsi' controller now supports iothread<->virtqueue mapping
configuration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
d2414079f7 qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to v9.2.0-2799-g0462a32b4f
Notable changes:
 - 'virtio-scsi' supports 'iothread-vq-mapping'
 - 'vfio-pci' device gained two unstable options 'x-igd-legacy-mode'
   and 'x-igd-lpc'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-19 15:38:00 +01:00
815c22a3a7 conf: also free auth for rdp in virDomainGraphicsDefFree
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: bfa7d5aaa8
2025-03-18 19:03:00 +01:00
cae2d23a83 qemu: remove unreachable breaks in qemuDomainAssignMemoryDeviceSlot
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-03-18 18:01:33 +01:00
9ef080d6d9 qemu_domain_address: fix CCW virtio-mem hotplug
Since commit f23f8ff91a virtio-mem supports also CCW. When hotplugging a
virtio-mem device with a CCW address results in a PCI device getting
attached. The method qemuDomainAssignMemoryDeviceSlot is only
considering PCI as address type and overwriting the CCW address. Adding
support for address type CCW.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-03-18 17:59:33 +01:00
be30b8eef9 tests: add qemu <graphics type='rdp'/> test
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
d80f1f8e63 qemu: add RDP support
Wire the external server RDP support with QEMU.

Check the configuration, allocate a port, start the process
and set the credentials.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
f5e5a9bec9 qemu: add 'rdp' capability if qemu-rdp is available
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
e008d229f4 qemu: pass virQEMUDriverConfig to capabilities
This will help with the following patch, which also requires config access.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
469e161946 qemu: add qemu-rdp helper unit
Helpers to start the qemu-rdp server and set it up.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
cdee56a955 qemu: validate RDP configuration
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
507be3425b qemu/dbus: log daemon stdout/err, use domainLogContext
Currently, if dbus-daemon writes on errfd, it will SIGPIPE.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
dbfb96d18c qemu/dbus: keep a connection to the VM D-Bus
The following changes are going to communicate with the qemu-rdp server
through the VM D-Bus bus, keep a connection for that and further usage.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
3af8f135e9 qemu/virtiofs: use domainLogContext
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
a4d8df93ce qemu: limit to one <graphics type='rdp'>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
cab7d25371 qemu: add RDP ports range allocator
RDP server uses port 3389 by default.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
14146b05b6 qemu: use virDomainDefHasGraphics
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
97829d016d conf: generalize virDomainDefHasSpiceGraphics
Generalize the function, broaden its potential usage.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:56 +01:00
bfa7d5aaa8 conf: parse optional RDP username & password
Like VNC, allow to set credentials for RDP.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
bd5f4d3237 qemu: add qemu RDP configuration
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
12d7b9fe26 qemu: add rdp state directory
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
ebdcec7dc9 util: annotate non-null arguments for virGDBusCallMethod()
Helps avoid/debug a potential SEGV if conn is NULL, since gio will not
set the "gerror" in that case and we will crash later at:
  virReportError(VIR_ERR_DBUS_SERVICE, "%s", gerror->message);

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
de9b1f0e72 qemu-slirp: drop unneeded check for OOM
glib anti-pattern, since it aborts on OOM.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
44089b4eea build: fix -Werror=maybe-uninitialized
When compiled with -Doptimization=g

../tools/nss/libvirt_nss_macs.c:155:8: error: ‘jerr’ may be used uninitialized [-Werror=maybe-uninitialized]
  155 |     if (jerr == json_tokener_continue) {
      |        ^

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
7253dda517 build-sys: drop -Winline when optimization=g
The warning is triggered when compiling with various build options, such
as -Doptimization=g.

From gcc(1) man page about -Winline:
seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear.

Such flaky behaviour is best left to the user discretion.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-18 14:15:55 +01:00
7dcfa95e47 news: Add item for guest load averages
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-18 12:22:29 +01:00
acf2f9e1ef src: add new target for regenerating protocol structs files
Introduce a new ninja target

   ninja -C build regen-{PROTO}

eg

   ninja -C build regen-admin_protocol

that will re-create the reference output file based on what the
current pdwtags command emits. A small change is made to squash
whitespace on enum declarations so that introducing a new longer
enum name doesn't trigger re-indent of all existing enum names.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-18 09:21:20 +00:00
dcd1132937 src: normalize whitespace in protocol structs files
This makes the output match what current pdwtags will emit,
modulo some whitespace changes made by the check script
before comparison.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-18 09:20:57 +00:00
fc201e0fcc ch: Fix refcounting in virCHEventHandlerLoop() and virCHStartEventHandler()
When event handler thread is created inside of
virCHStartEventHandler() the monitor object is refed because the thread
(virCHEventHandlerLoop()) that's created in the very next step
uses it. But right after that, the monitor object is unrefed,
which is wrong because it takes away the reference which was
handed over to the thread. The monitor must be unrefed inside the
thread, when no longer needed.

And while at it, move the unref call of the domain object after
the debug print which obviously accesses the domain definition.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-17 14:11:15 +01:00
1db1244752 ch: preserve last error in virCHProcessStop()
If starting a CH domain fails an error is reported and
virCHProcessStart() calls virCHProcessStop() to clean up any
residues. Problem is, inside of virCHProcessStop() some public
APIs might be called (e.g. virNetworkLookupByName(),
virNetworkPortLookupByUUID() and/or virNetworkPortDelete()). Per
our design, public APIs reset last error which means the useful
error reported earlier is lost.

Fix this by calling virErrorPreserveLast() + virErrorRestore()
combo inside of virCHProcessStop().

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-17 14:02:45 +01:00
5a20684788 docs: Fix some typos
Found with the codespell utility.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-17 12:37:48 +01:00
01a7e84be9 docs: remove references to removed APIs
The glib adoption docs was suggesting avoidance of certain APIs that
were obsoleted by glib, during the transition period. Now that the
referenced APIs no longer exist in libvirt code, they can also be
removed from the docs.

NB, the virStringListRemoveDuplicates method remains since there is
no glib equivalent.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-17 11:36:31 +00:00
cb3a6e8806 scripts: add execute permission to several files
Most, but not all, files in scripts have execute permission. While we
don't need this in order to launch them via meson/ninja build rules,
it is nice to direct execution if they have execution permission. This
makes the practice consistent across all scripts.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-17 11:35:54 +00:00
40c0c9c838 docs: document workaround for DMARC countermeasures
If a contributor's email domain has a DMARC policy of 'p=quarantine'
or 'p=reject', mailman will apply DMARC countermeasures on all mails
sent to lists.libvirt.org rewriting the "From" header to remove the
sender's email address. e.g.

  From: Your Name via <lists.libvirt.org>

If these countermeasures were not applied, affected mail would either
have gone directly to SPAM, or have been entirely rejected. Mailman3
is unable to be configured to guarantee no mangling of the mail body
so these countermeasures are unavoidable for lists.libvirt.org.

Amongst the various downsides, the From address rewriting has the
bad effect of mangling git commit author attribution.

To avoid this it is required to add two additional git config
settings:

  $ git config --global format.from "Your Name <your@email.com>"
  $ git config --global format.forceInBodyFrom true

Note, *both* are required, even if your ``format.from`` matches
your existing git identity, because the latter only takes effect
once the former is set.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-17 11:34:12 +00:00
4c979edaa5 conf: parse interface/source/@dev for all interface types (with backend type='passt')
The original implementation of the passt backend for vhost-user
interfaces erroneously forgot to parse:

  <source dev='blah'/>

for interface type='vhostuser', so it wasn't being added to the passt
commandline, and also wasn't being saved to the domain config. Now we
parse it whenever the <backend> type='passt', no matter what the
interface type, and then throw an error during validation if
source/@dev was specified for interface type = 'user|vhostuser' and
backend type != 'passt'.

Fixes: 1e9054b9c7
Resolves: https://issues.redhat.com/browse/RHEL-82539
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 13:43:44 -04:00
902237664f Remove unreachable breaks right after return
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:36 +01:00
c6f0819f1d qemu: remove unused vm from qemuBuildPVCommandLine
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:36 +01:00
5c52740587 qemu: remove unused vm from qemuBuildSEVSNPCommandLine
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
cda322b8b2 qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
fc43efc312 qemu: remove qemuCaps from qemuBuildObjectCommandline
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
7e0fbdf91d qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
Also from qemuBuildGraphicsVNCCommandLine

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
69ccd52b7c qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
28a22dc3a1 qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
7fc6764fb6 qemu: validate: fs: remove unneeded parameter
No longer required since we don't require driver->privileged anymore.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
e4383feaa4 qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
qemuCaps is obviously used.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-14 16:23:35 +01:00
b6dbabc589 NEWS: Mention new 'image_format' parameter for virDomainSaveParams
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-14 09:06:32 -06:00
b9f54f8792 docs: Clarify what source and name attributes of TPM profile describe
Clarify what source and name attributes of TPM profile describe and
update the version placeholder to the libvirt version when profiles
were first supported, v10.10. Also mention that profiles with prefix
'custom:' in their name can be modified.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-03-14 09:16:01 +01:00
eb6c28408d ch: Rework virCHProcessConnectMonitor()
Firstly, let's switch from explicit virCHDriverGetConfig() +
virObjectUnref() combo to g_autoptr(virCHDriverConfig). This
leaves us with the @monitor variable which is initialized to NULL
only to be then set to the retval of virCHMonitorNew() and
returned instantly. Well, the variable is now useless and can be
dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
5ed2ed8708 ch: Unref @cfg in virCHProcessStop()
At the beginning of virCHProcessStop() the ref to driver config
is obtained (via virCHDriverGetConfig()), but corresponding unref
call is lacking. Use g_autoptr() to make sure the config is
unrefed always.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
b9a10cf4bb ch: Free @iothreads array in virCHProcessSetupIOThreads()
When the CH driver starts a domain virCHProcessSetupIOThreads()
is called eventually which in turn calls
virCHMonitorGetIOThreads(). The latter returns an array of
iothreads which is never freed leading to a memleak:

130 (104 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 1,804 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0xB3A9359: virCHMonitorGetIOThreads (ch_monitor.c:1183)
   by 0xB3AA5BB: virCHProcessSetupIOThreads (ch_process.c:348)
   by 0xB3AAC59: virCHProcessSetup (ch_process.c:480)
   by 0xB3AC75A: virCHProcessStart (ch_process.c:973)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)
   by 0x4B1FB99: virNetServerProgramDispatch (virnetserverprogram.c:299)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
1b25f1e53b ch: Don't leak virCHDomainObjPrivate struct members
There are some members of the virCHDomainObjPrivate struct that
are allocated at various stages of domain lifecycle but then are
never freed:

1) cgroup - allocated in virDomainCgroupSetupCgroup()
2) autoCpuset - this one is actually never allocated (and thus is
                always NULL, but soon it may be used. Just free
                it for now, which is a NOP anyways.
3) autoNodeset - same story as 2).

There are two more members, which shouldn't be freed:

1) driver - this is just a raw pointer to the CH driver (see
   virCHDomainObjPrivateAlloc()).

2) monitor - this member is cleared in virCHProcessStop(), way
             before control even gets to
             virCHDomainObjPrivateFree().

452 (400 direct, 52 indirect) bytes in 1 blocks are definitely lost in loss record 1,944 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0x49479CE: virCgroupNewFromParent (vircgroup.c:893)
   by 0x49481BA: virCgroupNewDomainPartition (vircgroup.c:1068)
   by 0x494915E: virCgroupNewMachineManual (vircgroup.c:1378)
   by 0x49492FE: virCgroupNewMachine (vircgroup.c:1432)
   by 0x4B5E3DE: virDomainCgroupInitCgroup (domain_cgroup.c:377)
   by 0x4B5E9CD: virDomainCgroupSetupCgroup (domain_cgroup.c:524)
   by 0xB3AC693: virCHProcessStart (ch_process.c:951)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
9da8db464a ch: Free retval of curl_slist_append()
There are two places where curl_slist_append() is called but
corresponding call to curl_slist_free_all() is missing:
virCHMonitorPutNoContent() and virCHMonitorGet() which leads to
memleaks:

41 (16 direct, 25 indirect) bytes in 1 blocks are definitely lost in loss record 992 of 1,998
   at 0x4845888: malloc (vg_replace_malloc.c:446)
   by 0x5B2F8FE: curl_slist_append (in /usr/lib64/libcurl.so.4.8.0)
   by 0xB3A7B41: virCHMonitorPutNoContent (ch_monitor.c:824)
   by 0xB3A89FF: virCHMonitorBootVM (ch_monitor.c:1030)
   by 0xB3AC6F1: virCHProcessStart (ch_process.c:967)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)
   by 0x4B1FB99: virNetServerProgramDispatch (virnetserverprogram.c:299)
   by 0x4B28B5E: virNetServerProcessMsg (virnetserver.c:135)

88 (16 direct, 72 indirect) bytes in 1 blocks are definitely lost in loss record 1,501 of 1,998
   at 0x4845888: malloc (vg_replace_malloc.c:446)
   by 0x5B2F8FE: curl_slist_append (in /usr/lib64/libcurl.so.4.8.0)
   by 0xB3A7E41: virCHMonitorGet (ch_monitor.c:864)
   by 0xB3A92E2: virCHMonitorGetInfo (ch_monitor.c:1157)
   by 0xB3A9CEA: virCHProcessUpdateInfo (ch_process.c:142)
   by 0xB3AAD36: virCHProcessSetup (ch_process.c:492)
   by 0xB3AC75A: virCHProcessStart (ch_process.c:973)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
8701ba4feb network: Free inhibitor in networkStateCleanup()
The shutdown inhibitor is created in networkStateInitialize() but
corresponding call to virInhibitorFree() is missing in
networkStateCleanup() leading to a memleak:

116 (72 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 1,769 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0x4993B9B: virInhibitorNew (virinhibitor.c:152)
   by 0x5279394: networkStateInitialize (bridge_driver.c:654)
   by 0x4CC74DC: virStateInitialize (libvirt.c:665)
   by 0x15B719: daemonRunStateInit (remote_daemon.c:613)
   by 0x49F2B44: virThreadHelper (virthread.c:256)
   by 0x5356662: start_thread (in /usr/lib64/libc.so.6)
   by 0x53D7DA3: clone (in /usr/lib64/libc.so.6)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
4f1e9d02ea qemu: capabilites: Retire QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
The capability is no logner used as all qemus support it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
e5d7a871c5 qemu: migration: Always assume support for QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
The 'transform' attribute of 'bitmaps' was added in qemu-6.0, thus
we can assume all qemus we're willing to use support it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
eb27abb415 qemu: domain: Remove qemuDomainSupportsCheckpointsBlockjobs
The function now serves no real purpose.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
e1bce4ecd2 qemu: capabilites: Retire QEMU_CAPS_INCREMENTAL_BACKUP
All supported qemu versions now support this. Retire the capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
0b939c467a qemu: Always assume support for QEMU_CAPS_INCREMENTAL_BACKUP
The support for incremental backup (not the backup api itself) was gated
on support for migrating bitmaps. As the ability to migrate bitmaps was
added in qemu-6.0 we can now assume that all supported qemu versions
support incremental backup.

Remove the interlocking.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
e6815547c8 qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
All supported qemus have this and we already deleted alternate code.
Retire the feature flag.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
2f4e76a770 qemu: Always assume support for QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
qemu supports the @allow-write-only-overlay feature since qemu-5.0.
Remove the alternate code paths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
514c1f8dda qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_REOPEN
'blockdev-reopen' is supported since qemu-6.1. Since we now don't have
any code using this capability we can retire it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
4983cb62e6 qemu: Always assume support for QEMU_CAPS_BLOCKDEV_REOPEN
'blockdev-reopen' is supported since qemu-6.1, thus we can now remove
the interlocks.

Document the change to 'mirror' as this patch removes the last clue why
we overwrite the mirror's readonly state to false unconditionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
5ec6318c05 qemu: capabilities: Retire QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
The capability is no longer used as all qemus already support the
feature.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
a8ac578419 qemu: monitor: Always assume support for QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
The flat mode of 'query-named-block-nodes' is supported since qemu-5.0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
52ec7929b0 qemu: capabilities: Retire QEMU_CAPS_OBJECT_JSON
Now that we dropped support for old qemus which didn't support JSON
props for -object we can retire the capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
f46e2bf3b0 util: Drop 'virQEMUBuildCommandLineJSONArrayBitmap'
It was used to convert JSON arrays in legacy -object commandline
conversion. Since we now exclusively use JSON with -object, this
infrastructure is no longer needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
af227c6ab0 qemu: monitor: Drop support for extra wrapper for 'object_add'
The QAPIfication of objects removed the extra wrapper object which we
were adding in the monitor code to simplify the other callers.

Now that we support only qemus which don't require this we can drop the
support code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
51f7b35612 qemuBuildObjectCommandlineFromJSON: Assume all qemus support QEMU_CAPS_OBJECT_JSON
'-object' was qapified (meaning it supports JSON props) in qemu-6.0,
thus now that we require qemu-6.2 we can drop the compatibility code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
554a5e508a qemu: capabilities: Retire QEMU_CAPS_COMPAT_DEPRECATED
The capability always exists in qemu and is no longer checked.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
57cbe6a569 qemuBuildCompatDeprecatedCommandLine: Assume that QEMU_CAPS_COMPAT_DEPRECATED is supported
Bumping minimum version of qemu to 6.2 means that the '-compat' option
is now always supported.

As we were unable to detect it in any other way we based this capability
on QEMU_CAPS_OBJECT_JSON.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
67d2787807 domainbackupxml2xml: Add test case with unix socket server for pull mode backup
While we show the example in the docs we don't have an example XML for
exercising the parser/formatter and schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:36:46 +01:00
5d95391203 docs: formatdomain: Clarify configuration of iothread <-> virtqueue mapping
Add an example for the automatic/round-robin mapping of iothreads which
users should preferrably use. Until now the example contained even the
full mapping which could push users to use that instead.

Mention that the queues are then automatically distributed among the
iothreads.

Also clarify the need to set 'queues' when mapping threads explicitly
and how the queues are identified.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
0ee6848ca5 virDomainIothreadMappingDefParse: Fix usage of virXMLNodeGetSubelementList
virXMLNodeGetSubelementList always returns a non-NULL pointers thus we
should check the length instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
fcd47086f4 virXMLNodeGetSubelementList: Document return value semantics
The returned value is always non-NULL. Callers need to check the length
of the returned array instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
482a2d119b qemu: Use modern header formatting in 'qemu_command.h'
The file used intermixed style. Convert the last outliers to the new
formatting style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
080c7fd341 qemu: process: Remove un-updated 'qemuProcessStartWarnShmem'
The checks in qemuProcessStartWarnShmem are no longer current. Since
previous patch made it fatal for vhost-user interfaces to be configured
without shared memory this warning code can be deleted.

Resolves: https://issues.redhat.com/browse/RHEL-80533
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
0d20632179 qemuValidateDomainDeviceDefNetwork: Require shared memory for all vhost-user interfaces
Currently we produce only a warning into the log if a non-passt
vhost-user interface is configured with shared memory.

Since we do make it fatal with all other vhost-user types, fix the check
to trigger also for normal-vhost-user interfaces.

Since passt-based vhost-user interfaces are checked separately the check
will no longer be required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
779a975355 qemuxmlconftest: Include shared memory 'net-vhostuser' test cases
The vhost-user protocol requires shared memory support to work properly.

Our test XMLs didn't have it configured as for interface the check if
shared memory is present only produces a warning instead of a proper
error.

Upcoming patches will be moving the check to become fatal so the test
cases need to be fixed first.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
2daf61ffec qemuNodeGetSEVInfo: Use virTypedParamList to construct return value
Simplify the code by using the modern helpers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
710e90fc69 qemuDomainGetLaunchSecurityInfo: Use virTypedParamList to construct return value
Simplify the code by using the modern helpers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
20e0bc3fbd qemuDomainGetLaunchSecurityInfo: Don't forget unlock VM object on (impossible) error
If 'vm->def->sec->sectype' would be invalid; which is currently not
possible; we'd not unlock the domain object. Fix the logic even when the
bug currently can't happen.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
defca11627 src: expand docs for guest stats constant version handling
Explain that the 11.2.0 release dates are mostly reflecting when the
constant was first added, not when the key was introduced.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:17 +00:00
c27bced958 src: expand docs for guest stats array handling
Give an overview of how arrays are handled and represented in
the typed parameters returned by the guest stats API.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:16 +00:00
728b22be92 src: document that no constants are provided for custom VM stats
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:16 +00:00
5d9f73628b src: add constants for domain stats 'dirtyrate.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:06 +00:00
b1c0ec1767 src: add constants for domain stats 'memory.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:54 +00:00
ca0aa86fbb src: add constants for domain stats 'iothread.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:45 +00:00
69e8341f10 src: add constants for domain stats 'perf.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:35 +00:00
4661ceb067 src: add constants for domain stats 'block.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:24 +00:00
88bae83ea9 src: add constants for domain stats 'net.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:11 +00:00
b040ee0c98 src: add constants for domain stats 'vcpu.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:02 +00:00
6a16c3ca8c src: add constants for domain stats 'balloon.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:48 +00:00
947306957e src: add constants for domain stats 'cpu.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:37 +00:00
df0513fa36 src: add constants for domain stats 'state.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:25 +00:00
8927d4eedc src: expand docs for guest info constant version handling
Explain that the 11.2.0 release dates are mostly reflecting when the
constant was first added, not when the key was introduced.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:13 +00:00
5436eba3a8 src: expand docs for guest info array handling
Give an overview of how arrays are handled and represented in
the typed parameters returned by the guest info API.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:02 +00:00
325b5701ae src: add constants for guest info 'load.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:01 +00:00
9e725c1ccd src: add constants for guest info 'if.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:51 +00:00
d28a49cd6d src: add constants for guest info 'disk.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:41 +00:00
c9a8c55f96 src: add constants for guest info 'fs.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:30 +00:00
941d11fe71 src: add constant for the guest info 'hostname' parameter
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:16 +00:00
e7a122a192 src: add constants for guest info 'timezone.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:07 +00:00
7192539cec src: add constants for guest info 'os.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:57:56 +00:00
0a19b61a6c src: add constants for guest info 'user.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:57:28 +00:00
278b8334eb qemu: snapshot: error out early when reverting snapshot for VM with non-file disk
Before this patch the code would start the revert process by destroying
the VM and preparing to revert where it would fail with following error:

    error: unsupported configuration: source for disk 'sdb' is not a regular file; refusing to generate external snapshot name

and leaving user with offline VM even if it was running.

Make the check before we start the revert process to not destroy VMs.

Resolves: https://issues.redhat.com/browse/RHEL-30971
Resolves: https://issues.redhat.com/browse/RHEL-79928
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 17:51:11 +01:00
fc47a37a7a security: Don't stop restoring labels too early
The point of virSecurityManagerRestoreAllLabel() function is to
restore ALL labels and be tolerant to possible errors, i.e.
continue restoring seclabels and NOT return early.

Well, in two implementations of this internal API this type of
problem was found:

1) virSecurityDACRestoreAllLabel() returned early if
   virSecurityDACRestoreGraphicsLabel() failed, or when
   def->sec->sectype equals to an impossible value.

2) virSecuritySELinuxRestoreAllLabel() returned early if
   virSecuritySELinuxRestoreMemoryLabel() failed.

Fix all three places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 15:05:41 +01:00
63c0f15f09 docs: Correct dbus graphics' accepted p2p values
The attribute is used (and formatted) as virTristateBool() and even in
schema defined as virYesNo, so the values are supposed to be `yes` and
`no`.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-11 14:54:36 +01:00
b0527a8f8e tests: update capabilities for QEMU 9.2.0 on s390x
Update the replies and xml files for QEMU 9.2.0 on s390x based on
the released QEMU tag v9.2.0 with commit Id
ae35f033b874c627d81d51070187fbf55f0bf1a7.

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-03-11 14:03:46 +01:00
477a81fedb esx: Refactor esxVI_LookupHostScsiTopologyLunListByTargetName
With a specific combination of compiler options gcc reported the
following bogus warning (I added a context to it to make the issue
visible):

../src/esx/esx_vi.c: In function ‘esxVI_LookupHostScsiTopologyLunListByTargetName’:
../src/esx/esx_vi.c:4674:32: error: potential null pointer dereference [-Werror=null-dereference]
 4671 |     if (!found || !hostScsiTopologyTarget)
 4672 |         goto cleanup;
 4673 |
 4674 |     if (!hostScsiTopologyTarget->lun) {
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~

Most likely this is caused by found and hostScsiTopologyTarget doing
essentially the same thing as found is true if and only if
hostScsiTopologyTarget is non-NULL. The found variable is completely
redundant. Removing it would be enough, but I decided to make the code a
little bit easier to read by not using the iterator variable directly.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 12:20:21 +01:00
cc33c02ad5 ch: Enable SEV SNP support
Enable SEV-SNP support for ch guests.

Co-Authored-by: Smit Gardhariya <sgardhariya@microsoft.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 14:40:04 +01:00
695a4f38b5 util: Introduce virStringFormatHex
virStringFormatHex converts an input byte array into hex string and
returns it.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 14:39:59 +01:00
9d1e4b25ba security: Set seclabels on UEFI shim
Again, trivial. Just copy what is done for kernel and initrd.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:54:59 +01:00
39c1784ca0 qemu_command: Generate cmd line for UEFI shim
Trivial.

Resolves: https://issues.redhat.com/browse/RHEL-68043
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:54:42 +01:00
b136e492c5 qemu_validate: Check whether UEFI shim is supported
If UEFI shim is specified in domain XML but QEMU is too old, then
report an error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:53:06 +01:00
30be3b0d9d qemu_capabilities: Introduce QEMU_CAPS_MACHINE_SHIM
In its commit v9.2.0-323-ga5bd044b15 QEMU introduced another
command line option: -shim. It's used to load kernel. Track
presence of it via QEMU_CAPS_MACHINE_SHIM.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:51:42 +01:00
6b63334233 conf: 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, QEMU introduced
'-shim' cmd line option which side loads another UEFI binary
which can then contain new certification authorities or list of
revocations. Expose it as <shim/> element that's nested under
<os/>, just like kernel and initrd are.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:32:46 +01:00
17945b8ec9 qemucapabilitiestest: Add data for the qemu-10.0 dev cycle on x86_64 for the '+amdsev' variant
Add data based on 'v9.2.0-2369-g98c7362b1e'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
c941fec220 qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-2369-g98c7362b1e'
Notable changes:
 - 'uefi-vars-x64', 'uefi-vars-sysbus' qom type added
 - 'YongFeng-v1-x86_64-cpu' added
 - 'accel' qom type removed
 - 'addr' field of devices changed type to 'str'
 - 'vfio-pci' gained experimental feature 'x-migration-multifd-transfer'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
5cc3803d1d qemu: block: Drop 'sheepdog' protocol support
As now no supported qemu version supports the 'sheepdog' protocol drop
the code for configuring the blockdev layer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
8824af826d qemu: capabilities: Bump minimum qemu to qemu-6.2
Following minimum versions are needed based on our support policy:

             CentOS Stream 9: 9.1
                   Debian 12: 7.2
                   Fedora 40: 8.2
          openSUSE Leap 15.6: 8.2
                Ubuntu 22.04: 6.2
               FreeBSD ports: 9.2
              macOS homebrew: 9.2
              macOS macports: 9.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
cbe39cfa8e qemucapabilitiesdata: Drop un-updated 'qemu_8.0.0_riscv64' data
The riscv64 qemu-8.0 data were not updated to the release version. Drop
them instead of trying to do archaeology.

They are not used in any 'qemuxmlconftest' case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
81098ff4c6 qemucapabilitiesdata: Drop un-updated 'caps_7.0.0_aarch64' data
The aarch-64 qemu-7.0 data were not updated to the release version. Drop
them instead of trying to do archaeology.

They are not used in any 'qemuxmlconftest' case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
623312ecfb qemucapabilitiesdata: Drop un-updated 'qemu_6.2.0_aarch64' data
We'll be bumping to qemu-6.2 as minimum and the aarch64 qemu-6.2 data
were not updated to the release version. Drop them instead of trying to
do archaeology.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
991ac7372f qemucapabilitiestest: Drop unused fake data 'caps_7.0.0_aarch64+hvf'
The 'caps_7.0.0_aarch64+hvf' caps dump is fake; obtained from copying
and doctoring the 'caps_7.0.0_aarch64' file (see commit 12aedb414578d3 )

Remove it now that it was superseded by a dump obtained from a proper
hvf-enabled host.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
c63055dc38 qemucapabilitiestest: Add 'qemu_9.2.0.aarch64+hvf' test data
The data is collected from an MacOS host with latest released qemu from
homebrew.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
ac3291f8db qemucapabilitiestest: Drop qemu-6.1 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
58193c5b25 qemucapabilitiestest: Drop qemu-6.0 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
4ddc5cdddc qemucapabilitiestest: Drop qemu-5.2 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
ab10e9b003 qemuxmlconftest: Drop tests pinned to qemu-6.1
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
9d3e9e0bc7 qemuxmlconftest: Drop tests pinned to qemu-6.0
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
f642c029f5 qemuxmlconftest: Drop tests pinned to qemu-5.2
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
f976d1b06c conf: Drop support for 'sheepdog' disks
In upcoming patches we'll update minimum supported qemu version to
qemu-6.2 which no longer supports 'sheepdog'. This was the only
hypervisor driver that supported it.

Reject any config containing sheepdog disks when validating the XML,
remove the positive test cases in qemu and replace them by a negative
test case. This will still excercise the XML schema, but will prepare
for removal of the internal code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
23c3900054 ci: refresh with 'lcitool manifest'
- Remove EOL Debian 11

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-07 15:46:21 +01:00
d23a516eba util: netdevvlan: Change return type of virNetDevVlanCopy to void
This function return value is invariant since 1022e0ee, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Alexander Rudyuk <a.rudyuk@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-07 14:48:01 +01:00
c4b7d29610 util: virxml: unexport virXMLFormatElementInternal
It is no longer used anywhere else.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:46 +01:00
e042ff6dd0 domain_conf: refactor virDomainLoaderDefFormatNvram
Use the new virXMLFormatDirect in order to remove usage of
virXMLFormatInternal.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:44 +01:00
aedfdaa3f6 conf: use virXMLFormatElementDirect
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:41 +01:00
4cc562651f util: virxml: introduce virXMLFormatElementDirect
This can be used to format XML where the element has direct value
instead of any subelement. For example:

    <maxMemory slots='16' unit='KiB'>1524288</maxMemory>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:38 +01:00
915b2bfcfe Translated using Weblate (Spanish)
Currently translated at 52.6% (5704 of 10838 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-03-07 13:53:57 +01:00
798d87539d domain_conf: graphics: properly escape user provided strings when formatting XML
This was reported on virt-manager issue tracker as it was possible to
provide `listen` attribute with properly escaped characters but libvirt
would format XML without escaping it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
6786ae80a3 domain_conf: graphics: fix error messages when formatting XML
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
1ef5926a80 domain_conf: graphics: move remaining VNC formatting
Now we are able to move the rest into virDomainGraphicsDefFormatVNC
without breaking order of elements in the resulting XML.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
15599d3481 domain_conf: graphics: move remaining spice formatting
Now we are able to move the rest into virDomainGraphicsDefFormatSpice
without breaking order of elements in the resulting XML.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
08925c0bea domain_conf: graphics: move listens formatting to relevant graphics types
Only VNC, RDP and Spice graphics types are using listen elements so call
the function only where it is needed.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
5f97b846f0 domain_conf: graphics: extract listen formatting to separate function
This will be used in specific graphics types that are using listen
elements.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
4c2c7720fe domain_conf: graphics: extract DBus formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
e95d362ba7 domain_conf: graphics: extract EGL-Headless formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
287c1a761e domain_conf: graphics: extract Spice formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
a93ea4cd84 domain_conf: graphics: extract Desktop formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
c2dcb47413 domain_conf: graphics: extract RDP formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
7a05d981eb domain_conf: graphics: extract SDL formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
9774254ce3 domain_conf: graphics: extract VNC formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
227bf2c9de domain_conf: modernize graphics formatting
Use separate buffers for attributes and children elements to make the
code cleaner and to use the virXMLFormatElement() function.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
8d055b7d61 domain_conf: graphics: use a function to format audio element
Removes code duplication.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
320273df54 domain_conf: graphics: use a function to format gl element
Removes code duplication.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
288f90feb3 qemu: support MSDM ACPI table type
The MSDM ACPI table is a replacement for the SLIC table type, now
sometimes used by Microsoft for Windows Licensing checks:

  https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85)

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/748
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
32765cd14e conf: support MSDM ACPI table type
The MSDM ACPI table is an alternative for the SLIC table type,
sometimes used by Microsoft for Windows Licensing checks:

  https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
dac6ecba6f libxl: support 'rawset' ACPI table type
This fixes representation of the 'acpi_firmware' config in the Xen
driver, which repesents a concatenation of tables of any type.

Use of 'type=slic' is accepted on input for backwards compatibility.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
fe0cf62e0f qemu: support 'raw' ACPI table type
This allows passing a single ACPI table of any type through to QEMU with
the signture autodetected from the header.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
513ef8f028 src: introduce 'raw' and 'rawset' ACPI table types
The QEMU driver has only accepted type=slic even though QEMU is able to
accept individual tables of any type, without needing to specify a
signature. Introduce type=raw to address this usage scenario. Contrary
to other types, this one may appear multiple times.

The Xen driver has mistakenly accepted type=slic and use it to set the
Xen acpi_firmware setting, which performs a simple passthrough of
multiple concatenated data table. Introduce type=rawset to address
this usage scenario.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
3d94587655 src: validate permitted ACPI table types in libxl/qemu drivers
This forces us to update the drivers when defining new table types
to avoid incorrectly accepting them by default.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
55f48d3852 conf: introduce support for multiple ACPI tables
Currently we parse

   <os>
     <acpi>
       <table type="slic">...path...</table>
     </acpi>
   </os>

into a flat 'char *slic_table' field which is rather an anti-pattern
as it has special cased a single attribute type.

This rewrites the internal design to permit multiple table types to
be parsed, should we add more in future. Each type is currently
permitted to only appear once.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
92de6563c6 nwfilter: Fix deadlock between nwfilter-list and VM startup/migration
The `nwfilterBindingCreateXML` and `nwfilterConnectListAllNWFilters`
APIs can acquire locks on multiple instances of virNWFilterObj. There
is no guarantee they will acquire these locks in the same order as
each other. Thus there is a potential for deadlock if they run
concurrently acquiring locks on the same filter objects.

This flaw has always existed, but historically was rare, because
virNWFilterObjList previously used an array. This meant iteration
over filters had a fixed order, matching order of loading filters
into libvirt.  The set of filter references would have to be just
right to expose the lock ordering deadlock.

In 8.2.0, commit c4fb52dc72 switched
to use a hash table, introducing non-determinism to the iteration
order, as hash buckets vary based on the hash seed. As such almost
any filter with references is exposed to the deadlock risk now.

It is not easy  to guarantee lock ordering on the virNWFilterObj
instances, so acquiring `driverMutex` first, will serve to serialize
all lock acquisition on virNWFilterObj instances, avoiding the
deadlock scenario.

The major cost is that concurrency of the driver is significantly
reduced, with few other APIs able to run in parallel with updating
firewall rules.

A long term solution to this problem needs significant changes

 * The mutex on virNWFilterObj would need to change to a R/W
   lock.
 * The filter instantiation/teardown process would need to split
   into two phases. The first phase would resolve all the required
   virNWFilterObj instances & acquire read locks, while holding
   the 'driverMutex'. The second phase of running iptables/ebtables
   commands would then run without driverMutex held.
 * The filter define/undefine APIs would need to acquire write
   locks, other APIs only read locks.

This would allow concurrency of filter instantiation/teardown
with everything except for filter defnie/undefine, which was
the original desire.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[DPB: rewrite commit message & add inline comment]
Signed-off-by: Dion Bosschieter <dionbosschieter@gmail.com>
2025-03-07 12:38:57 +00:00
8acc0b76c6 qemu: snapshot: Remove dead code in qemuSnapshotDeleteBlockJobFinishing()
qemuSnapshotDeleteBlockJobFinishing() returns only 0 and 1. Convert it
to bool and remove the dead code handling -1 return in the caller.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Reported-by: Andrey Slepykh <a.slepykh@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-06 15:04:06 +01:00
628989369b docs: Fix formatting in formatdomain.rst
The combination of italics and the since tag does not work together.

Remove it from the paragraph about using passt with vhostuser,
as well as the parentheses around it.

Signed-off-by: Yalan Zhang <yalzhang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-03-06 14:36:48 +01:00
07d8755523 domain_caps: Don't leak 'cpu0_id' in 'virSEVCapabilitiesFree'
Freeing the 'virSEVCapability' object leaked the 'cpu0_id' field since
its introduction.

Fixes: 0236e6154c
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-03-06 14:06:46 +01:00
bddb2363e8 qemuxmlconftest: Add '+amdsev' versions of the rest of 'launch-security-sev*' cases
While the 'launch-security-sev-direct' and 'launch-security-sev-snp'
cases use "latest" caps, they use the non-sev variant and add-in the
relevant capabilities.

To do the test properly we can add '+amdsev' variant which uses caps
fetched from a real host that does support all the capabilities.

The output files are identical, although they are not added as symlinks
to prevent headaches if they do diverge at some point.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
8a852c3a90 qemuxmlconftest: Add 'latest' version of 'launch-security-sev*' originally using 6.0.0
The 'launch-security-sev' and
'launch-security-sev-missing-platform-info' tests run agains the
qemu-6.0.0 caps which were manually doctored to support SEV.

Since we now have the '+amdsev' variant dumped from a more modern qemu
add another invocation of the tests.

The only relevant difference in the output data is 'cbitpos' being '51'
on the new platform, for the test case which explicitly doesn't
configure it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
59e528ea0d qemuxmlconftest: Propery discriminate output files for caps variants
While the 'qemuxmlconftest' was able to load capability variants the
output file name didn't include the variant thus it was not possible to
test the same input file both on the default variant and on an explicit
variant.

Include the variant in the output file name and adjust two output file
names.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
4492348b96 qemucapabilitiestest: Add test data for 'qemu-9.2' on a SEV-enabled AMD host
Introduce the test data as 'qemu_9.2.0.x86_64+amdsev' to test
SEV-related capability code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
0e58c04fc9 qemucapabilitiesdata: Document '+amdsev' variant
Upcoming patch will introduce test data from an SEV-enabled host.
Document the new variant.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
b7657a6d2e domaincapstest: Allow tests of all capability variants
Currently only the default variant ("") and "+hvf" are present in our
test data but upcoming patches will add another variant.

Upcoming test variants may not require any special handling so we should
be able to handle them using the default code path now that 'variant' is
properly propagated inside the test code.

Remove the restriction to test only the default ("") and "+hvf" variant
and modify the documentation to state that any other variant is tested
the same way as the default one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
af68ab6b26 domaincapstest: Use proper input file based on 'variant' in 'fillQemuCaps'
The qemu part of 'domaincapstest' supports testing of the '+hvf' variant
of files, but doesn't properly pick the input file. The input file lacks
the variant part thus the wrong file is used.

Propagate the variant and select the correct input file.

Fixes: 738c5bae88
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
107cf9992f qemu: capabilities: Parse 'cpu0Id' from capability cache XML
The 'cpu0Id' field is formatted into the caps cache XML but not parsed
back; thus restart of the daemon will make it vanish.

Fixes: 0236e6154c
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
25270737d3 conf: change virDomainDefAddImplicitControllers() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
fd6cfeeeea conf: change virDomainDefMaybeAddSmartcardController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
be9a0f4764 conf: change virDomainDefMaybeAddVirtioSerialController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
74e36dfce0 conf: change virDomainDefAddDiskControllersForType() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
7cfcfcc403 conf: change virDomainDefMaybeAddHostdevSCSIcontroller() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
250d6ac2a0 conf: change virDomainDefMaybeAddController() to return true/false
This function can't fail, but it has always returned 1 if a controller
is added and 0 if not, and there is one place that checks for a 1
return, so we remove the -1 return and change it to return true/false
instead of 1/0.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
cc82b06036 hyperv: change hypervDomainDefAppendController() to return void
It can't fail. And as a result, hypervDomainDefAppendSCSIController() and
hypervDomainDefAppendIDEController() can also be changed to return void.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
e207c9c17e conf: change virDomainDefAddUSBController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
b0ef70aca9 conf: stop checking for NULL return from virDomainDefAddController()
It can't fail, so the caller doesn't need to check the return.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
b62ce44a61 conf: stop checking for NULL return from virDomainControllerDefNew()
It can't fail, so the caller doesn't need to check the return.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
3d263290df conf: change qemuDomainDefAddImplicitInputDevice() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
b7da649e6e libxl: change xenDomainDefAddImplicitInputDevice() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
8733ce0151 conf: change virDomainDefMaybeAddInput() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
2f8fde6680 conf: change virDomainShmemDefInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
1456fe2c54 conf: change virDomainFSInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
5c5135849b conf: change virDomainNetInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
9bd83854f7 ci: refresh with 'lcitool manifest'
Replace Alpine Linux v3.19 with v3.21.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:30 +01:00
49b2a75e04 ci: use Fedora 41 to run integration tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:29 +01:00
7762cbc308 ci: use iptables to run libvirt-tck
On current Fedora libvirt uses nftables by default but the libvirt-tck
tests are not ready for it and most of the nwfilter tests fail. We need
to keep using iptables for now.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:12 +01:00
b98a474a44 docs/api.rst: revert erroneously change of Once -> OnDevice
Commit af1b89d1d for some reason changed a perfectly fine statement to
one that I could not understand.  Let's revert it.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-04 09:31:36 +01:00
e5299ddf86 meson: Generate runstatedir according to newer standard
While previously FHS 2.3 defined /var/run as a place to store
runtime information [1] it's no longer 2004 and newer
specification was released which favors /run [2]. Since it was
released 10 years ago, maybe it's time we start honouring it.

On majority of Linux systems (if not all), /var/run is a symlink
to /run anyways.

Users can still pass old location via -Drunstatedir.

1: https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA
2: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-04 08:36:21 +01:00
100dd5f3a7 virDomainHostdevDefNew: update users not to check return value
virDomainHostdevDefNew() has been using g_new0() for a while now. As it
calls abort() on OOM, it's not necessary to check whether
the return value is NULL.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-03-03 19:22:37 +01:00
5e3e924248 qemu: Add support for 'image_format' typed parameter
Add support for the 'image_format' typed parameter in virDomainSaveParams.
The parameter overrides the 'save_image_format' setting in qemu.conf.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:30 -07:00
fdb7b1e19a include: Define constant for save image format
Add a new VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter for
specifying the save image format. A format specified via the
virDomainSaveParams API overrides the save_image_format setting
in qemu.conf. The 'raw' format remains the default.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:24 -07:00
ec50e0cf63 qemu: Check for valid save image formats when loading driver config
Checking for valid 'foo_image_format' settings in qemu.conf is not done
until the settings are used. Move the checks to
virQEMUDriverConfigLoadSaveEntry, allowing to report incorrect format
settings at driver startup.

This change was made easier by also changing the corresponding fields
in the virQEMUDriverConfig to 'int', which is more in line with the
other fields that represent enumerated types.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:18 -07:00
1564607cd0 qemu: Change return value of SaveImageGetCompressionProgram
qemuSaveImageGetCompressionProgram is a bit overloaded. Along with
getting a compression program, it checks the validity of the image
format and returns the integer representation of the format. Change
the function to only handle retrieving the specified compression
program, returning success or failure. Checking the validity of
the image format can be left to the calling functions.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:11 -07:00
757fa62cfd qemu: Don't ignore dump image format errors
Long ago, without justification, commit 48cb9f0542 changed
qemuGetCompressionProgram (since renamed to
qemuSaveImageGetCompressionProgram) to ignore configuration errors
for dump operations. Like the other save-related operations, user
provided configuration should be verified and an error reported if
it cannot be honored.

Remove the special handling of configuration errors in
qemuSaveImageGetCompressionProgram and change the dump logic to
fail when dump image format cannot be supported.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:06 -07:00
1a5692a6e1 qemu: Move declaration of virQEMUSaveFormat to header file
Allow use of the enum outside of qemu_saveimage.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:04:56 -07:00
1bbb1a02d9 schemas: domaincaps: Add missing schema for '<cpu0Id>'
Fixes: 0236e6154c
Resolves: https://issues.redhat.com/browse/RHEL-81890
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 17:00:32 +01:00
e088895a62 qemuPrepareNVRAMFile: Fix NVRAM image conversion check
In case when user provides custom paths (those not covered by the JSON
firmware descriptor files or  the default locations) for the
loader and nvram template no auto-detection will be performed and user's
config will be taken at face value. Historically when 'templateFormat'
didn't exist we assumed that the 'format' field covers both.

Thus if 'templateFormat' is VIR_STORAGE_FILE_NONE we need to skip the
check forbidding image format conversion for 'file' backed to avoid
breaking legacy configs with manual/non-detected format assuming that
user picked the correct format.

Add a comment to the declaration of 'nvramTemplateFormat' noting the
above for future reference.

Resolves: https://issues.redhat.com/browse/RHEL-81731
Fixes: 2aa644a2fc
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 16:59:35 +01:00
a479c3465e conf: metadata: remove metadata node if all metadata is removed
When removing the last child element from a network or domain
metadata, free the metadata node itself as well, to prevent
displaying an empty metadata element.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
0b69d47774 conf: metadata: ignore empty metadata element
Do not copy the <metadata> node to domain/network definition
if its empty.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
633c55dbd6 conf: obj: remove extra empty line
Originally present in virDomainDefSetMetadata it got copied to
virNetworkDefSetMetadata too.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
66d6fd7ffa conf: networkobj: fix indentation
'Network' has one more letter than 'Domain' where these helpers
were copied from. Shift the unaligned lines by one.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
282f38ad3d cpu_map: arm: Add AmpereOne CPU models
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:10:38 +01:00
7d78044165 cpu_arm: Report vendor ID for unknown PVRs
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:10:37 +01:00
40b83176af qemuDomainGetGuestInfo: Remove temporary infrastructure
Now that the refactor was completed the helper infrastructure can be
removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
9f4c6ebc39 qemuDomainGetGuestInfo: Convert hostname code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
dd59d0f77d qemuAgentGetUsers: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
0f5bb2c20d qemuAgentGetOSInfo: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
52fd07c9f0 qemuAgentGetTimezone: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
3d0203709f qemuAgentFSInfoFormatParams: Convert interface code to virTypedParamList
Also remove stale TODO comment as we already report disk target.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
1dc68d6c6e qemuAgentDiskInfoFormatParams: Convert interface code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
3c75bae720 virDomainInterfaceFormatParams: Convert interface code to virTypedParamList
Also deletes pre-existing broken formatting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
2391a96141 qemuDomainGetGuestInfo: Convert load code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
d6b34d0de8 qemuDomainGetGuestInfo: Prepare for refactor to virTypedParamList
Use of raw typed param APIs is very clunky. Prepare
qemuDomainGetGuestInfo for step-by-step refactor to virTypedParamList.

The two lists will coexist until the refactor is complete.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
89a57e7fe0 qemu: Report disk bus as reported by agent in virDomainGetGuestInfo
KubeVirt decided to report this to the users. In order to allow them to
use proper APIs expose the field as well.

Resolves: https://issues.redhat.com/browse/RHEL-80688
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
71e75ce092 virsh: Add support for VIR_DOMAIN_GUEST_INFO_LOAD
Resolves: https://issues.redhat.com/browse/RHEL-71883
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:45 +01:00
b4cf9c8cba qemu: Add support for VIR_DOMAIN_GUEST_INFO_LOAD
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:44 +01:00
1669d91ead qemu_agent: Add qemuAgentGetLoadAvg()
With qemu guest agent 9.3 we are able to get the load averages with a
new command.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:44 +01:00
c52c449fd4 Add load average information type into virDomainGetGuestInfo
The public API part.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:43 +01:00
e9cb690d21 Post-release version bump to 11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 13:42:18 +01:00
9cd0673748 Release of libvirt-11.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 13:12:30 +01:00
2c4e820188 Translated using Weblate (Korean)
Currently translated at 99.4% (10783 of 10838 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-03-01 04:12:33 +01:00
538b50f0c9 NEWS: Document crasher fix in qemuDomainCheckCPU
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-28 10:41:22 +01:00
d99d3e1232 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: Martin Kletzander <mkletzan@redhat.com>
2025-02-27 15:54:54 +01:00
4809604315 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10838 of 10838 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.4% (10774 of 10838 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-02-26 10:46:59 +01:00
ffeb1c99fc Translated using Weblate (Korean)
Currently translated at 99.4% (10781 of 10838 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-02-26 10:46:59 +01:00
98262a61b2 docs: formatdomain: fix typo in passt section
A mismatch in backticks happened.

Fixes: a47a89a9d3
Reported-by: Yalan Zhang <yalzhang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-02-26 10:45:20 +01:00
aae38da829 qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-1967-gb69801dd6b'
Notable changes:
 - 'NETDEV_VHOST_USER_CONNECTED'/'NETDEV_VHOST_USER_DISCONNECTED' events
   added
 - 'handshake-max-seconds' argument for 'nbd-server-start' added

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-02-25 13:41:26 +01:00
291186daa3 apparmor: Allow SGX if configured
If SGX memory model is configured for domain then we need to
allow QEMU access some additional files:

  1) /dev/sgx_vepc needs to be RW
  2) /dev/sgx_provision needs to be RO

We already do this in SELinux driver but not in AppArmor.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/751

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-25 12:48:24 +01:00
5c78395bad cpu: Do not call g_strv_contains on NULL list
When virCPUx86UpdateLive checks whether a feature was added to a CPU
model after the model was already released (vmx-* features in most Intel
models), the following assert could be logged by glib:

    g_strv_contains: assertion 'strv != NULL' failed

While most of our CPU models have a non-empty list of added feature, new
models added in 2024 and versioned variants of older models have
addedFeatures == NULL.

Fixes: e622970c87
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-25 09:35:26 +01:00
d36c91ae14 run: Use correct SELinux context for modular daemons
Only libvirtd uses virtd_t/virt_exec_t context, modular daemons use
their specific context each.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-25 09:35:26 +01:00
9433433ddf 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-02-24 12:52:22 +01:00
ce88939324 po: Refresh potfile for v11.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-24 12:54:04 +01:00
ce66d7e01b build: Enable syntax checks for vshError and vshWarn
To make sure both error and warning messages printed by virsh are
properly marked for translation.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
2844744346 virsh: Let prohibit_newline_at_end_of_diagnostic check pass
The prohibit_newline_at_end_of_diagnostic syntax check is confused when
another unrelated translatable message with a newline is too close to
the function it is supposed to check. Refactoring the code to make the
two strings further apart seems like the easiest solution.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
ffad5ce459 virsh: Drop extra newlines at the end of error messages
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
ad59ebb8d0 virsh: Avoid using translated messages without format
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
ad57923b36 virsh: Properly mark all error messages for translation
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
644f56f9d5 virsh: Do not require \n in vshDebug messages
Having to put a newline at the end of each debug message in virsh has
always felt strange.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
2fb76aeae6 virsh: Warn when hypervisor-cpu-* is used with host CPU
While using host CPU definition from capabilities XML is allowed for
historical reasons, it will likely provide incorrect results and should
be avoided.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
71fe4b97a9 virsh: Introduce vshWarn
This new function can be used for printing warnings about suboptimal
usage.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
c12f92a05e virsh: Refactor vshError
The code is moved into a newly introduced generic vshPrintStderr and
vshError changed into a tiny wrapper.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
ddef7271fd virsh: Make messages printed by vshError properly translatable
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
575b3ea925 virsh: Do not format messages twice
The same message was formatted both in vshOutputLogFile and in vshDebug
and vshError functions. This patch refactor vshOutputLogFile and its
callers to only format each message once.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:11 +01:00
af0507e2e4 docs: Clarify documentation of virsh hypervisor-cpu-baseline
Using host CPU definition with hypervisor-cpu-baseline is possible, but
it provide incorrect results and thus it should not be documented the
same way we describe the correct usage. Also using host-model CPU from
domain capabilities was not described clearly enough.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:10 +01:00
e8323cc7db docs: Clarify documentation of virsh hypervisor-cpu-compare
Using host CPU definition with hypervisor-cpu-compare is possible, but
it provide incorrect results and thus it should not be documented the
same way we describe the correct usage. Also using host-model CPU from
domain capabilities was not described clearly enough.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-24 11:14:10 +01:00
c721f9ef78 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 93.6% (10094 of 10781 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
2025-02-21 19:48:32 +01:00
4e963f590f Translated using Weblate (Telugu)
Currently translated at 43.9% (4742 of 10781 strings)

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

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

Translated using Weblate (Dutch)

Currently translated at 19.4% (2099 of 10781 strings)

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

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

Translated using Weblate (Kannada)

Currently translated at 44.2% (4768 of 10781 strings)

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

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

Translated using Weblate (Hindi)

Currently translated at 27.2% (2940 of 10781 strings)

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

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

Translated using Weblate (French)

Currently translated at 93.5% (10086 of 10781 strings)

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

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

Translated using Weblate (German)

Currently translated at 44.7% (4829 of 10781 strings)

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

Signed-off-by: Anonymous <noreply@weblate.org>
2025-02-21 19:48:32 +01:00
be5332c81d schema: fix <interleave> errors when validating <domain> subelements
I first noticed a problem when I added a <memoryBacking> element at an
unusual (but still correct) place in the domain XML, and validation
failed. Then I tried adding that element in several different places
and it failed in many, but not all of them.

(NB: from here on, I will use '' for the names of attributes in the
domain XML, <> for elements in the domain XML, and "" for the names of
grammar rule definitions in the RNG file, and "<>" for the names of
elements in the RNG file's own XML. Confused yet? If so, please tell
me a better way - everything I know about RNG I've picked up
informally by looking at examples in already existing RNG files)

Starting from the top level of the grammar for <domain>
("domaincontents" in domaincommon.rng), I noticed that

1) the "<attribute>" for the 'id' attribute of <domain> is defined
   inside an "<interleave>" down in the definition of "ids" (which is
   referenced from "domaincontents") (I'm not familiar with the
   nomenclature - does that make it a "sub-grammer", "child-grammar",
   ???)

2) although the definition of "ids", had all of its
   "<attribute>"s/"<element>"s inside an "<interleave>",
   "domaincontents" already had the reference to "ids" inside an
   "<interleave>", so there were nested "<interleave>"s.

It's not clear to me how an "<attribute>" or "<interleave>" inside
another "<interleave>" is supposed to behave, but they both seemed a
bit suspicious.

I tried all of the below modifications:

1) moving the grammar for the 'id' attribute out of the "<interleave>"
   but still inside "ids"

2) moving the grammer for the 'id' attribute directly into
   "domaincontents" (and outside of its "interleave"

3) removing the "<interleave>" that was inside "ids"

4) (2) + (3)

5) move the entire grammar rule "ids" up directly in place of <ref
   name="ids"> in "domaincontents".

6) (5), but with the grammar for the 'id' attribute moved outside of
   the "<interleave>"

(6) was the only change that allowed all of the following (using
modifications to the subelements of <domain> in
net-vhostuser-passt.xml as example):

a) a <memoryBacking> element in between *any* two existing elements

b) moving <name> in between any two elements

c) oddly, in addition to the problem with putting <memoryBacking> in
   odd places, I also found that the original RNG did not allow the
   <clock> element to be placed in between <on_poweroff> and
   <on_reboot>, but once I'd made the change in (6), this was no
   longer problematic. Why should this have any effect? No idea, but
   it works :-/

(NB: there are many other cases of referencing "sub-grammar" from
inside an "<interleave>", and they all seem to work just fine;
possibly in this case it was problematic because the sub-grammar a)
also contained an "<interleave>", b) had an "<attribute>" at its
toplevel, or c) had multiple "<element>"s.)

(inexplicably (to me) at one point during my experimentation, I tried
reordering the references to "clock", "resources", "features", and
"events", and that *also* made it legal to put a <clock> element in
between the <on_*> elements:-O)

Since I was no longer able to reproduce the error described in (c)
once I had made mod (6) (move all of "ids" directly into
"domaincontent", I decided it was pointless for me to spend any more
time randomly poking and just add that to the new test case for that
in case some other random change to the RNG causes it to start failing
again.

(I thought of writing a test program that would try all possible
orderings of the subelements of <domain>, but since doing that for
even 10 subelements would mean testing > 3.2 million different XML
documents, I decided we could continue in this adhoc manner, just
adding a single new test case if/when a new validation failure is
found.)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-21 13:52:52 -05:00
6f70da39c1 tests: be consistent about following DO_TEST_*() with a ;
As is often the case with macros (especially those that resolve to
multiple statements), it isn't technically necessary to end any of the
invocations of the DO_TEST_*() macros with a semicolon (as evidenced
by the lines changed in this path). Having does make some
auto-indenters (e.g. cc-mode in emacs) more likely to do the right
thing, though, and it also looks nicer if all the lines are similar.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-21 13:52:42 -05:00
d78260cd3f conf: Validate that iothreads are used only with 'virtio-scsi' controllers
The documentation states:

 ``iothread``
    Supported for controller type ``scsi`` using model ``virtio-scsi`` for
    ``address`` types ``pci`` and ``ccw`` :since:`since 1.3.5 (QEMU 2.4)`. The

The code itself didn't validate if iothread is specified for any other
controller type.

Add test case showing the issue on one example.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:45 +01:00
1b4e451dcb conf: schemas: Rename 'diskDriverIothreads' to 'iothreadMapping'
The schema definition will be reused when adding iothread<->virtqueue
mapping for 'virtio-scsi'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:45 +01:00
e1c3fead7d qemuValidateCheckSCSIControllerIOThreads: Return '0' and '-1' instead of bools
The function reports libvirt errors so stick with the usual '0' and '-1'
return values.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:45 +01:00
a2183d9a13 qemu: validate: Extract iothread mapping validation code
Extract the code to 'qemuDomainValidateIothreadMapping'. It will be
reused to validate the mapping for 'virtio-scsi' iothreads.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:45 +01:00
a21319bb94 qemu: command: Rename 'qemuBuildDiskDeviceIothreadMappingProps' to 'qemuBuildIothreadMappingProps'
Prepare for reuse of the code for 'virtio-scsi' controller.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:45 +01:00
3313ab3932 hypervisor: domain: Extract code for checking iothread usage
The code will be also needed for 'virtio-scsi' controller definitions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:44 +01:00
79c68ae313 conf: domain: Extract code for parsing and formatting iothread mapping definition
The code will be also needed for 'virtio-scsi' controller definitions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:44 +01:00
4b651cf890 conf: Rename 'virDomainDiskIothreadDef' to 'virDomainIothreadMappingDef'
The iothread mapping will be also possible for 'virtio-scsi' controllers
so rename the corresponding structs to a generic name.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:21:44 +01:00
33ae851409 docs: formatdomain: Mention that vhostuser interface with mode='server' waits for connection
When starting a VM with a vhost-user interface in server mode qemu will
wait for the incoming connection without running CPUs. This isn't really
documented in our XML. Additionally when hotplugging the same interface
the above will not happen.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:18:11 +01:00
1348aa8f6e docs: formatdomain: Document few NVRAM config limitations
Note that 'block' backed NVRAM may need to use 'qcow2' images to work
properly and that populating from template may not support format
conversion.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:18:11 +01:00
f0c9c34d58 qemuDomainGetStats: Convert worker functions to void
The presence of a return value made it seem that it's expected to fail
on errors which is not the case. The function is designed to skip
anything it can't fill and not fail when fetching individual stats.

Convert the workers to void to make it clear that it's expected not
to fail.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:41 +01:00
4086f9ed5c qemuDomainGetStatsDirtyRate: Don't error out
The bulk domain stats API is meant to collect as much data as possible
without erroring out.

If fetching of the dirty rate stats fails just skip outputting them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:41 +01:00
a0122665c6 qemuDomainGetStatsMemoryBandwidth: Don't error out
The bulk domain stats API is meant to collect as much data as possible
without erroring out.

If fetching of the memory bandwidth stats fails just skip outputting them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:41 +01:00
a761c44b90 qemuDomainGetStatsIOThread: Don't error out if fetching iothread info fails
The bulk domain stats API is meant to collect as much data as possible
without erroring out. Ignore errors from 'qemuDomainGetIOThreadsMon()'
and skip the data if an error happens.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:41 +01:00
f05f54d8fb qemuDomainGetStatsPerfOneEvent: Ignore erros from 'virPerfReadEvent'
The bulk domain stats API is meant to collect as much data as possible
without erroring out. Skip the perf stats if we can't fetch them instead
of erroring out.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
613901baec virPerfReadEvent: Refactor to return -errno on failure
The function didn't comply with libvirt's error reporting scheme as it
reported libvirt errors only sometimes. As callers may want to ignore
errors convert it to returning -errno on failure instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
a4c0c6fd9f qemuDomainGetStatsCpuCache: Don't error out
The bulk domain stats API is meant to collect as much data as possible
without erroring out.

If fetching of the cache stats fails just skip outputting them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
f660984273 qemuDomainGetStatsCpuHaltPollTime: Remove return value
The function can't fail. Remove return value and refactor callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
acad77f04b qemuDomainGetStatsCpuProc: Remove return value
The function can't fail. Remove return value and refactor callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
a90df14a35 qemuDomainGetStatsCpuCgroup: Remove return value
The function can't fail. Remove return value and refactor callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
3518f46cba virBitmapFormat: Don't check return value
'virBitmapFormat' always returns a string; remove pointless checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:40 +01:00
a44a48b681 virDomainCputuneDefFormat: Refactor bitmap formatting
Use g_autofree for the temporary variables, remove error checks for
virBitmapFormat and simplify formatting of multiple attributes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
5e4262b9ac virDomainResctrlMonDefParse: Refactor temporary variables
Decrease scope of temporary variables so that they don't have to be
autofreed and VIR_FREE()d at the same time.

Remove unneeded checks and temporary 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-02-20 15:15:39 +01:00
13c54c8945 virBitmapFormat: Clarify returned values
NULL can't be returned; don't mention it in the docs.

Avoid extra cofusing variable when returning copy of empty string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
3c6d78aff7 qemuDomainGetStatsBlockExportHeader: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
a4b5ef9c87 qemuDomainStorageAlias: Remove NULL checks from callers
'qemuDomainStorageAlias' always returns non-NULL pointer if it gets a
non-NULL string on input. Remove unneeded checks from callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
f5e4c2a508 qemuDomainGetStatsOneBlock: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
e5b0612021 qemuDomainGetStatsOneBlockFallback: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
924805d29c qemuDomainGetStatsBlockExportBackendStorage: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
016fa9d73c qemuDomainGetStatsBlockExportFrontend: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:39 +01:00
b14968e6bd qemuDomainGetStatsBlockExportHeader: Remove return value
The function always returns 0. Remove return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-20 15:15:38 +01:00
d86e1aa510 build-aux: squelch trailing blank warnings from binary files
These files pollute the stderr output when the sc_trailing_blank
syntax check fails.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-18 18:08:04 +00:00
43eae1b707 qemu: Avoid crash in qemuDomainCheckCPU with unknown host CPU
When we don't have any information about host CPU (for example when
running on an aarch64 host), the virQEMUCapsGetHostModel would return
NULL.

Fixes: f928eb5fc8
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/747
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-18 12:08:14 +01:00
08db3e8dc2 util: fix compile warning in virsystemd.c during mingw builds
A function was changed from having no arguments to having a single
argument, but the entire body of the function was #ifdefed out for
windows builds, leaving that new argument unused. Surprisingly this
didn't cause the build to fail, but I happened to notice it flit by
during an rpm build.

Fixes: 785cd56e58
Signed-off-by: Laine Stump <laine@redhat.com>
2025-02-17 23:25:45 -05:00
f2023e8018 utils: Canonicalize paths before comparing them
In virFileIsSharedFSOverride() we compare a path against a list
of overrides looking for a match.

All overrides are canonicalized ahead of time though, so e.g.
/var/run/foo will be turned into /run/foo due to /var/run being
a symlink on modern Linux systems. But the path we're trying to
match with the overrides doesn't get the same treatment, so in
this scenario the comparison will always fail.

Canonicalizing the path as well solves the issue.

Resolves: https://issues.redhat.com/browse/RHEL-79165
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-17 18:30:35 +01:00
b5dfcdc7ab docs: index: fix VMware capitalization
Reported-by: Mark Phillips
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 15:07:56 +01:00
526f794b54 news: include info about supporting vhostuser+passt combination
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 00:02:11 -05:00
96fd17a99b docs: document using passt backend with <interface type='vhostuser'>
Almost everything is already there (in the section for using passt
with type='user'), so we just need to point to that from the
type='vhostuser' section (and vice versa), and add a bit of glue.

Also updated a few related details that have changed (e.g. default
model type for vhostuser is now 'virtio', and source type/mode are now
optional), and changed "vhost-user interface" to "vhost-user
connection" because the interface is a virtio interface, and
vhost-user is being used to connect that interface to the outside.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 00:02:11 -05:00
a47a89a9d3 docs: improve type='user' docs to higlight differences between SLIRP and passt
This reorganizes the section about <interface type='user'> and
describes the differences in behavior between SLIRP and passt.

Resolves: https://issues.redhat.com/browse/RHEL-46601
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 00:02:11 -05:00
70bce2e6ee qemu: fail validation if a domain def has vhostuser/passt but no shared mem
This can/should also be done for a traditional vhost-user interface
(ie not backend type='passt') but that will be a separate change.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 00:02:11 -05:00
1e9054b9c7 qemu: complete vhostuser + passt support
<interface type='vhostuser'><backend type='passt'/> needs to run the
passt command just as is done for interface type='user', but then add
vhostuser bits to the qemu commandline/monitor command.

There are some changes to the parsing/validation along with changes to
the vhostuser codepath do do the extra stuff for passt. I tried
keeping them separated into different patches, but then the unit test
failed in a strange way deep down in the bowels of the commandline
generation, so this patch both 1) makes the final changes to
parsing/formatting and 2) adds passt stuff at appropriate places for
vhostuser (as well as making a couple of things *not* happen when the
passt backend is chosen). The result is that you can now have:

    <interface type='vhostuser'>
      <backend type='passt'/>
      ...
    </interface>

Then as long as you also have the following as a subelement of
<domain>:

    <memoryBacking>
      <access mode='shared'/>
    </memoryBacking>

your passt interfaces will benefit from the greatly improved
efficiency of a vhost-user data path, and all without requiring
special privileges or capabilities *anywhere* (i.e. it works for
unprivileged libvirt (qemu:///session) as well as privileged libvirt).

Resolves: https://issues.redhat.com/browse/RHEL-69455
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-17 00:00:37 -05:00
7b7c56c3b8 qemu: make qemuPasstCreateSocketPath() public
When passt is used with vhostuser, the vhostuser code that builds the
qemu commandline will need to have the same socket path that is given
to the passt command, so this patch makes it visible outside of
qemu_passt.c.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
6fe3d765e5 qemu: use switch instead of if in qemuProcessPrepareDomainNetwork()
qemuProcessPrepareDomain()'s comments say that it should be the only
place to change the "live XML" of a domain (i.e. the public parts of
the virDomainDef object that is shown in the domain's status
XML), and that seems like a reasonable idea (although there aren't
many users of it to date).

qemuProcessPrepareDomainNetwork() is called by the aforementioned
qemuProcessPrepareDomain() - this patch changes the "if (type ==
HOSTDEV)" in that function to a "switch(type)" so it's simpler to add
DomainDef modifications for various other types of virDomainNetDef,
and also so that anyone who adds a new interface type is forced to
look at the code and decide if anything needs to be done here for the
new type.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
fb4bfa7858 conf/qemu: make <source> element *almost* optional for type=vhostuser
For some reason, when vhostuser interface support was added in 2014,
the parser required that the XML for the <interface> have a <source>
element with type, mode, and path, all 3 also required. This in spite
of the fact that 'unix' is the only possible valid setting for type,
and 95% of the time the mode is set to 'client' (as I understand from
comments in the code, normally a guest will use mode='client' to
connect to an existing socket that is precreated (by OVS?), and the
only use for mode='server' is for test setups where one guest is setup
with a listening vhostuser socket (i.e. 'server') and another guest
connects to that socket (i.e. 'client')). (or maybe one guest connects
to OVS in server mode, and all the others connect in client mode, not
sure - I don't claim to be an expert on vhost-user.)

So from the point of view of existing vhost-user functionality, it
seems reasonable to make 'type' and 'mode' optional, and by default
fill in the vhostuser part of the NetDef as if they were 'unix' and
'client'.

In theory, the <source> element itself is also not *directly* required
after this patch, however, the path attribute of <source> *is*
required (for now), so effectively the <source> element is still
required.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
56f4cc167a qemu: do all vhostuser attribute validation in qemu driver
Since vhostuser is only used/supported by the QEMU driver, and all the
rest of the vhostuser-specific validation is done in QEMU's
validation, lets move the final check (to see if they've tried to
enable auto-reconnect when this interface is on the server side of the
vhostuser socket) to the QEMU validate.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
c4746418d7 qemu: automatically set model type='virtio' for interface type='vhostuser'
Both vdpa and vhostuser require that the guest device be virtio, and
for interface type='vdpa', we already set <model type='virtio'/> if it
is unspecified in the input XML, so let's be just as courteous for
interface type='vhostuser'.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
154d44a585 qemu: validate that model is virtio for vhostuser and vdpa interfaces in the same place
Both vhostuser and vdpa interface types must use the virtio model in
the guest (because part of the functionality is implemented in the
guest virtio driver). Due to ["because that's the way it happened"]
this has been validated for vhostuser in the hypervisor-agnostic
validate function, but for vdpa it has been done in the QEMU-specific
validate. Since these interface models are only supported by QEMU
anyway, validate for both of them in the QEMU validation function.

Take advantage of this change to switch to using
virDomainNetIsVirtioModel(net) instead of "net->model ==
VIR_DOMAIN_NET_MODEL_VIRTIO" (the former also matches
...VIRTIO_TRANSITIONAL and ...VIRTIO_NON_TRANSITIONAL, so is more
correct).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
6345ee60d8 qemu: fix qemu validation to forbid guest-side IP address for type='vdpa'
Because all the checks for VIR_DOMAIN_NET_TYPE_VDPA were inside an
else-if clause that was immediately followed by another else-if clause
that forbid setting guestIP.ips or guestIP.routes, we've been allowing
users to set guestIP.* for vdpa interfaces (but then not doing
validation of the attributes that should have been done if we *did*
support setting IPs for vdpa (but we don't anyway, so 🤷.)

This can be fixed by turning the vdpa else-if clause into a top-level
if - this way vdpa interfaces will hit the "else if
(net->guestIP.nips)" clause and reject guest-side IP address setting.

Also, since there are currently *no* interface types for QEMU that
support adding guest-side routes, we put that check by itself (I think
it may be possible to set some guest routes for passt interfaces, but
we don't do that)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
956c668411 conf: change virDomainHostdevInsert() to return void
We haven't checked for memalloc failure in many years, and that was
the only reason this function would have ever failed.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-16 23:58:35 -05:00
3d3ac7964f NEWS: Document ccwgroup based qeth device support
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-14 14:42:32 +01:00
715bfc5e54 remote_daemon: Silence DBus errors
When a daemon (like libvirtd, virtqemud, etc.) is started as an
unprivileged user (which is exactly how KubeVirt does it), then
it tries to register on both session and system DBus-es so that
it can shut itself down (e.g. when system is powering off or user
logs out). It's worth noting that this is just opportunistic and
if no DBus is available then no error is reported.

Or at least that's what we thought. Because the way our
virGDBusGetSessionBus() and virGDBusGetSystemBus() are written an
error is actually reported every time the daemon starts.

Use virGDBusHasSessionBus() and virGDBusHasSystemBus() to check
if corresponding bus is available.

Resolves: https://issues.redhat.com/browse/RHEL-79088
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-02-13 15:20:34 +01:00
0428c69b09 virgdbus: Introduce virGDBusHasSessionBus()
This is just like virGDBusHasSystemBus() except it checks for the
session bus instead of the system one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-02-13 15:20:34 +01:00
827a062e3c Translated using Weblate (English (United Kingdom))
Currently translated at 48.7% (5257 of 10781 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2025-02-13 09:08:45 +01:00
bccbb592de qemu: add 'auto_start_delay' configuration parameter
This allows a user specified delay between autostart of each VM, giving
parity with the equivalent feature of libvirt-guests.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:06:02 +00:00
1e9d58ef49 hypervisor: add support for delay interval during autostart
This delay can reduce the CPU/IO load storm when autostarting many
guests.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:56 +00:00
c23554fc34 src: convert drivers over to use new autostart helper
This eliminates some duplicated code patterns aross drivers.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:55 +00:00
c0cdbecdaa hypervisor: introduce helper for autostart
There's a common pattern for autostart of iterating over VMs, acquiring
a lock and ref count, then checking the autostart & is-active flags.
Wrap this all up into a helper method.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:39 +00:00
8a6088221a remote: notify systemd when reloading config
Switch to the 'notify-reload' service type and send notifications to
systemd when reloading configuration.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:38 +00:00
785cd56e58 util: add APIs for more systemd notifications
We have a way to notify systemd when we're done starting the daemon.

Systemd supports many more notifications, however, and many of them
are quite relevant to our needs:

  https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html

This renames the existing notification API to better reflect its
semantics, and adds new APIs for reporting

 * Initiation of config file reload
 * Initiation of daemon shutdown process
 * Adhoc progress status messages
 * Request to extend service shutdown timeout

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:37 +00:00
354b455ec6 bhyve: stop opening & passing connection to bhyveProcessStart
A connection object is not required because autostarted domains are
never marked for autodestroy.

The comment about needing a connection for the network driver is
obsolete since we can auto-open a connection on demand.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 18:05:35 +00:00
2eb1de2a16 bhyve: add 'driver' to bhyveProcessStart method
This allows for passinga  NULL connection object in cases where
domain autodestroy is not required.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 17:51:43 +00:00
2626fa0569 qemu: migration: Reactivate block nodes after migration if VM is left paused
On incoming migration qemu doesn't activate the block graph nodes right
away. This is to properly facilitate locking of the images.

The block nodes are normally re-activated when starting the CPUs after
migration, but in cases (e.g. when a paused VM was migrated) when the VM
is left paused the block nodes are not re-activated by qemu.

This means that blockjobs which would want to write to an existing
backing chain member would fail. Generally read-only jobs would succeed
with older qemu's but this was not intended.

Instead with new qemu you'll always get an error if attempting to access
a inactive node:

 error: internal error: unable to execute QEMU command 'blockdev-mirror': Inactive 'libvirt-1-storage' can't be a backing child of active '#block052'

This is the case for explicit blockjobs (virsh blockcopy) but also for
non shared-storage migration (virsh migrate --copy-storage-all).

Since qemu now provides 'blockdev-set-active' QMP command which can
on-demand re-activate the nodes we can re-activate them in similar cases
as when we'd be starting vCPUs if the VM weren't left paused.

The only exception is on the source in case of a failed post-copy
migration as the VM already ran on destination so it won't ever run on
the source even when recovered.

Resolves: https://issues.redhat.com/browse/RHEL-78398
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-12 16:22:56 +01:00
d8f9cfb5e4 qemu: monitor: Add monitor backend for 'blockdev-set-active'
The command will be used to re-activate block nodes after migration when
we're leaving the VM paused so that blockjobs can be used.

As the 'node-name' field is optional the 'qemumonitorjsontest' case
tests both variants.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-12 16:22:56 +01:00
b402e167b6 qemu: capabilies: Introduce QEMU_CAPS_BLOCKDEV_SET_ACTIVE
The flag signals presence of the 'blockdev-set-active' QMP command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-12 16:22:56 +01:00
c8c2996b2b qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-1636-gffaf7f0376'
Notable changes:
    - 'blockdev-set-active' QMP command and the corresponding 'active'
      flag for instantiating blockdev backends added

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-12 16:22:56 +01:00
ba4b9a7d8f qemu-replies-tool: Dump also query string for optional members
The query language allows querying whether a member is optional by using
the '*' "operator" but the dumper script didn't output those query
strings.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-12 16:22:56 +01:00
29d77d1a64 qemu: snapshot: Limit scope of checkpoint-snapshot interlock
'qemuDomainSupportsCheckpointsBlockjobs()' should really be used only
with active VMs based on the scope of interlocking it does.

This means that the inactive snapshot code path needs to do the
interlocking based on what's supported:
 - external snapshot support was not implemented yet
    (bitmaps need to be propagated to the new overlay image)
 - internal snapshot support can be deferred to qemu

Move the check inside qemuSnapshotPrepare() which has knowledge about
the snapshot type and implement an explicit check for the inactive case.

See: https://gitlab.com/libvirt/libvirt/-/issues/739
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-12 16:22:56 +01:00
5def28df55 qemu: fix qemuDomainSaveImageDefineXML
The commit in question made an incorrect change that resulted in getting
O_RDONLY FD instead of O_RDWR preventing any writes to happen with the
following error:

virQEMUSaveDataWrite:176 : failed to write header to domain save file '/path/to/save.img': Bad file descriptor

Pass 'bypass_cache' as proper bool as the original code did.

Fixes: 517248e239
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-02-12 12:04:45 +01:00
f1bd98f887 ci: refresh with 'lcitool manifest'
This replaces Fedora 39 with Fedora 41, updates the FreeBSD
Cirrus CI image names, and tweaks some package names

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-12 09:34:45 +00:00
b1e9699b31 node_device: Do not lock the driver state needlessly
When processing the PCI devices we can only read the configs for each of
them if running as privileged.  That information is saved in the driver
state as a boolean introduced in commit 643c74abff.  However since
that version it is only written to once during nodeStateInitialize() and
only read from that point (apart from some commits around v3.9.0 release
when it was not even set, but that was fixed before v3.10.0).  And it is
only read once, just to store that boolean in a temporary variable which
is also used in only one condition.

Rewrite this without locking and save few lines of code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-02-12 10:31:09 +01:00
b6f4466b1b Translated using Weblate (English (United Kingdom))
Currently translated at 48.6% (5241 of 10781 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2025-02-11 13:00:55 +01:00
ac9500aaf8 Translated using Weblate (Romanian)
Currently translated at 20.1% (2175 of 10781 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2025-02-11 13:00:54 +01:00
662d47845c Translated using Weblate (Spanish)
Currently translated at 52.8% (5700 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 52.6% (5679 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 52.6% (5676 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 52.6% (5674 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 52.6% (5671 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 52.2% (5634 of 10781 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-02-11 13:00:54 +01:00
af732d27cc node_device_udev: add error reporting to udevProcessCCWGroup
Add reporting an internal error when the string to type conversion of
devtype fails as this indicates a serious problem since devtype was used
to get into this method during the udev event handling.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-07 15:07:23 +01:00
5830e564bb qemu: domain: Initialize FD passthrough for a virStorageSource before using it
The call to 'qemuBlockStorageSourceNeedsFormatLayer()' bases the
decision also on the state of the passed FD, so we must initialize the
passthrough data via 'qemuDomainPrepareStorageSourceFDs()' before the
aforementioned call.

In the test change it's visible that we didn't add the necessary 'raw'
driver which allows the 'protocol' blockdev to be opened in 'rw' mode so
that qemu picks the proper file descriptior while keeping the device
read-only.

Resolves: https://issues.redhat.com/browse/RHEL-37519
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-07 13:52:45 +01:00
7a119483a3 qemuxmlconftest: Add testing of FDs with 'writable' flag in 'disk-source-fd'
Add few examples of fd groups with the 'writable' flag set, when passing
a single FD. Notably as a top level image of a readonly disk (even when
that doesn't make much sense) and also as a base image of a chain.

Note that this documents a status quo of a bug fixed in upcoming patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-07 13:52:45 +01:00
500d985a13 qemuxmlconftest: Allow testing of the 'writable' flag for passed FDs for disks
Pass also the 'writable' state to the fake passed FDs so that we can
test it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-07 13:52:45 +01:00
8e48a4fafb Translated using Weblate (Spanish)
Currently translated at 51.9% (5600 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 51.5% (5557 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 51.2% (5522 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 51.2% (5522 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 51.0% (5507 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.7% (5472 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.6% (5458 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.4% (5437 of 10781 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-02-06 14:23:47 +01:00
105c33bfe7 docs: Reword virDomainGetEmulatorPinInfo description
This API only queries the XML settings and not the running threads
themselves.  In order to avoid confusion, change the wording slightly.

Resolves: https://issues.redhat.com/browse/RHEL-72052
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-06 14:24:35 +01:00
14af443139 tests: qemuxmlconfdata: Update launch-security-sev-snp.xml
Recently, I was part of a discussion where it was suspected that
libvirt does not pick up correct FW for SEV-SNP guests. Update
our test to demonstrate it does.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-02-06 11:31:42 +01:00
8a92493596 nodedev: udev: Hook up virFileWaitForExist to address uevent race of pci device
Similarly to commit 1af45804 we should be safer by waiting for the whole
sysfs tree is created for the device.

Signed-off-by: Guoyi Tu <tugy@chinatelecom.cn>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-02-06 10:50:40 +01:00
946b81a2e9 qemu: Attach persistent reservations manager if block-copy target requires it
Users can choose to copy a disk into a destination where they want to
use persistent reservations. Start the daemon if the configuration
requires it.

Resolves: https://issues.redhat.com/browse/RHEL-7342
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
1697323bfe qemu: blockjob: Remove persistent reservations manager when dropping disk images
Check if the persistent reservations manager daemon is still needed
after a disk (sub)-chain was dropped after a blockjob.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
fc5b6ed091 qemu: hotplug: Export persistent reservations manager helper functions
Export qemuHotplugAttachManagedPR/qemuHotplugRemoveManagedPR for reuse
in blockjob code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
8e0591520f virDomainDefHasManagedPR: Consider also disk's 'mirror' chain
Consider also the destination of a block-copy job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
7087d8b46f qemu_hotplug.h: Reformat according to new coding style
Fix the mixed style by unifying the formatting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
712c39f987 qemucapabilitiestest: Add data for the qemu-10.0 dev cycle on x86_64
Add data based on 'v9.2.0-1537-gd922088eb4'

Notable changes:
    - '10.0' machine types added
    - 'hub' chardev backend added
    - 'cpr' migrate channel added
    - 'nsamples' field for 'dbus' audio backend now reported
    - 'ClearwaterForest-v1' cpu model added
    - 'SierraForest-v2' cpu model added
    - 'ivshmem-flat' device added
    - new qom objects:
        - 'virtio-mem-system-reset'
        - 'vmclock'
    - default value of 'rombar' changed from 1 to -1 for all devices
    - 'intel-iommu' device:
        - default value of 'aw-bit' changed from '39' to '48'
        - 'fs1gp' boolean added
        - 'x-flts' boolean added
    - 'virtio-balloon-pci'/'virtio-mem-pci':
        - 'ioeventfd' added
        - 'vectors' added

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
fde300fa74 qemucapabilitiestest: Final update for qemu-9.2 release on x86_64
Update the data after the release.

Notable changes:
 - the 6.2 machine types became deprecated

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 19:29:38 +01:00
650e6fb7eb qemu: snapshot: Ensure that NVRAM image exists when taking inactive internal snapshot
Attempting to take an internal snapshot of a freshly defined VM with
qcow2 backed NVRAM results in failure as the NVRAM image doesn't get
populated until the VM is started for the first time.

Fix this by invoking qemuPrepareNVRAM() when qcow2 nvram is defined.

Resolves: https://issues.redhat.com/browse/RHEL-73315
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-02-05 19:29:38 +01:00
a377404ed9 qemu: process: Export qemuPrepareNVRAM for use in snapshot code
Export qemuPrepareNVRAM so that it doesn't require the VM object. The
snapshot code needs in the corner case of creating a snapshot of a
freshly defined VM ensure that the nvram image exists in order to
snapshot it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-02-05 19:29:38 +01:00
d15eff6304 qemuSnapshotForEachQcow2: Don't initialize 'nrollback'
The variable holds the amount of disks to roll back the snapshot for.
The value must be set before the code jumps to the 'rollback:' label so
the best situation is to not initialize it and let the compiler catch
errors rather than initialize the unsigned variable to -1 and let it
crash.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-02-05 19:29:38 +01:00
15cd4ec832 node_device_udev: Fix build failure in ccw device code
clang complains:

../../../libvirt/src/node_device/node_device_udev.c:1408:82: error: result of comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]
 1408 |     if ((data->ccwgroup_dev.type = virNodeDevCCWGroupCapTypeFromString(devtype)) < 0)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
1 error generated.

Fix it by adding a temporary int variable to facilitate the check before
assigning to the unsigned enum value.

Fixes: 985cb9c32a
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-02-05 19:27:36 +01:00
78f72efddc nodedev: add qeth layer2 and layer3 device types
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 17:56:42 +01:00
55e921d5cb nodedev: add ccwgroup capability support to ccw devices
Add the group membership information to a CCW device. Allow to filter
CCW devices based on a group membership.

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-02-05 17:56:42 +01:00
985cb9c32a nodedev: add ccwgroup node device support
Add ccwgroup node device type supporting qeth generic driver.

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-02-05 17:56:42 +01:00
de4c28cd4a nodedev: refactor udevCCWGetState
Refactor method to be only ccw state type depended to allow reuse in a
later patch.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 17:56:42 +01:00
20560cb6c4 nodedev: refactor CCW state format for use in ccwgroup
Refactor to allow reuse in ccwgroup.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
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-02-05 17:56:42 +01:00
1260f3bd4f nodedev: remove virNodeDeviceCapCCWDefFormat
Directly use virCCWDeviceAddressFormat.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 17:56:42 +01:00
7ad25b4665 nodedev: refactor CCW device address
Replace cssid, ssid and devno elements with virCCWDeviceAddress.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 17:56:42 +01:00
04de9ad285 nodedev: refactor CCW device address format
Refactor for reuse in the following patch.

Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-05 17:56:42 +01:00
0d9d439175 docs: fix 'virsh domstats --vcpu' measure units and descriptions
The fields are in nanoseconds, not microseconds. Also fixes the
description of `vcpu.<num>.wait`, as it does not actually represent the
time waiting on I/O.

Signed-off-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-02-05 17:14:01 +01:00
4589468c69 Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 2.4% (265 of 10781 strings)

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

Signed-off-by: "Daniel P. Berrange" <berrange@redhat.com>

Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 93.3% (10067 of 10781 strings)

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

Signed-off-by: "Daniel P. Berrange" <berrange@redhat.com>
2025-02-04 15:57:04 +00:00
da17a3558a Translated using Weblate (Spanish)
Currently translated at 51.0% (5507 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.7% (5472 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.6% (5458 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.4% (5437 of 10781 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-02-04 15:57:04 +00:00
4557ac4c77 NEWS: Mention preserving I/O error messages for qemu VMs
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:56 +01:00
97c47333cb include: libvirt-domain: Add 'message' @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
In case when the hypervisor does report the reason for the I/O error as
an unstable string to display to users we can add a @reason possibility
for the I/O error event noting that the error is available.

Add 'message' as a reason enumeration value and document it
to instruct users to look at the logs or virDomainGetMessages().

The resulting event looks like:

 event 'io-error' for domain 'cd': /dev/mapper/errdev0 (virtio-disk0) report due to message

Users then can look at the virDomainGetMessages() API:

 I/O error: disk='vda', index='1', path='/dev/mapper/errdev0', timestamp='2025-01-28 15:47:52.776+0000', message='Input/output error'

Or in the VM log file:

 2025-01-28 15:47:52.776+0000: IO error device='virtio-disk0' node-name='libvirt-1-storage' reason='Input/output error'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
3a3c5616eb include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
Emphasise that it's an enumeration and convert the possibilities to a
list of values with explanation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
666219f5f1 virDomainGetMessages: Introduce VIR_DOMAIN_MESSAGE_IOERRORS
Report any stored I/O error messages reported by the hypervisor when
reporting messages of a domain. As the I/O error may be already stale we
report also the timestamp when it was recorded.

Example message:

 I/O error: disk='vda', index='1', path='/dev/mapper/errdev0', timestamp='2025-01-28 15:47:52.776+0000', message='Input/output error'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
1a02760cc6 virDomainObjGetMessages: Refactor using GPtrArray
Simplify the function especially by rewriting it using GPtrArray to
construct the string list, especially for the upcoming case when the
number of added elements will not be known beforehand and when
hypervisor specific data will be added.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
042ea8630b libxlDomainGetMessages: Add existing flags to 'virCheckFlags'
The two VIR_DOMAIN_MESSAGE_* flags were not listed in the virCheckFlags
check in 'libxl' but were present in 'test' and 'qemu' driver impls.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
18f8d572be qemuProcessHandleIOError: Log IO errors in the VM log file
Add a log entry to the VM log file for every time we receive an IO error
event from qemu. The log entry is as follows:

 2025-01-24 16:03:28.928+0000: IO error device='virtio-disk0' node-name='libvirt-1-storage' reason='other: Input/output error'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
300f7e9bd4 qemuProcessHandleIOError: Populate I/O error reason to virStorageSource
Record the last I/O error reason and timestamp which happened with the
corresponding virStorageSource struct.

This will later allow querying the last error e.g. via the
virDomainGetMessages() API.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
2f6c9fa4f6 virStorageSource: Add fields for storing last I/O error message
Hypervisors may report a I/O error message (unstable; for human use)
to libvirt. In order to store it with the appropriate virStorageSource
so that it can be later queried we need to add fields to
virStorageSource to store the timestamp and message.

The message is deliberately not copied via virStorageSourceCopy.

The messages are also not serialized to the status XML as losing them on
a daemon restart as they're likely to be stale anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:55 +01:00
0525323175 qemuMonitorJSONHandleIOError: Propagate new 'qom-path' field
QEMU commit v9.1.0-1065-ge67b7aef7c added 'qom-path' as an optional
field for the BLOCK_IO_ERROR event. Extract and propagate it as an
alternative to lookup via 'node-name' and 'device' (alias).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
784538a470 qemuProcessHandleIOError: Prefer lookup by node name
When qemu reports a node name for an I/O error we should prefer the
lookup by node name instead as it gives us the path to the specific
image which caused the error instead of the top level image path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
f8f8d5a253 qemuMonitorJSONHandleIOError: Do not munge 'reason' field of IO error event
Leave the interpretation of the event to 'qemuProcessHandleIOError()'
which will create it's own variant of the messages for the user-facing
libvirt events. qemuMonitorJSONHandleIOError() will pass through the raw
data it got from qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
590a5765c1 qemuProcessHandleIOError: Rename local variables
Prefix the helper variables used to supply data to the event by
'event'. Declare them with the default value of an empty string rather
than doing it later.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-02-04 14:40:54 +01:00
2d6bd6f05f qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling
The field is named 'device' in the event so unify our naming.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0] 415b14903e

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

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

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

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

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

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

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

Translated using Weblate (Korean)

Currently translated at 99.6% (10745 of 10781 strings)

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

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

Translated using Weblate (Korean)

Currently translated at 98.4% (10619 of 10781 strings)

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

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

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

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

Translated using Weblate (Spanish)

Currently translated at 50.0% (5395 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.0% (5391 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 49.6% (5357 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 49.0% (5287 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 48.3% (5212 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 47.9% (5173 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 47.7% (5149 of 10781 strings)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Create them explicitly ahead of time instead, ensuring
consistency.

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

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

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

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
3015c28c1e ch: start a new thread for handling ch events
Use a FIFO(named pipe) for --event-monitor option in CH. Introduce a new
thread, `virCHEventHandlerLoop`, to continuously monitor and handle
events from cloud-hypervisor.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
d7c9660b15 ch: pass --event-monitor option to cloud-hypervisor
The `--event-monitor` option in cloud-hypervisor outputs events to a
specified file. This file can then be used to monitor VM lifecycle,
other vmm events and trigger appropriate actions.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
f044f17825 .mailmap: add my contact info
Most of my historical libvirt contributions are PowerPC related but at
this moment I'm working with RISC-V enablement (mostly on the QEMU
side).

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

Suggested-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-24 07:31:04 -03:00
5624489251 qemu: add RISC-V 'aia' command line
The 'aia' feature is added as a machine type option for the 'virt'
RISC-V machine, e.g. "-machine virt,aia=<val>".

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-24 07:30:52 -03:00
817eabd0cc conf,qemu: implement RISC-V 'aia' virt domain feature
This feature is implemented as a string that can range from "none",
"aplic" and "aplic-imsic".

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

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-24 07:30:47 -03:00
34d7f53d1b qemu: add capability for RISC-V AIA feature
AIA (Advanced Interrupt Architecture) support was introduced in QEMU 7.0
for the 'virt' machine type. It allows the guest to choose from a more
modern interrupt model than the default (CLINT - Core Logical Interrupt
Controller).

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-24 07:30:34 -03:00
3e9440dbcb virsysinfo: fix RISC-V detection
The correct compiler define to detect the RISC-V architecture is __riscv.

Fixes: b902cfece0 ("virsysinfo: Try reading DMI table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-23 15:05:21 +01:00
652b2eeaa9 tests: add capabilities for QEMU 10.0.0 on s390x
Let us introduce the xml and reply files for QEMU 10.0.0 on s390x.

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

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Suggested-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-21 16:55:42 +01:00
0ca8d870a2 qemu: Fix hang when migration is canceled at the last moment
When a migration is canceled very late once virtual CPUs are already
stopped, QEMU will automatically resume them. If this happens after we
exited a waiting loop in qemuMigrationSrcWaitForCompletion, but before a
loop that tries to make sure CPUs are stopped by waiting for the
appropriate event, we may end up waiting forever because the CPUs are
running (they were resumed by migrate_cancel), but the STOP event is
already gone.

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

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-21 15:04:36 +01:00
ab10c0695d tools: ssh-proxy: Check for domain status before parsing its CID
Inactive domain XML can be wildly different to the live XML. For
instance, it can have VSOCK CID of that from another (running)
domain. Since domain status is not checked for, attempting to ssh
into an inactive domain may in fact result in opening a
connection to a different live domain that listens on said CID
currently.

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-21 13:58:04 +01:00
63a3d70697 nss: Skip empty files and avoid use of uninitialized value
JSON parser isn't called when reading empty files so `jerr` will be used
uninitialized in the original code. Empty files appear when a network
has no dhcp clients.

This patch checks for such files and skip them.

Fixes: a8d828c88b
Signed-off-by: Jiang XueQian <jiangxueqian@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-21 10:30:23 +01:00
a2297fb157 libvirt.spec: do not build ch driver on mingw
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-01-21 09:50:37 +01:00
064b3a276d meson: error out when ch driver is requested but unsupported
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-01-21 09:50:36 +01:00
981929112c spec: Only build ch driver on x86_64 and aarch64
This matches the cpu_family() check in `meson.build`

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2025-01-20 13:19:34 -05:00
22034bb77e storage_file_backend_fs: Compile out 'chown' backend on mingw
Otherwise build on mingw complains:

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

Fixes: f8558a87ac
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-20 16:47:24 +01:00
7a8c2319ac libvirt.spec: Move ownership of 'storage-file' backends directory to gluster
Commit f8558a87ac de-modularized the
'storage-file' backend for local files, and thus now the only
possibility to have the directory is when compiling with gluster.

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

Fixes: f8558a87ac
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-20 16:47:24 +01:00
4933dfcce0 qemuxmlconftest: Drop s390-default-cpu-...ccw-virtio-2.7 test cases
In its upstream commit [1], qemu dropped s390-2.7 machine type,
then in commit [2] the s390-2.8 machine type was dropped. But as
Thomas Huth pointed out, any machine type that's older than 6
years is subject to removal [3]. This means, any machine type
older than 4.1 is going to be removed eventually.

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

1: 3199c7ee76
2: 66924fe369
3: ce80c4fa6f
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-01-20 15:18:43 +01:00
06a7866d68 NEWS: Mention de-modularization of the 'fs' storage file backend
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-20 13:28:09 +01:00
f8558a87ac storage_file: de-modularize the local file backend
The 'storage_file' infrastructure serves as an abstraction on top of
file-looking storage technologies. Apart from local file it currently
implements also a backend for 'gluster'.

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

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

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

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-20 13:28:09 +01:00
e6a4245d2a virstoragetest: Add case for qcow2 image with empty string as 'data_file'
Add an example image formatted by:

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

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-20 13:25:51 +01:00
87a4fe2906 storage_file: Refuse qcow2 images with empty string as 'data_file'
In certain buggy conditions qemu can create an image which has empty
string stored as 'data_file'. While probing libvirt would consider the
empty string as a relative file name and construct the path using the
path of the parent image stripping the last component and appending the
empty string. This results into attempting to using a directory as an
image and thus the following error when attempting to start VM with such
an image:

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

Reject empty strings passed in as 'data_file'.

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

Resolves: https://issues.redhat.com/browse/RHEL-70627
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-20 13:25:51 +01:00
a10728dc5b util: avoid overflow in hextable buffer
The assigned string is 17 chars long once the trailing nul is taken
into account. This triggers a warning with GCC 15

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

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

See also: https://gcc.gnu.org/PR115185
Reported-by: Yaakov Selkowitz <yselkowi@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-20 10:08:44 +00:00
d908693167 Translated using Weblate (Spanish)
Currently translated at 47.6% (5137 of 10781 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-17 12:47:44 +01:00
095760cddc cpu_x86: Probe host CPU for all MSR features
The list of CPU features we probe from various MSR grew significantly
over time and the CPU map currently mentions 11 distinct MSR indexes.
But the code for directly probing host CPU features was still reading
only the original 0x10a index. Thus the CPU model in host capabilities
was missing a lot of features.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-17 12:52:28 +01:00
3766891c59 qemu_migration: Do not automatically resume domain after I/O error
When an I/O error happens (causing a domain to be paused) during live
migration which is later cancelled by a user, trying to resume the
domain doesn't make sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-17 12:44:42 +01:00
e46e64be50 qemu_migration: Refactor qemuMigrationSrcRestoreDomainState
None of the callers really care about the return value so we can drop it
and simplify the code a bit.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-17 12:44:38 +01:00
899bf2746a qemu: Report error from both sides of migration
When migration fails in Perform phase, we call Finish on the destination
host with cancelled=1 and get the error from there and report it to the
user. This works well if the error on the destination caused the
migration to fail. But in other cases the main error may reported by the
source and the destination would just be complaining about broken
migration stream.

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

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

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

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-17 12:44:17 +01:00
14fc6812df Translated using Weblate (Georgian)
Currently translated at 4.3% (464 of 10781 strings)

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

Signed-off-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
2025-01-15 16:56:38 +01:00
13b17f7720 Translated using Weblate (Georgian)
Currently translated at 4.3% (464 of 10781 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-01-15 16:56:38 +01:00
32f822969d Post-release version bump to 11.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-15 09:12:52 +01:00
a0b9f813a1 Release of libvirt-11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-15 09:06:33 +01:00
c1b8e8c00b news: document support for mdev <-> SRIOV VF vGPU live migration
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-14 11:20:31 -05:00
d53da4b905 news: note addition of vlan tagging support for Linux host bridges
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-14 11:19:31 -05:00
b2c999855d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10781 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-01-14 16:50:29 +01:00
529d9a421e Translated using Weblate (Spanish)
Currently translated at 47.1% (5085 of 10781 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-14 16:50:29 +01:00
7a03d6c2fa NEWS: Document some of my fixes in this release
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-14 16:55:26 +01:00
dc8fdeb1fb NEWS: Add few things I changed this release
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-14 16:27:40 +01:00
c85d87fe8f NEWS: document bug fix for snapshots
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-14 16:10:20 +01:00
1942a88813 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-01-14 16:00:49 +01:00
027bcf1112 NEWS: document fix for starting transient domains
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-14 14:36:20 +01:00
a4def2eb95 conf: Do not parse hyperv features with passthrough mode
The schema does not allow that anyway and we then format them all back
which leads to libvirt producing an invalid XML.

Resolves: https://issues.redhat.com/browse/RHEL-70656
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-13 14:03:21 +01:00
32140bdb09 meson: Replace meson.source_root() with meson.project_source_root()
The source_root() method is deprecated in 0.56.0 and we're
recommended to use project_source_root() instead.

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-13 12:33:23 +01:00
a71985f6f3 qemu_migration: Do not consider post-copy active in postcopy-recover
The postcopy-recover migration state in QEMU means a connection for the
migration stream was established. Depending on the schedulers on both
hosts a relative timing of the corresponding MIGRATION event on the
source host and the destination host may differ. Specifically it's
possible that the source sees postcopy-recover while the destination is
still in postcopy-paused.

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

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

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com
2025-01-13 12:18:20 +01:00
413e798eb1 Translated using Weblate (Korean)
Currently translated at 98.4% (10610 of 10781 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-01-13 10:30:37 +01:00
9759d39c67 Translated using Weblate (Ukrainian)
Currently translated at 99.2% (10697 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>

Translated using Weblate (Ukrainian)

Currently translated at 98.0% (10575 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>

Translated using Weblate (Ukrainian)

Currently translated at 97.6% (10531 of 10781 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-01-13 10:30:37 +01:00
3639a38985 Translated using Weblate (Korean)
Currently translated at 98.3% (10602 of 10781 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-01-13 10:30:36 +01:00
9e1b7ff760 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-01-13 10:30:36 +01:00
9ab2cd48ea access: fix po_check when polkit is disabled
The generated org.libvirt.api.policy.in file was recently added to the
POTFILES list as it contains translatable messages.

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

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

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-13 09:35:16 +00:00
7a903458f1 qemu: support vlan change for linux host bridge during update-device
Since we previously only supported vlan tagging for interfaces
connected to an OVS bridge [*], the code in qemuChangeNet() (used by
the update-device API) assumed an interface with modified vlan config
was on an OVS bridge, and would call the OVS-specific
virNetDevOpenvswitchUpdateVlan().

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

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

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-13 09:58:00 +01:00
f35bddae90 docs: standard linux bridges now support vlans
Update domain XML and network XML documentation to describe how
standard linux bridges support the VLAN configuration.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-01-11 20:09:51 -05:00
d51179fa82 qemu: snapshot: delete disk image only if parent snapshot is external
When we are deleting external snapshot that is not active we only need
to delete overlay disk image of the parent snapshot. This works
correctly even if parent snapshot is external and active as it will have
another overlay created when user reverted to that snapshot.

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

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/734
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-01-10 18:57:16 +01:00
30b0e553bc docs: Clarify documentation of host-model CPU mode
The host-model CPU mode was described as similar to copying the host CPU
definition from capabilities, which has not been the case for ages. The
host-model definition from domain capabilities is used instead.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-01-09 15:40:25 +01:00
4c7bb1cc4a po: Refresh potfile for v11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-09 11:48:26 +01:00
caa10431cd util: don't attempt to acquire logind inhibitor if not requested
When VIR_INHIBITOR_WHAT_NONE is passed to virInhibitorNew, it is
an indication that daemon shutdown should be inhibited, but no
OS level inhibitors acquired. This is done by the virtnetworkd
daemon, for example, to prevent shutdown while running virtual
machines are present, without blocking / delaying OS shutdown.

Unfortunately the code forgot to skip the DBus call in this case,
resulting in errors being logged.

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-09 09:24:20 +00:00
a28a5b675d rpc: log details of OS signals received by daemon
When debugging it is useful to know what signals are being received and
metadata related to them. Log this data before calling the signal
handling callbacks.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-09 09:23:44 +00:00
a586411889 spec: Disable ch driver on RHEL
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-09 09:57:50 +01:00
922a219d0a Translated using Weblate (Finnish)
Currently translated at 22.2% (2345 of 10555 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-01-08 23:20:00 +01:00
1523cd3c6e Translated using Weblate (Finnish)
Currently translated at 22.1% (2343 of 10555 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-01-08 23:20:00 +01:00
95a20d7aa5 Translated using Weblate (Spanish)
Currently translated at 47.9% (5065 of 10555 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-08 23:20:00 +01:00
7c5e9e1bce Translated using Weblate (Spanish)
Currently translated at 47.7% (5045 of 10555 strings)

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

Signed-off-by: Nicolas Gal <snowcrash79@users.noreply.translate.fedoraproject.org>
2025-01-08 23:20:00 +01:00
3aa8b9c700 Translated using Weblate (Spanish)
Currently translated at 47.6% (5027 of 10555 strings)

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

Signed-off-by: Nicolas Gal <snowcrash79@users.noreply.translate.fedoraproject.org>
2025-01-08 23:20:00 +01:00
bc2bcd54c5 Translated using Weblate (Spanish)
Currently translated at 47.5% (5023 of 10555 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-08 23:20:00 +01:00
1a5340d7f0 Translated using Weblate (Spanish)
Currently translated at 47.2% (4988 of 10555 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-08 23:20:00 +01:00
16a4e3f9f8 Translated using Weblate (Spanish)
Currently translated at 46.8% (4950 of 10555 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-08 23:20:00 +01:00
d0acf28d20 Translated using Weblate (Spanish)
Currently translated at 46.2% (4882 of 10555 strings)

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

Signed-off-by: Nicolas Gal <nialegal@yandex.com>
2025-01-08 23:20:00 +01:00
4bc2b6c5ec Translated using Weblate (Finnish)
Currently translated at 22.1% (2341 of 10555 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-01-08 23:20:00 +01:00
7803363339 Translated using Weblate (Finnish)
Currently translated at 21.9% (2321 of 10555 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-01-08 23:20:00 +01:00
ebb90e7412 Translated using Weblate (Finnish)
Currently translated at 21.9% (2320 of 10555 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2025-01-08 23:20:00 +01:00
693feada8b Translated using Weblate (Finnish)
Currently translated at 21.9% (2320 of 10555 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>

Translated using Weblate (Finnish)

Currently translated at 21.9% (2314 of 10555 strings)

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

Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2025-01-08 23:20:00 +01:00
748008d602 Translated using Weblate (Swedish)
Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Anders Jonsson <anders.jonsson@norsjovallen.se>
2025-01-08 23:19:59 +01:00
1eda6c9b90 Translated using Weblate (English (United Kingdom))
Currently translated at 49.6% (5240 of 10555 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>

Translated using Weblate (English (United Kingdom))

Currently translated at 49.5% (5234 of 10555 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2025-01-08 23:19:59 +01:00
e1b63ac56b Translated using Weblate (Swedish)
Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 100.0% (10555 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 99.8% (10544 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 99.3% (10484 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 99.1% (10464 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 98.9% (10444 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 98.7% (10424 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2025-01-08 23:19:59 +01:00
dd82e2baa8 qemu: allow migration of guest with mdev vGPU to VF vGPU
GPU vendors are moving away from using mdev to create virtual GPUs
towards using SRIOV VFs that are vGPUs. In both cases, once created
the vGPUs are assigned to guests via <hostdev> (i.e. VFIO device
assignment), and inside the guest the devices look identical, but mdev
vGPUs are located by QEMU/VFIO using a uuid, while VF vGPUs are
located with a PCI address. So although we generally require the
device on the source host to exactly match the device on the
destination host, in the case of mdev-created vGPU vs. VF vGPU
migration *can* potentially work, except that libvirt has a hard-coded
check that prevents us from even trying.

This patch loosens up that check so that we will allow attempts to
migrate a guest from a source host that has mdev-created vGPUs to a
destination host that has VF vGPUs (and vice versa). The expectation
is that if this doesn't actually work then QEMU will fail and generate
an error that we can report.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Zhiyi Guo <zhguo@redhat.com>
Reviewed-by: Zhiyi Guo <zhguo@redhat.com>
2025-01-08 17:24:20 -05:00
c1a0d08518 Enable vlan support for standard linux bridges
Adjust domain and network validation to permit vlan configuration on
standard linux bridges.

Update calls to virNetDevBridgeAddPort to pass the vlan configuration.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-01-08 17:15:20 -05:00
582f0966f9 util: Add vlan support to virNetDevBridgeAddPort
Add virNetDevBridgeSetupVlans function to configure a bridge
interface using the passed virNetDevVlan struct.

Add virVlan parameter to the Linux version of virNetDevBridgeAddPort
and call virNetDevBridgeSetupVlans to set up the required vlan
configuration.

Update callers of virNetDevBridgeAddPort to pass NULL for now.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-01-08 17:04:27 -05:00
2e651ec101 util: add netlink bridge vlan filtering
Enable capability to add and remove vlan filters for a standard
linux bridge using netlink.

New function virNetlinkBridgeVlanFilterSet can be used to add or
remove a vlan filter to a given bridge interface.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-01-08 13:46:25 -05:00
18ea5e19c6 apparmor: fix UUID specification
There is a common misconception when writing AppArmor policy that
[0-9]* applies * to the [0-9] class, but that's not the case. For this
example, [0-9]* matches a single digit followed by any number of
characters except for /

Create a UUID variable that uses the following format 8-4-4-4-12.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-01-08 10:46:14 -07:00
a751d30220 security: replace uses of label and VIR_FREE by g_autofree
Moving towards full adoption of GLib APIs in the AppArmor code.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-01-08 10:46:14 -07:00
76b9227eea security_apparmor: fix memleaks in AppArmorSetFDLabel
proc and fd_path are allocated but never freed. Fix by using
g_autofree instead.

Fixes: b9757fea30
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-01-08 10:46:14 -07:00
c97766a639 spec: Enable ch driver
Enabling building and packaging ch driver in the spec file.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
2025-01-08 17:37:42 +00:00
d12e937f47 tools: fix ordering mistake in virt-admin daemon-set-timeout code
Most of the impl for the 'daemon-set-timeout' command was ordered under
the heading for the 'daemon-log-filters' command.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-08 13:00:44 +00:00
fc3a60d9d7 util: fix off-by-1 in inhibitor constants
The inhibitor constant values were off-by-1, so when converted into
string format, we picked the wrong names

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-07 16:16:16 +00:00
2ac1a0c13f meson: remove unneeded dependency on libdevmapper for storage_disk
In commit dfa0e11 the last direct usage of devmapper for storage_disk was
removed. There is one stale include remaining, which is unused even longer
since df1011ca. Remove the include and change meson.build so we can use
storage_disk without devmapper.

I'm running it right now with a stripped-down config on a small arm64
router with openwrt.

Signed-off-by: Stefan Hellermann <stefan@the2masters.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-07 12:33:34 +01:00
9df14f5173 conf: Adjust hyperv tlbflush formatting
Commit 247357cc29 added support for direct and extended modes for
tlbflush, but forgot to do the formatting as well.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-07 10:55:38 +01:00
ad6b4d1fef conf: refactor hyperv features formatting
Add a nested buffer for whatever sub-elements a particular
hyperv feature might have.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-07 10:55:38 +01:00
91bb41a8b7 virtiofs: Allow read only mode
Resolves: https://issues.redhat.com/browse/RHEL-72192
Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-07 10:25:02 +01:00
d2a39db35b security: apparmor: Remove hardcoded "libvirtd" profile name
The apparmor driver probe function checks for an active profile matching
the full path of the running daemon binary. If not found, it checks for
a profile named "libvirtd". This works fine when the running daemon is the
old monolithic libvirtd, but fails with modular daemons.

Remove the check for a hardcoded "libvirtd" profile and replace with the
basename of the running daemon binary.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-06 14:59:10 -07:00
6d3b877171 remote: apply translations to polkit files
The 'description' and 'message' fields in polkit policy files should be
translated into the user's chosen language. xgettext is told to search
in both and source and build dirs by meson.

Unfortunately a bug in xgettext means that when it searches for built
files in XML format, it'll trigger a warning message due to failure to
load the generated file from the source dir:

  xgettext: cannot read ..snip../libvirt/src/access/org.libvirt.api.policy: failed to load external entity "..snip../libvirt/src/access/org.libvirt.api.policy"

This is harmless since it then goes on to try the build dir and
succeeds, but will pollute the output of 'ninja libvirt-pot'

Related: https://gitlab.com/libvirt/libvirt/-/merge_requests/387
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-06 18:58:44 +00:00
c244d041d9 meson: remove duplication of polkit dirs construction
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-06 18:58:42 +00:00
b996e99c51 po: add its rules for translating polkit file strings
xgettext / msgfmt have generic support for extracting / merging strings
in XML files, however, they need to be told something about the schema
to know which fields are translatable. This is done by providing 'its'
rules. Usually the 'its' rules would be shipped in a -devel package of
the app which owns the schema definition, but polkit does not do this.
Thus libvirt (and other apps) must ship their own local 'its' rules for
polkit.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-01-06 18:58:31 +00:00
062a2c07cc qemu_tpm: do not delete parent directory for custom source
When the vTPM source path is specified, such as:
   <source type=".." path="/my/tpm"/>

Do not delete the parent directory, but only the given file/dir.

Fixes: commit f1304cc566 ("qemu_tpm: handle file/block storage source")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-06 15:58:42 +01:00
958283a21f qemu_tpm: lock the state explicitly when running swtpm
Commit bb5e26749f ("qemu: explicit swtpm state locking") attempted to
lock the state, but only for swtpm-setup. The capability
"tpmstate-opt-lock" is actually only exposed by swtpm.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-06 15:58:29 +01:00
90014e7bc4 Revert "qemu: explicit swtpm state locking"
This reverts commit bb5e26749f.

swtpm-setup doesn't have "tpmstate-lock", only swtpm.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-06 15:58:15 +01:00
18b8e6d3cc hyperv: Introduce and export 'facility' variable.
In its upstream commit [1] openwsman dropped 'facility' variable
which is documented as:

 * all processes that use the libu must define a "facility" variable somewhere
 * to satisfy this external linkage reference.
 *
 * Such variable will be used as the syslog(3) facility argument.

Well, prior to that commit, openwsman itself declared the
variable (and set it to LOG_DAEMON). Now it's up to us.

Yeah, the variable naming is terrible and also I we are not using
libu directly, but apparently libwsman.so requires it anyway:

  $ objdump -T /usr/lib64/libwsman.so | grep facility
  0000000000000000      D  *UND*  0000000000000000  Base        facility

1: d72c51f21b
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-01-06 14:21:18 +01:00
a91b22ffc6 apparmor: Allow running loongarch64 VMs
Allows to load firmware in the qemu-efi-loongarch64 directory
Allows the binary qemu-system-loongarch64 to be run

This makes it possible to run loongarch64 VMs when AppArmor
is enabled

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-02 13:48:12 +01:00
247357cc29 qemu: Add support for direct and extended tlbflush features
They require special handling since they are dependent on the basic
tlbflush feature itself and therefore are not handled automatically as
part of virDomainHyperv enum, just like the stimer-direct feature.

Resolves: https://issues.redhat.com/browse/RHEL-7122
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-26 10:46:59 +01:00
ac08b362da conf, docs: Add support for direct and extended tlbflush features
Similarly to stimer-direct these are subelements of <tlbflush/> in the
domain XML.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-26 10:46:59 +01:00
f7c33eeeb7 ch: Enable logging curl responses from ch
Log curl responses from cloud-hypervisor process during Boot request, using
domain's logContext.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-20 16:24:58 +01:00
db4e837598 ch: move curl_data and curl_callback definitions
Move the definitions of curl_data and curl_callback to be used
within virCHMonitorPutNoContent.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-20 16:24:58 +01:00
72a9a91e3b ch: Enable logging for ch domains
Use domainLogContext to enable logging for ch domain process during create
and restore steps.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-20 16:24:58 +01:00
334d2f604c hypervisor: Move QEMU log context to hypervisor
While doing so, also drop QEMU specific arguments from
domainLogContextNew() and replace them with hypervisor agnostic
ones.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-20 16:24:58 +01:00
94b393dd6e util/xml: open XML files before calling libxml2
Libxml2 has awful error reporting behaviour when reading files. When
we fail to load a file from the test driver we see:

  $ virsh -c test:///wibble.xml
  I/O warning : failed to load external entity "/wibble.xml"
  error: failed to connect to the hypervisor
  error: XML error: failed to parse xml document '/wibble.xml'

where the I/O warning line is something printed by libxml2 itself,
which also lacks any useful detail.

Switching to our own file reading code we can massively improve
things:

  $ ./build/tools/virsh -c test:///wibble.xml
  error: failed to connect to the hypervisor
  error: Failed to open file '/wibble.xml': No such file or directory

Using 10 MB as an upper limit on XML file size ought to be sufficient
for any XML files libvirt is reading.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 10:00:22 +00:00
7f2fd38ee7 util/xml: don't assume libxml2 has the filename of the document
The libxml2 error handling gets the filename from a libxml2 struct, but
it is better to not assume libxml2 knows the filename being parsed, as
we might have simply provided it a pre-loaded string.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 10:00:22 +00:00
0635cd9555 util/xml: fix extraction of XML context
Currently given an input of '<dom\n' we emit an error:

  error: Failed to define domain from tests/qemuxmlconfdata/broken-xml-invalid.xml
  error: at line 2: Couldn't find end of Start Tag dom line 1
  (null)
  ^

With this fix we emit:

  error: Failed to define domain from tests/qemuxmlconfdata/broken-xml-invalid.xml
  error: at line 2: Couldn't find end of Start Tag dom line 1
  <dom
  ----^

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 10:00:22 +00:00
f7cbb136c3 src: drop obsolete checks for virDomainConfigFile failure
This cannot ever return NULL

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 09:58:37 +00:00
8575724aef rpc: remove logind support for virNetDaemon
The virNetDaemon code now only concerns itself with preventing auto
shutdown of the local daemon. Logind is now handled by the new
virInhibitor object, for QEMU, LXC and LibXL. This fixes two notable
bugs

 * Running virtual networks would prevent system shutdown
 * Loaded ephemeral secrets would prevent system shutdown

Fixes 9e3cc0ff5e
Fixes 37800af9a4
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-19 18:03:20 +00:00
48f0b6dfa1 src: convert drivers over to new virInhibitor APIs
This initial conversion of the drivers switches them over to use
the virInhibitor APIs in local daemon only mode. Communication to
logind is still handled by the virNetDaemon class logic.

This mostly just replaces upto 3 fields in the driver state
with a single new virInhibitor object, but otherwise should not
change functionality besides replacing atomics with mutex protected
APIs.

The exception is the LXC driver which has been trying to inhibit
shutdown shutdown but silently failing to, since nothing ever
remembered to set the 'inhibitCallback' pointer in the driver
state struct.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-19 18:03:15 +00:00
d2e5aa4f4e util: introduce object for holding a system inhibitor lock
The system inhibitor locks are currently handled by code in the
virNetDaemon class. The driver code invokes a callback provided
by the daemon when it wants to start or end inhibition.

When the first inhibition is started, the daemon will call out
to logind to apply it system wide.

This has many flaws

 * A single message is registered with logind regardless of
   what driver holds the inhibition
 * An inhibition of daemon shutdown can't be acquired
   without also inhibiting system shutdown
 * Config of the inhibitions cannot be tailored by the
   driver

The new virInhibitor object addresses these:

 * The object directly manages an inhibition with logind
   privately to the driver, enabling custom messages to
   be set.
 * It is possible to acquire an inhibition locally to the
   daemon without forwarding it to logind.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-19 18:03:04 +00:00
a0a8c95d07 cpu_map: Add missing CPU features
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:05 +01:00
3d55a2e593 cpu_map: Add ibpb-brtype CPU feature
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:05 +01:00
2284e8c29b cpu_map: Add zero-fcs-fds CPU feature
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:05 +01:00
dc12ca3949 cpu_map: Add fdp-excptn-only CPU feature
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:05 +01:00
212b7d8e28 cpu_map: Add sha512, sm3, and sm4 CPU features
Introduced by Clearwater Forest platform.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:05 +01:00
41a6de76bc cpu_map: Add GraniteRapids-v2 CPU model
Introduced by QEMU 9.2.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:04 +01:00
30f05acf35 cpu_map: Add avx10* CPU features
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:24:04 +01:00
060fd63c26 qemu: Call migrate-incoming with exit-on-error=false
The exit-on-error=false argument of migrate-incoming tells the QEMU
process to keep running when incoming migration fails, which helps us in
two ways:

1. When migration enters Finish phase to cleanup the process, the domain
   might not even exist on the destination (because it has already been
   cleaned up by EOF monitor callback) and we would get rather unhelpful
   "operation failed: domain is no longer running" error message.

2. We can get the error that caused incoming migration to fail directly
   from QEMU via query-migrate QMP command.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:21:21 +01:00
090a2f27c2 qemu: Replace qemuDomainCheckMonitor with qemuMigrationJobCheckStatus
The function is only used during incoming migration in the beginning of
Finish phase to detect if QEMU already died but EOF handler haven't had
a chance to do its job yet. It calls query-status QMP command, but
ignores the result. By calling query-migrate instead we can achieve the
same functionality if QEMU is dead and even get meaningful error from
"error-desc" in case the incoming migration failed and QEMU is still
running.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:21:21 +01:00
3100f43a1d qemu: Detect exit-on-error argument of migrate-incoming
The exit-on-error argument (added in QEMU 9.1.0) can be used to tell
QEMU not to exit when incoming migration fails so that the error can be
retrieved via QMP. This patch adds a new capability bit indicating
support for the new argument.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-19 15:21:21 +01:00
9636ac40a3 qemu_capabilities: Avoid memleak in virQEMUCapsProbeFullDeprecatedProperties()
As one of its arguments, the
virQEMUCapsProbeFullDeprecatedProperties() gets a pointer to
GStrv (a string list), which it may eventually replace. It's
single caller (virQEMUCapsProbeQMPHostCPU()) passes a string list
indeed. Now, when replacing one string list with another plain
g_free() is not enough as we need to free individual strings too.

==13573== 34 bytes in 8 blocks are definitely lost in loss record 271 of 576
==13573==    at 0x4844878: malloc (vg_replace_malloc.c:446)
==13573==    by 0x51789D1: g_malloc (in /usr/lib64/libglib-2.0.so.0.7800.6)
==13573==    by 0x5193E82: g_strdup (in /usr/lib64/libglib-2.0.so.0.7800.6)
==13573==    by 0x4997F73: g_strdup_inline (gstrfuncs.h:321)
==13573==    by 0x4997F73: virJSONValueArrayToStringList (virjson.c:1296)
==13573==    by 0x5027CF7: qemuMonitorJSONParseCPUModelExpansion (qemu_monitor_json.c:5139)
==13573==    by 0x50281C9: qemuMonitorJSONGetCPUModelExpansion (qemu_monitor_json.c:5245)
==13573==    by 0x501044F: qemuMonitorGetCPUModelExpansion (qemu_monitor.c:3261)
==13573==    by 0x4F190D0: virQEMUCapsProbeQMPHostCPU (qemu_capabilities.c:3227)
==13573==    by 0x4F2145E: virQEMUCapsInitQMPMonitor (qemu_capabilities.c:5758)
==13573==    by 0x10FFF8: testQemuCaps (qemucapabilitiestest.c:111)
==13573==    by 0x110B53: virTestRun (testutils.c:143)
==13573==    by 0x11063E: doCapsTest (qemucapabilitiestest.c:200)

Fixes: 51c098347d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2024-12-19 09:14:53 +01:00
0162f2008e qemu: Enable I/O APIC even more frequently
In my previous commit v10.10.0-48-g2d222ecf6e I've made us enable
I/O APIC when there is an IOMMU with EIM. This works well. What
does not work is case when there's just an IOMMU without EIM but
with 256+ vCPUS. Problem is that post parsing happens in two
stages: general domain post parse (where
qemuDomainDefEnableDefaultFeatures() is called) and then per
device post parse (where qemuDomainIOMMUDefPostParse() is
called). Now, in aforementioned case it is the device post parse
phase where EIM is enabled but the code that would enable
VIR_DOMAIN_FEATURE_IOAPIC has already run.

To resolve this, make the domain post parse callback "foresee"
the future enabling of EIM so that it can turn on I/O APIC
beforehand.

Resolves: https://issues.redhat.com/browse/RHEL-65844
Fixes: 2d222ecf6e
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-18 15:27:12 +01:00
ef7c0f46f9 rpm: ensure we own directories we might create
An RPM must own any directories its creates, unless it can guarantee a
dependancy has ownership. Two packages owning the same directory is fine
if permissions are consistent.

We don't require augeas as a dep in most packages, so we must own the
augeas lens directories. Likewise for systemtap tapset dirs.

Our own cpu map dir also needs ownership.

A few files are re-sorted, so that the files are listed immediately
adjacent to the %dir that contains them.

https://bugzilla.redhat.com/show_bug.cgi?id=2280979
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-17 11:20:53 +00:00
9e227634d3 Fix a few typos in error messages
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/722
Reported-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-17 12:16:19 +01:00
62658bbf06 conf: add deprecated_features attribute
Add a new a attribute, deprecated_features='on|off' to the <cpu>
element.  This is used to toggle features flagged as deprecated on the
CPU model on or off.  When this attribute is paired with 'on',
deprecated features will not be filtered.  When paired with 'off', any
CPU features that are flagged as deprecated will be listed under the
CPU model with the 'disable' policy.

Example:

  <cpu mode='host-model' check='partial' deprecated_features='off'/>

The absence of this attribute is equivalent to the 'on' option.

The deprecated features that will populate the domain XML are the same
features that result in the virsh domcapabilities command with the
--disable-deprecated-features argument present.

It is recommended to define a domain XML with this attribute set to
'off' to ensure migration to machines that may outright drop these
features in the future.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
15d45964e4 virsh: add --disable-deprecated-features flag to domcapabilities
Add a new flag, --disable-deprecated-features, to the domcapabilities
command.  This will modify the output to show the 'host-model' CPU
with features flagged as deprecated paired with the 'disable' policy.

virsh domcapabilities --disable-deprecated-features

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
cd1e837c22 qemu_capabilities: filter deprecated features if requested
If flag VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES
is passed to qemuConnectGetDomainCapabilities, then the domain's CPU
model features will be updated to set any deprecated features to the
'disabled' policy.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
4e2c8de204 libvirt-domain: introduce VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES
Introduce domain flag used to filter deprecated features from the
domain's CPU model.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
51c098347d qemu_capabilities: query deprecated features for host-model
Add QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_DEPRECATED_PROPS for detecting
if query-cpu-model-expansion can report deprecated CPU model properties.
QEMU introduced this capability in 9.1 release.  Add flag and deprecated
features to the capabilities test data for QEMU 9.1 and 9.2 replies/XML
since it can now be accounted for.

When probing for the host CPU, perform a full CPU model expansion to
retrieve the list of features deprecated across the entire architecture.
The list and count are stored in the host's CPU model info within the
QEMU capabilities.  Other info resulting from this query (e.g. model
name, etc) is ignored.

The new capabilities flag is used to fence off the extra query for
architectures/QEMU binaries that do not report deprecated CPU model
features.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
45140d2930 qemu: parse deprecated-props from query-cpu-model-expansion response
query-cpu-model-expansion may report an array of deprecated properties.
This array is optional, and may not be supported for a particular
architecture or reported for a particular CPU model. If the output is
present, then capture it and store in a qemuMonitorCPUModelInfo struct
for later use.

The deprecated features will be retained in qemuCaps->kvm->hostCPU.info
and will be stored in the capabilities cache file under the <hostCPU>
element using the following format:

        <deprecatedFeatures>
                <property name='bpb'/>
                <property name='csske'/>
                <property name='cte'/>
                <property name='te'/>
        </deprecatedFeatures>

At this time the data is only queried, parsed, and cached.  The data
will be utilized in a subsequent patch.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
60e407deb5 qemuMonitorJSONGetCPUModelExpansion: refactor parsing functions
Refactor the CPU Model parsing functions within
qemuMonitorJSONGetCPUModelExpansion.  The new functions,
qemuMonitorJSONParseCPUModelExpansionData and
qemuMonitorJSONParseCPUModelExpansion invoke the functions they
replace and leave room for a subsequent patch to handle parsing the
(optional) deprecated_props field resulting from the command.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-17 11:45:50 +01:00
2d222ecf6e qemu: Enable I/O APIC if needed
This is a follow up of my previous commits. If the number of
vCPUs exceeds some arbitrary value (255) then QEMU requires IOMMU
with EIM and intremap enabled. But in turn, intremap IOMMU
requires split I/O APIC (per virDomainDefIOMMUValidate()). Since
after my previous commits (e.g. v10.10.0-rc1~183) IOMMU is added
automagically, the I/O APIC can be also enabled automagically.

Relates to: https://issues.redhat.com/browse/RHEL-65844
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-12-16 15:43:16 +01:00
99474f8e50 logging: Change return type of virLogDaemonConfigFilePat to void
This function return value is invariant since 18f3771, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-16 11:28:21 +01:00
0e1a848733 util: Change return type of virSCSIVHostDeviceSetUsedBy to void
This function return value is invariant since 18f3771, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-16 11:28:21 +01:00
20afcd4b14 util: Change return type of virSCSIDeviceSetUsedBy to void
This function return value is invariant since 18f3771, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-16 11:28:21 +01:00
ed8eec073f util: Change return type of virPCIDeviceSetUsedBy to void
This function return value is invariant since 18f3771, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-16 11:28:21 +01:00
4e987a86b5 qemu: re-use existing ActualNetDef for more interface types during update-device
For the full history behind this patch, look at the following:

   https://issues.redhat.com/browse/RHEL-7036
   commit v10.7.0-101-ga37bd2a15b
   commit v10.8.0-rc2-8-gbcd5ae4e73

Summary: original problem was unexpected failure of update-device when
the user hadn't changed anything other than online status of the guest
NIC (which should always be allowed).

The first commit "fixed" this by avoiding the allocation of a new
ActualNetDef (i.e. creating a new networkport) for *all* network
device updates (because that was inappropriately changing which
ethernet physdev should be used for a macvtap connection, which by
design can't be handled in an update-device).

But this commit caused a regression for update-device of bridge-based
network devices (because some the updates of certain attributes *do*
require the ActualNetDef be re-allocated), so...

The 2nd commit narrowed the list of network types that get the "don't
allocate new ActualNetDef" treatment (so that only interfaces
connected to a network that uses a pool of ethernet VFs *being used in
passthrough mode* qualify).

But then it was pointed out that this re-broke simple updates of
devices that used a direct/macvtap network in "bridge" mode (because
it's possible to list multiple physdevs to use for bridge mode, in
which case the network driver attempts to "load balance" (and so a new
allocation might have a different ethernet physdev which, again, can't
be supported in a device-update).

So this (single line of code) patch *widens* the list of network types
that don't allocate a new ActualNetDef to also include the other
direct (macvtap) modes, e.g. bridge, private, etc.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 11:44:05 -05:00
2195037265 util: virsysinfo: Change return type of functions that never fail to void
These functions return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
abd9887b6c hyperv: Change return type of hypervCheckParams to void
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
f3179d5abe rpc: Change return type of virNetClientAddStream to void
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
b0da352c58 rpc: Change return type of virNetClientAddProgram to void
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
5afe228ea7 rpc: Change return type of virNetServerAddProgram to void
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
393b0471a7 access: Change return type of virAccessDriverStackAppend to void
This function return value is invariant since VIR_EXPAND_N check
removal in 7d2fd6e, so change its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-13 16:20:44 +01:00
da2439b746 cpu_map: Add EPYC-Genoa-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:59 +01:00
9bc479a3c0 cpu_map: Add Opteron_G5-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
d092730fb4 cpu_map: Add Opteron_G4-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
422d90dc56 cpu_map: Add Opteron_G3-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
51ffa44fb4 cpu_map: Add Opteron_G2-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
a1625b73f6 cpu_map: Add Opteron_G1-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
332136e49a cpu_map: Add phenom-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
6b775a68ec cpu_map: Add athlon-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
8f5e36cbce cpu_map: Add KnightsMill-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:58 +01:00
537f136549 cpu_map: Add Penryn-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
2d061eba8c cpu_map: Add Conroe-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
6d25eafaec cpu_map: Add kvm64-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
2c6a015a7f cpu_map: Add qemu64-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
4a8259b5a3 cpu_map: Add kvm32-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
d9b23d77c0 cpu_map: Add qemu32-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
a3cab1ae67 cpu_map: Add core2duo-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
c9fa77bfe8 cpu_map: Add n270-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
ae14b20aaa cpu_map: Add coreduo-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
886fd169c5 cpu_map: Add pentium3-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:57 +01:00
df34ae48e9 cpu_map: Add pentium2-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
70a4ec29a7 cpu_map: Add pentium-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
2abf6bd47c cpu_map: Add 486-v1 CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
8bc6ebb495 sync_qemu_models_i386: Generate missing -v1 variants
QEMU supports -v1 variant of any CPU model even though the list of
versions is not defined (i.e., even if { .version = 1 } item is
missing).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
19b56603c4 sync_qemu_models_i386: Update meson.build
When adding new CPU models to CPU map it's easy (and very common) to
forget to add the new files to meson.build. We already update index.xml
with the new models so updating meson.build too makes sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
50c6d727b6 cpu_map: Sort data files in meson.build
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:41:56 +01:00
b1725fbfb8 virsh: Fix --timeout option of migrate command
When starting a migration with --timeout, we create a thread to call the
migration API and in parallel setup a timer for the timeout. The
description of --timeout says: "run action specified by --timeout-*
option (suspend by default) if live migration exceeds timeout", which is
not really the way this feature was implemented. Before live migration
starts we first need to contact the source to get the domain definition
and send it to the destination where a new QEMU process has to be
started. This can take some (unpredictably long) time while the timeout
timer is already running. If a very short timeout is set (which doesn't
really make sense, but it's allowed), we may even end up taking the
timeout action before the actual migration had a chance to start.

With this patch the timeout is started only after we get non-zero
dataTotal from virDomainGetJobInfo, which means the migration (of either
storage or memory) really started.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-13 14:37:21 +01:00
6cc93bf288 qemu: Grab a QUERY job when formatting domain XML
It may happen that, for instance after daemon restart, that one
thread is still in qemuProcessReconnect(), i.e. filling in
runtime information by talking to QEMU on monitor. If another
thread then tries to format domain XML (which is currently
guarded by plain mutex on virDomainObj) it'll produce incomplete
and misleading information (e.g. current size of virtio-mem).
This happens because the reconnecting thread talks to QEMU on
monitor and thus unlocks the domain object frequently allowing
the XML formatting thread to acquire the mutex meanwhile.

Resolves: https://issues.redhat.com/browse/RHEL-71042
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-12-12 14:46:25 +01:00
56d448ad0f ch: Enable user aliases
Enable parsing user aliases in ch driver.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-12-12 11:08:47 +01:00
81da7a2c2a qemu: tpm: do not update profile name for transient domains
If we do not have a persistent definition, there's no point in
looking for it since we cannot store it.

Also skip the update if the tpm device(s) in the persistent
definition are different.

This fixes the crash when starting a transient domain.

https://issues.redhat.com/browse/RHEL-69774
https://gitlab.com/libvirt/libvirt/-/issues/715

Fixes: d79542eec6
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-12-11 20:10:43 +01:00
c63bdd17b9 virt-aa-helper: allow riscv64 EDK II
Debian has packaged EDK II for 64-bit RISC-V in directory
/usr/share/qemu-efi-riscv64/.

For usage with libvirt update the AppArmor helper.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-12-10 09:39:53 +01:00
daa560858b qemuDomainDiskChangeSupportedIothreads: Change error wording to fix grammar
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2024-12-10 08:54:29 +01:00
300362421e rpm: replace 'git' with 'git-core'
We don't need the full git package, git-core is sufficient and a smaller
build root install.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-05 09:43:22 +00:00
57835f432f qemu: enable QEMU core dump by default on Linux
The Linux MADV_DONTDUMP flag was added to Linux kernels > 3.3,
back in 2012, and the dump-guest-core flag was added to QEMU
> 1.0 at the same time.

IOW, on Linux we have long been able to assume that QEMU core
dumps will exclude guest memory, unless the user has overridden
the host level defaults in the domain XML.

It is desirable to permit QEMU core dumps out of the box to make
it easier for users to report crashes to their OS vendor without
having to reconfigure and restart libvirt daemons and their
running guests.

While there is a risk that an admin may have set 'dump_guest_core'
to true, while leaving 'max_core' to 0, on balance the benefits
of easier troubleshooting outweigh the risk of changing the
defaults to permit core dumps.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-05 09:42:37 +00:00
dd217cd938 lxc: remove no longer working netns check
Since iproute2 v6.12.0, the command "ip link set lo netns -1" can
no longer be used to check for netns support, as it now validates
PIDs are not less than zero.

Since every kernel we care about has the support, just remove the
check.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
2024-12-05 09:32:44 +00:00
dba710374d util: Fix typo in virNetDevOpenvswitchInterfaceSetQos
The typo is causing virtqemud to crash when starting a domain with ovs
bridge interface and QOS.

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

Fixes: a3b8753db9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-12-04 16:27:00 +01:00
be784aa513 Post-release version bump to 11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-02 13:20:38 +01:00
7e5641bbc0 Release of libvirt-10.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-02 13:16:51 +01:00
94338f1375 Translated using Weblate (Swedish)
Currently translated at 98.3% (10383 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 98.1% (10364 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-30 23:38:37 +01:00
b0a782f708 docs: document external swtpm
When external swtpm support was added back in 9.0.0, I omitted
the update of the XML docs.

Add it now, especially since the 'emulator' backend can now
also use the <source> element.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-11-28 14:40:50 +01:00
984f6bb43f Translated using Weblate (Swedish)
Currently translated at 97.9% (10343 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-28 12:22:58 +01:00
349ea8669c Translated using Weblate (Korean)
Currently translated at 100.0% (10555 of 10555 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% (10526 of 10555 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2024-11-28 12:22:57 +01:00
304b93dbb5 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>
2024-11-28 12:18:52 +01:00
f850c2a569 virschematest: Don't skip all "directory" tests
Due to a bug in the optimization to avoid testing symlinked tests
multiple times all tests were skipped.

In commit f997fcca71 I made an attempt to optimize the
tests by avoiding testing symlinks. This optimization was buggy as I've
passed the 'd_name' field of 'struct dirent' which is just the filename
to 'g_lstat()'. 'g_lstat()' obviously always failed with ENOENT. As the
logic checked only for successful return of 'g_lstat()' the optimizatio
was a dud.

Now in 4d8ebbfee8 the 'g_lstat()' call was replaced by
'virFileIsLink()' checking all non-zero values. This meant that if
'virFileIsLink()' failed the test was skipped. Now since a bad argument
was passed this failed always and thus was always skipped making
'virschematest' useless.

Fix it by passing the full path of the test and also explicitly check
for '1' return value instead of any non-zero.

Fixes: f997fcca71
Fixes: 4d8ebbfee8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
99dadf9e08 schemas: domaincaps: Add schema for CPU 'blockers'
Due to broken 'virschematest' commit f4dc248a95
forgot to introduce schema for the new element.

Fixes: f4dc248a95
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
fcd9b78863 schemas: domaincaps: Add schema for 'canonical' cpu model name
Due to 'virschematest' being broken commit fff2bbee7f
forgot to add schema for the new attribute.

Fixes: fff2bbee7f
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
5e514c6733 schemas: domaincaps: Add schema for 'panic' device
Due to 'virschematest' being broken commit a52cd504b3
introduced a new element to the domain caps but didn't add schema for
it.

Fixes: a52cd504b3
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
2704648936 schemas: domain: Make <identity> subelement of NFS disk source optional
Both the 'user' and 'group' attribute are optional so <identity> can
be empty. Allow it to be omitted completely. The parser and qemu code
can handle that.

The schema was introduced in 943871f971
and in d018c8dc9e an offending test was
added.

Fixes: 943871f971
Fixes: d018c8dc9e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
0bd01ef765 NEWS: Mention qcow2 'data-file', block NVRAM, and internal snapshot reversion
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:28:44 +01:00
976300fdf4 qemuDomainGetStorageSourceByDevstr: Lookup also '<dataStore>'
The <dataStore> volumes have their own 'id' so we need to be able to
look them up for the given image chain.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
515ed143ec qemuDomainVirStorageSourceFindByNodeName: Match also '<dataStore>' sources
As the source for the data file is a completely separate
virStorageSource including it's own index we need to match it
explicitly, so that code such as storage threshold events work properly
and separately for the data file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
71935d4972 qemuDomainVirStorageSourceFindByNodeName: Extract nodename matching
Extract the matching of the node name of a single virStorage source so
that the logic can be reused in the upcoming patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
2a9349c8e8 qemu: snapshot: Change 'data-file' to read-only after snapshot
For the reason outlined in previous commit qemu doesn't do this
automatically. Handle it manually after the snapshot.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
754ca45c45 qemu: block: Ensure that <dataStore> is in appropriate state
In contrast to normal backing chain members where qemu does honour the
'auto-read-only' property the 'data-file' nodes are not automatically
reopened by qemu. Libvirt now has the infrastructure to reopen them
explicitly so use it for all transitions of the 'commit' block job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
ed656f4c8f qemuBlockReopenAccess: Don't require backing chain terminator for non-chained images
Add an exception for image formats not supporting backing images so that
they can be reopened RW/RO without the need for adding a terminating
virStorageSource as they simply can't have a backing image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
b83e87ca78 qemuBlockReopenAccess: Fix update of 'readonly' state
Refactors done in 24b667eeed (and also 9ec0e28e87)
broke the expected handling of the update of 'readonly' flag of a
virStorage. The source is actually set to the proper state but rolled
back to the previous state as the 'cleanup' label should have been
'error' and thus not reached on success.

Additionally some of the code paths violate the statement in the comment
after updating 'readonly' that only 'goto error' must be used.

Fixes: 24b667eeed
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
b510f8ca8a qemuBlockReopenAccess: Add debug log entry about state of the image
Log the node name and current and expected state to simplify debugging.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
c4d6bd3bf5 qemu: Validate QoS values in qemuDomainSetInterfaceParameters()
This is similar to one of my previous commits (v10.7.0-rc1~22)
which introduced a check that <bandwidth/> values fit into
certain limits. My original commit validated values when parsing
<bandwidth/> XML, but completely missed the case when values are
set over virDomainSetInterfaceParameters() API.

Solution is simple - just perform validation after bandwidth
structure is reconstructed from arguments passed to the API.

Resolves: https://issues.redhat.com/browse/RHEL-65372
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-27 15:11:13 +01:00
9b55a130b7 NEWS: Document support for versioned CPU models
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-27 14:51:05 +01:00
c0b6774d50 cpu: Check blockers in virCPUCompareUnusable only if they exist
virCPUCompareUnusable can be called with blockers == NULL in case the
CPU model itself is usable (i.e., QEMU reports an empty list of
blockers), but the CPU definition contains some additional features
which have to be checked.

Fixes: v10.8.0-129-g5f8abbb7d0
Reported-by: Han Han <hhan@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Han Han <hhan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-27 14:50:44 +01:00
444f45135a 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>
2024-11-26 15:30:12 +01:00
b35d559d6c po: Refresh potfile for v10.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-26 15:26:38 +01:00
68aaadd3a4 Translated using Weblate (Swedish)
Currently translated at 98.0% (10325 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-26 15:13:19 +01:00
e9e5ebe6a6 network: add tc filter rule to nftables backend to fix checksum of DHCP responses
Please see the commit log for commit v10.9.0-rc1-1-g42ab0148dd for the
history and explanation of the problem that this patch is fixing.

A shorter explanation is that when a guest is connected to a libvirt
virtual network using a virtio-net adapter with in-kernel "vhost-net"
packet processing enabled, it will fail to acquire an IP address from
a DHCP seever running on the host.

In commit v10.9.0-rc1-1-g42ab0148dd we tried fixing this by *zeroing
out* the checksums of these packets with an nftables rule (nftables
can't recompute the checksum, but it can set it to 0) . This
*appeared* to work initially, but it turned out that zeroing the
checksum ends up breaking dhcp packets on *non* virtio/vhost-net guest
interfaces. That attempt was reverted in commit v10.9.0-rc2.

Fortunately, there is an existing way to recompute the checksum of a
packet as it leaves an interface - the "tc" (traffic control) utility
that libvirt already uses for bandwidth management. This patch uses a
tc filter rule to match dhcp response packets on the bridge and
recompute their checksum.

The filter rule must be attached to a tc qdisc, which may also have a
filter attached for bandwidth management (in the <bandwidth> element
of the network config). Not only must we add the qdisc only once
(which was already handled by the patch two prior to this one), but
also the filter rule for checksum fixing and the filter rule for
bandwidth management must be different priorities so they don't clash;
this is solved by adding the checksum-fix filter with "priority 2",
while the bandwidth management filter remains "priority 1" (both will
always be evaluated anyway, it's just a matter of which is evaluated
first).

So far this method has worked with every different guest we could
throw at it, including several that failed with the previous method.

Fixes: b89c4991da
Reported-by: Rich Jones <rjones@redhat.com>
Reported-by: Andrea Bolognani <abologna@redhat.com>
Fix-Suggested-by: Eric Garver <egarver@redhat.com>
Fix-Suggested-by: Phil Sutter <psutter@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
6412c2cb51 util: add new "tc" layer for virFirewallCmd objects
If the layer of a virFirewallCmd is "tc", then the "tc" utility will
be executed using the arguments that had been added to the
virFirewallCmd

tc layer doesn't support auto-rollback command creation (any rollback
needs to be added manually with virFirewallAddRollbackCmd()), and also
tc layer isn't supported by the iptables backend (it would have been
straightforward to add, but the iptables backend doesn't need it, and
I didn't want to take the chance of causing a regression in that
code for no good reason).

Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
f1d94bbfa6 util: don't re-add the qdisc used for tx filters if it already exists
There will soon be two separate users of tc on virtual networks, and
both will use the "qdisc root handle 1: htb" to add tx filters. One or the
other could get the first chance to add the qdisc, and then if at a
later time the other decides to use it, we need to prevent the 2nd
user from attempting to re-add the qdisc (because that just generates
an error).

We do this by running "tc qdisc show dev $bridge handle 1:" then
checking if the output of that command contains both "qdisc" and " 1:
".[*] If it does then the qdisc has already been added. If not then we
need to add it now.

[*]As of this writing, the output more exactly starts with "qdisc
htb 1: root", but our comparison is made purposefully generous to
increase the chances that it will continue to work properly if tc
modifies the format of its output.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
35a5bf25d1 util: put the command that adds a tx filter qdisc into a separate function
virNetDevBandwidthSet() adds a queue discipline (qdisc) for each
interface that it will need to add tc transmit filters to, and the
filters are then attached to the qdisc.

There are other circumstances where some other function will need to
add tc transmit filters to an interface (in particular an upcoming
patch to the network driver nftables backend that will use a tc tx
filter to fix the checksum of dhcp packets), so that function will
also need a qdisc for the tx filter. To assure both always use exactly
the same qdisc, this patch puts the command that adds the tx filter
qdisc into a separate helper function that can (and will) be called
from either place

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
250435546a util: make it optional to clear existing tc qdiscs/filters in virNetDevBandwidthSet()
virNetDevBandwidthSet() always clears all existing qdiscs and their
subordinate filters before adding all the new qdiscs/filters. This is
normally exactly what we want, but there is one case (the network
driver) where the Qdisc added by virNetDevBandwidthSet() may already
be in use by the nftables backend (which will add a rule to fix the
checksum of dhcp packets); in that case, we *don't* want
virNetDevBandwidthSet() to clear out the qdisc that was already added
for nftables, and none of the bandwidth filters have been added yet,
so there already aren't any "old" filters that need to be removed
either - it is safe to just skip virNetDevBandwidthClear() in this
case.

To allow the network driver to set bandwidth without first clearing
it, this patch adds the flag VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL to the
virNetDevBandwidthSetFlags enum, and recognizes it in
virNetDevBandwidthSet() - if the flag is set, then
virNetDevBandwidth() will call virNetDevBandwidthClear() just as it
always has. But if the flag isn't set it *won't* call
virNetDevBandwidthClear().

As suggested above, VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL is set for all
calls to virNetdevBandwidthSet() except for two places in the network
driver.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
fa50454c05 util: use a single flags arg for virNetDevBandwidthSet(), not multiple bools
Having two bools in the arg list is on the borderline of being
confusing to anyone trying to read the code, but we're about to add a
3rd. This patch replaces the two bools with a single flags argument
which will instead have one or more bits from virNetDevBandwidthFlags
set.

Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-26 14:36:14 +01:00
6490d6ac11 cpu_map: Add KnightsMill CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
b5c15cf0d0 cpu_map: Add Denverton CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
6e09d69cff cpu_map: Add versions of Dhyana CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
3310ab0e58 cpu_map: Add versions of EPYC CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
cbccbe6e43 cpu_map: Add versions of EPYC-Rome CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
33209d63cd cpu_map: Add versions of EPYC-Milan CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
d0e5e984b6 cpu_map: Add versions of Nehalem CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
679305a98e cpu_map: Add versions of Westmere CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:36 +01:00
57b5f8078b cpu_map: Add versions of SandyBridge CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
d00ba759c4 cpu_map: Add versions of IvyBridge CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
569a06b07e cpu_map: Add versions of Haswell CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
80d374422c cpu_map: Add versions of Broadwell CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
8bf6c7eb84 cpu_map: Add versions of Skylake-Client CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
6a3f1bc466 cpu_map: Add versions of Skylake-Server CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
4ad434654a cpu_map: Add versions of Cascadelake-Server CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
5bb09e6790 cpu_map: Add versions of Icelake-Server CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
eed7a2c4f7 cpu_map: Add versions of Cooperlake CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
860f40053d cpu_map: Add versions of Snowridge CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:35 +01:00
5faffbc514 cpu_map: Add versions of SapphireRapids CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
073f825dab cpu_map: Add versions of GraniteRapids CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
135a3ad2a4 cpu_map: Add versions of SierraForest CPU model
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
fff2bbee7f domain_capabilities: Report canonical names of CPU models
Some models are just aliases to other models. Make this relation
available to users via domain capabilities.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
ca0ea085d7 cpu: Introduce virCPUGetCanonicalModel
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
cb6463d803 cpu_x86: Record relations between CPU models
Record a fact a specific CPU model was derived from another one. The
original model is also marked as an alias of the new one in case it did
not change any properties of the original CPU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
a410f0256a sync_qemu_models_i386: Copy signatures from base model
The signatures in the CPU map are used for matching physical CPUs and
thus we need to cover all possible real world variants we know about.
When adding a new version of an existing CPU model, we should copy the
signature(s) of the existing model rather than replacing it with the
signature that QEMU uses.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
7133d72eff sync_qemu_models_i386: Update index.xml
Add all newly generated CPU models to the appropriate section of
index.xml.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
e2e7602a22 cpu_map: Properly group models in index.xml
We already visually group the included models using comments. This patch
introduces a new <group name='...'> element for doing it properly in a
machine friendly way.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
3bb2c2b641 sync_qemu_models_i386: Switch to lxml
XMLs parse/format round trip using lxml results in an XML document that
almost exactly matches the original (including comments).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
19cfe21d4e sync_qemu_models_i386: Store extra info in a separate file
We don't really need or want the extra info to be included in the CPU
model definitions in git, it's mostly useful for verifying the output of
the script. Let's store it in a separate file rather than in a comment
block of the CPU model definition itself.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
db127963d5 sync_qemu_models_i386: Add support for versioned CPU models
Each CPU model with -v* suffix is defined as a standalone model copying
all attributes of the previous version. CPU model versions with an alias
are handled differently. The full definition is used for the alias and
the versioned model is created as an identical copy of the alias.

To avoid breaking migration compatibility of host-model CPUs all
versioned models are marked with <decode guest='off'/> so that they are
ignored when selecting candidates for host-model. It's not ideal but not
doing so would break almost all host-model CPUs as the new versioned CPU
models have all vmx-* features included since their introduction while
existing CPU models were updated later. This meas existing models would
be accompanied with a long list of vmx-* features to properly describe a
host CPU while the newly added CPU models would have those features
enabled implicitly and their list of features would be significantly
shorter. Thus the new models would always be better candidates for
host-model than the existing models.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:34 +01:00
515568071d sync_qemu_models_i386: Do not require full path to QEMU's cpu.c
While the script for synchronizing CPU features expects a path to QEMU
source tree, this CPU model script insisted on getting a full patch to
cpu.c file, even though it could easily deduce it from the path to QEMU
source tree.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
233afc3c58 sync_qemu_models_i386: Do not overwrite existing models
We don't change definitions of CPU models which were already included in
a libvirt release to maintain migration compatibility. Thus the script
can just skip existing models and save us from having to drop the
changes it would do to them.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
c16e7f231f sync_qemu_models_i386: Use f-strings
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
ba1652e84a sync_qemu_features_i386: Add some removed features back
When removing features unknown to QEMU (they have a different name or
are completely missing as they are not configurable by a user) I should
not have removed them from the list of features unknown to QEMU in the
script for synchronizing QEMU features to the CPU map.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
88e7cc1477 cpu_x86: Promote added/removed from ancestor
When a CPU model is defined based on another model, we were completely
ignoring features marked as added to or removed from the original model
after it was released. For added features this is the right thing to do
as it will promote them to become normal features included in the new
model. But features marked as removed would become included in the new
model as well. We need to explicitly remove them as if they were never
included in the model.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
61dd5d6bef cpu_x86: Annotate virCPUx86Model fields
Document which fields are inherited when a CPU model is based on another
model.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-26 13:04:33 +01:00
6aed4360e5 Translated using Weblate (Swedish)
Currently translated at 97.9% (10305 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:04 +01:00
d1b9899905 Translated using Weblate (Swedish)
Currently translated at 97.7% (10285 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:04 +01:00
5391f29008 Translated using Weblate (Swedish)
Currently translated at 97.4% (10259 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-25 23:22:04 +01:00
ec66ac0d2d Translated using Weblate (Swedish)
Currently translated at 97.4% (10259 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:04 +01:00
7117291513 Translated using Weblate (Swedish)
Currently translated at 97.2% (10235 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-25 23:22:04 +01:00
ec11cf12fe Translated using Weblate (Swedish)
Currently translated at 97.2% (10235 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:04 +01:00
86189ac148 Translated using Weblate (Swedish)
Currently translated at 97.1% (10224 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-25 23:22:04 +01:00
68cfeab9ea Translated using Weblate (Swedish)
Currently translated at 97.1% (10224 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:04 +01:00
03b4129b25 Translated using Weblate (Georgian)
Currently translated at 4.3% (459 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-25 23:22:04 +01:00
1d040e0315 Translated using Weblate (French)
Currently translated at 95.9% (10098 of 10526 strings)

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

Signed-off-by: Léane GRASSER <leane.grasser@proton.me>
2024-11-25 23:22:03 +01:00
fe730c0861 Translated using Weblate (Swedish)
Currently translated at 96.9% (10205 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:03 +01:00
806884cd58 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 95.7% (10074 of 10526 strings)

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

Co-authored-by: jianqing yan <yanjianqing@kylinos.cn>
Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
2024-11-25 23:22:03 +01:00
ab5f29ab46 Translated using Weblate (Swedish)
Currently translated at 96.8% (10199 of 10526 strings)

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

Co-authored-by: Weblate <noreply-mt-weblate@weblate.org>
Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-25 23:22:03 +01:00
4268bdc0d6 Translated using Weblate (Swedish)
Currently translated at 96.8% (10199 of 10526 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-25 23:22:03 +01:00
e9b8be23f7 qemuxmlconftest: Add test cases for the <dataStore> feature
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
4801729abc qemuxmlactivetest: Add tests for <dataStore>
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
4281362a96 tests: virstoragetest: Add tests for detection of qcow2 'data_file' feature
Add two test images showing the use of 'data_file' and 'data_file_raw'
(although the latter is not detected by libvirt) so that we can see that
the qcow2 metadata parser and backing chain populators work correctly.

The example files were created by:

 qemu-img create  -f qcow2 -o data_file=raw,data_file_raw=true,preallocation=off datafile.qcow2 1k
 qemu-img create  -f qcow2 -o data_file=rawpreallocation=off -F qcow2 -b datafile.qcow2 qcow2datafile-datafile.qcow2

Note that 'data_file_raw' is mutually exclusive with backing images.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
59b1408860 qemu: block: Add support for 'data-file' feature of qcow2
Add the block infrastructure for detecting and landling the data file
for images and starting qemu with the configuration.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
cb5371a8bd qemu: factor out qemuDomainPrepareStorageSource()
This refactoring will simplify next changes.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
9ba2bef816 qemu: put data-file path to VM's cgroup and namespace
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
702f8b5a77 security: apparmor: handle qcow2 data-file
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
8fcc6c8025 security: selinux: handle qcow2 data-file on image label set/restore
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
724a4c6dc4 security: DAC: handle qcow2 data-file on image label set/restore
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
0a3d177d9b storage file: fill in src->dataFileStore during file probe
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
63481eca80 storage file: add qcow2 data-file path parsing from header
In qcow2 header data file is represented by incompitible feature bit
and its path is saved to header extension table.
Thus, we implement here the logic similar to backing file probing.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
8799818036 storage file: add getDataFile function to FileTypeInfo
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:18 +01:00
b3171cf8da conf: implement XML parsing/formating for <dataStore> element of a storage <source>
Introduce parsing and formatting of <dataStore> element. The <dataStore
represents a different storage volume meant for storing the actual
blocks of guest-visible data. The original disk source is then just a
metadata storage for any advanced features.

This currently works only for 'qcow2' images.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 22:31:13 +01:00
28d88e9fc3 Add schema and documentation for 'dataStore' sub-element of disk source
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 20:28:15 +01:00
64627d5645 conf: add data-file feature and related fields to virStorageSource
The 'data-file' is a qcow2 feature which allows storing the actual data
outside of the qcow2 image.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-25 20:28:15 +01:00
2cb6cb05d4 docs: formatsecret: Fix an example of secret-set-value
The previous example will cause the error like:
error: Options --file and --base64 are mutually exclusive

Reported-by: Yanqiu Zhang <yanqzhan@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-25 10:38:40 +01:00
c54df8ed9e QEMU: allow to hot plugging virtio-serial-pci device
Virtio-serial-pci device is hot pluggable, loosen the restriction
and allow user to hot plug it.

Signed-off-by: shenjiatong <yshxxsjt715@163.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-21 16:24:27 +01:00
a86b429046 tests: qemucapabilitiesdata: Update 'x86_64' capabilities for the qemu-9.2 dev cycle
Update to v9.2.0-rc0-42-g3428a3894c

Apart from the changes below there are changes to CPU features reported
by qemu, some of which were reported multiple times previously which no
longer happens.

Notable changes:
 - 'reconnect-ms' added and 'reconnect' deprecated for 'stream' variant
   of 'netdev-add' backend
 - 'BLOCK_IO_ERROR' event removed 'qom-path' parameter
 - 'GraniteRapids-v2-x86_64-cpu' added
 - 'sm3' hashing algorithm for 'luks' added
 - 'acpi-generic-port' object added
 - deprecated field 'loaded' of 'secret'/'secret_keyring'/'tls-creds*'
   removed
 - 'sh4eb' target added
 - 'query-migrationthreads' command deprecated
 - 'busnr' and 'x-pcie-ext-tag' attributes added for
    'ICH9-LPC'/'PIIX4_PM'/'VGA'/'mch'/'pcie-root-port'/'qxl'/'vfio-pci'/
    'virtio-*'/'vmware-svga'
    devices
 - 'stale-tm' property added for 'intel-iommu' device

Experimental features:
 - 'device-sync-config' command added

As the addition of the 'reconnect-ms' property of the 'stream' network
backend happened along with deprecation of the 'reconnect' field which
was already in use by libvirt this patch also captures the change to the
new format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-19 13:06:02 +01:00
e4d058866e qemu: passt: Use 'reconnect-ms' instead of 'reconnect' with new qemus
The 'reconnect' field of 'stream' network backend type is about to be
deprecated so libvirt will need to start using 'reconnect-ms'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-19 13:06:02 +01:00
9e273db203 qemu: capabilities: Introduce QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS
The 'stream' type for 'netdev-add' recently added support for
'reconnect-ms' which supersedes 'reconnect' (now deprecated). Add a
capability which will allow us to switch to the new property.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-19 13:06:02 +01:00
25f1fc8568 qemu: capabilities: Restore grouping in 'virQEMUCapsQMPSchemaQueries'
Historically the QMP schema lookup queries were grouped by the first
component of the query (which was also sorted), but not fully sorted.
This deteriorated over time. Re-group the query strings now that some
were added at the bottom.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-19 13:06:02 +01:00
74ef4888ff qemuDomainDiskChangeSupported: Add missing iothreads check
GSList of iothreads is not allowed to be changed while the
virtual machine is running.

Resolves: https://issues.redhat.com/browse/RHEL-23607
Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 13:04:58 +01:00
5872ab7fe9 manpage: virsh: Add warning about 'migrate' with '--persistent' together with '--xml'
When a VM is being migrated to a destination host it can be made
persistent on the destination by using '--persistent'. That may not
work as intended if '--xml' is used as well as that allows overriding
certain aspects of the VM xml, but does not involve the persistent
definition. In most cases users will need to supply also
'--persistent-xml' with the same set of modification.

Modify the man page to clarify the above so that users don't end up with
broken VM after migrating and restarting it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 13:02:11 +01:00
055379df23 API: migration: Warn about use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DEST_XML
When a VM is being migrated to a destination host it can be made
persistent on the destination by using VIR_MIGRATE_PERSIST_DEST. That
may not work as intended if VIR_MIGRATE_PARAM_DEST_XML or the 'xmlin'
parameter is used as that allows overriding certain aspects of the VM
xml, but does not involve the persistent definition.
In most cases users will need to supply also VIR_MIGRATE_PARAM_PERSIST_XML
with the same set of modification.

Modify the man page to clarify the above so that users don't end up with
broken VM after migrating and restarting it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 13:02:11 +01:00
6f237f4642 Revert "qemu: migration: Improve handling of VIR_MIGRATE_PARAM_DEST_XML with VIR_MIGRATE_PERSIST_DEST"
The original intention was to improve the behaviour of the
VIR_MIGRATE_PERSIST_DEST flag which makes the VM persistent after
migration on the destination when used with VIR_MIGRATE_PARAM_DEST_XML.

While it worked as intended with p2p migration where the migration is
driven from the virtqemud instance on the source of the migration, which
can distinguish between the user-provided input XML and the one fetched
from the source of the migration, it's not easily possible to achieve
the same behaviour with normal migration driven from the client library.

The approach also still had corner cases (originally deemed worth
changing) such as if the persistent definition was modified it would be
overwritten.

As there is no clear fix which would improve both styles of migrations
with no corner cases revert the change.

Upcoming commits will modify the documentation to add warning about the
use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DEST_XML/xmlin
without using VIR_MIGRATE_PARAM_PERSIST_XML instead of a code fix.

This reverts commit 6a38559092.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 13:02:11 +01:00
6d9bf5b63c NEWS: Add the news for CVE-2024-4418
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 11:24:40 +01:00
5ca7daf397 NEWS: Add the news for CVE-2024-2494
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 11:24:38 +01:00
eb2775e1d6 NEWS: cpu_map: Add the EPYC-Genoa cpu mode
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 11:24:36 +01:00
ef57b7431f NEWS: qemu: Add support for hyperv enlightenments features
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-19 11:24:32 +01:00
da2132d124 docs: Recommend virtio instead of virtio-(non-)transitional
When virtio-(non-)transitional models were introduced, the
documentation was updated to include them; at the same time,
language was introduced indicating that using the existing
virtio model is no longer recommended.

This is unnecessarily harsh, and has resulted in people
incorrectly believing (through no fault of their own) that the
virtio model has been deprecated.

In reality, it's perfectly fine to use the virtio model as the
stress-free option that, while often not producing the ideal
PCI topology, will generally get the job done and work reliably
across libvirt versions and machine types.

Tweak the documentation so that it hopefully carries the
desired message across.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-11-19 10:16:59 +01:00
7b73e681a2 vmx: Get the VMware boolean uefi.secureBoot.enabled
Some VMware guests have a boolean uefi.secureBoot.enabled.  If found,
and it's set to "TRUE", and if it's a UEFI guest, then add this clause
into the domain XML:

  <os firmware='efi'>
    <firmware>
      <feature enabled='yes' name='enrolled-keys'/>
      <feature enabled='yes' name='secure-boot'/>
    </firmware>
  </os>

This approximates the meaning of this VMware flag.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Fixes: https://issues.redhat.com/browse/RHEL-67836
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 15:29:43 +01:00
ec8be9aceb qemu: Avoid use of '-loadvm' commandline argument for internal snapshot reversion
The '-loadvm' commandline parameter has exactly the same semantics as
the HMP 'loadvm' command. This includes the selection of which block
device is considered to contain the 'vmstate' section.

Since libvirt recently switched to the new QMP commands which allow a
free selection of where the 'vmstate' is placed, snapshot reversion will
no longer work if libvirt's algorithm disagrees with qemu's. This is the
case when the VM has UEFI NVRAM image, in qcow2 format, present.

To solve this we'll use the QMP counterpart 'snapshot-load' to load the
snapshot instead of using '-loadvm'. We'll do this before resuming
processors after startup of qemu and thus the behaviour is identical to
what we had before.

The logic for selecting the images now checks both the snapshot metadata
and the VM definition. In case images not covered by the snapshot
definition do have the snapshot it's included in the reversion, but it's
fatal if the snapshot is not present in a disk covered in snapshot
metadata.

The vmstate is selected based on where it's present as libvirt doesn't
store this information.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
2da32ff468 qemu: monitor: Extract vmstate presence for internal snapshots in qemuBlockGetNamedNodeData
Refactor the parts of qemuBlockGetNamedNodeData which fetch the names of
internal snapshots present in the on-disk state of QCOW2 images to also
extract the presence of the 'vmstate' section.

This requires conversion of the snapshot list to a hash table as we
always know the name of the snapshot that we're looking for, and the
hash table allows also storing of additional data which we'll use to
store the presence of the 'vmstate'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
6902e77c01 qemu: Add enum entries for 'snapshot-load' qemu job
The internal snapshot code will use the 'snapshot-load' command so we
need to add the corresponding job type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
2ed93e1a4b qemu: monitor: Add monitor infrastructure for 'snapshot-load' QMP command
Libvirt currently loads snapshots via the '-loadvm' commandline option
but that uses the same logic as the 'loadvm' text monitor command used
to pick the disk image with the 'vmstate' section. Since libvirt now
implements our own logic to pick the 'vmstate' device it can happen that
we pick a different than qemu and thus qemu would fail to load the
snapshot. This happens currently on VMs with UEFI firmware with NVRAM
image in qcow2 format.

To fix this libvirt will need to use the 'snapshot-load' QMP command
instead of relying on '-savevm'.

Implement the monitor bits for 'snapshot-load'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
c82dd60b2e qemuSnapshotForEachQcow2: Handle also NVRAM image for internal snapshots
The live VM snapshot code already does handle the NVRAM image when it's
in use, so we should also handle it when modifying/creating the
snapshots via qemu-img when inactive.

Add the handling to qemuSnapshotForEachQcow2 which is used for all
inactive operations.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
5ca0552d31 qemuSnapshotForEachQcow2: Refactor
Refactor the function to avoid recursive call to rollback and simplify
calling parameters.

To achieve that most of the fatal checks are extracted into a dedicated
loop that runs before modifying the disk state thus removing the need to
rollback altoghether. Since rollback is still necessary when creation of
the snapshot fails half-way through the rollback is extracted to handle
only that scenario.

Additionally callers would only pass the old 'try_all' argument as true
on all non-creation ("-c") modes. This means that we can infer it from
the operation instead of passing it as an extra argument.

This refactor will also make it much simpler to implement handling of
the NVRAM pflash backing file (in case it's qcow2) for internal
snapshots.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
5dfd0a0ce8 qemu: Move 'qemuDomainSnapshotForEachQcow2(Raw)' to qemu_snapshot.c
The functions are exclusively used in the snapshot module. Move and
rename them:

  qemuDomainSnapshotForEachQcow2Raw -> qemuSnapshotForEachQcow2Internal
  qemuDomainSnapshotForEachQcow2 -> qemuSnapshotForEachQcow2

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
60838fee08 qemuDomainSnapshotForEachQcow2Raw: Remove 'driver' argument
Now that it's unused except for the recursive call it can be dropped
from all of the call tree.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
20ffcb912f qemu: Don't store path to qemu img
The 'virCommand' helpers already look up the full path to the binary in
PATH if it's not specified. This means that the qemu driver doesn't have
to lookup and store the path to 'qemu-img' in the conf object but rather
can be cleaned up to use this new infrastructure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 13:51:13 +01:00
25fdb57d8e ch: Enable callbacks for ch domain events
Enable callbacks for define, undefine, started, booted, stopped,
destroyed events of ch guests.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 10:58:38 +01:00
ed1cef6264 ch: enable virNodeGetMemoryStats API
Enable virNodeGetMemoryStats API to return the stats of host memory.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 10:45:34 +01:00
91d6a0a1a9 Translated using Weblate (Swedish)
Currently translated at 96.5% (10165 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-18 08:59:51 +01:00
cf37b66835 Translated using Weblate (Swedish)
Currently translated at 96.3% (10145 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-18 08:59:51 +01:00
af3d7fa7df Translated using Weblate (Swedish)
Currently translated at 96.1% (10118 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-18 08:59:51 +01:00
4454af822e Translated using Weblate (Swedish)
Currently translated at 95.9% (10098 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-18 08:59:51 +01:00
25f72a3b72 Translated using Weblate (Swedish)
Currently translated at 95.8% (10087 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-18 08:59:51 +01:00
221b2fe856 Translated using Weblate (Swedish)
Currently translated at 95.8% (10087 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-18 08:59:51 +01:00
a0554d6922 Translated using Weblate (Czech)
Currently translated at 96.9% (10206 of 10526 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>
2024-11-18 08:59:51 +01:00
d79542eec6 qemu: Read back the profile name after creation of a TPM instance
Get the JSON profile that the swtpm instance was created with from the
output of 'swtpm socket --tpm2 --print-info 0x20 --tpmstate ...'. Get the
name of the profile from the JSON and set it in the current and persistent
emulator descriptions as 'name' attribute and have the persistent
description stored with this update. The user should avoid setting this
'name' attribute since it is meant to be read-only. The following is
an example of how the XML could look like:

  <profile source='local:restricted' name='custom:restricted'/>

If the user provided no profile node, and therefore swtpm_setup picked its
default profile, the XML may now shows the 'name' attribute with the name
of the profile. This makes the 'source' attribute now optional.

  <profile name='default-v1'/>

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:49 +01:00
957bda01c8 qemu: Move adding --tpmstate to swtpm command line into own function
Factor-out code related to adding the --tpmstate option to the swtpm
command line into its own function.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:44 +01:00
fc9a333f37 qemu: Move adding of keys to swtpm command line into own function
Factor-out code related to adding key to the swtpm command line into its
own function.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:41 +01:00
cd37721d19 qemu: Extend swtpm_setup command line to set a profile by its name
Run swtpm_setup with the --profile-name option if the user provided the
name of a profile. swtpm_setup will try to load the profile from
directories with local profiles and distro profiles and if no profile
by this name with appended '.json' suffix could be found there, it will
fall back to try to use an internal profile with the given name.

Also set the --profile-remove-disabled option if the user provided a value
in the remove_disabled attribute in the profile XML node.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:38 +01:00
526f08da62 docs: Add documentation for the TPM backend profile node
Add documentation for the TPM backend profile node and point the reader to
further documentation about TPM profiles available in the swtpm man page.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:35 +01:00
90c40d3b9c conf: Add support for profile parameter on TPM emulator in domain XML
Extend the parser and XML builder with support for the profile parameter
and its remove_disabled attribute.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:33 +01:00
498b5b7440 schema: Extend schema for TPM emulator profile node
Extend the schema for the TPM emulator profile node. Require that the
profile the user provides is described in a 'source' attribute. An optional
remove_disabled attribute is also supported for swtpm to automatically
remove algorithms from the 'custom' profile if they are disabled by FIPS
mode on the host.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:30 +01:00
15ba6edabd conf: Define enum virDomainTPMProfileRemoveDisabled
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:27 +01:00
1079532d74 util: Add parsing support for swtpm_setup's cmdarg-profile capability
Add support for parsing swtpm_setup 'cmdarg-profile' capability
(since v0.10).

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:24 +01:00
279b14cb81 qemu: Pass virQEMUDriverConfig rather than some of its fields
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:22 +01:00
8bba15bdc1 conf: Move TPM emulator parameters into own struct
To avoid passing TPM emulator parameters around individually, move them
into a structure and pass around the structure.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-18 08:46:18 +01:00
b0aa9d31f2 qemu: Avoid useless tmp variable in qemuCanonicalizeMachine
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-15 15:22:23 +01:00
5904676d2f ch: explicitly set INFILESIZE to 0
While sending API requests that don't need any body, explicitly set
CURLOPT_INFILESIZE to 0.

Without this option, curl sends a chunked request with `Expect: 100-continue`
header. The client, in this case curl, expects a response from the server,
ch in this case, to respond within a timeout period.

If guest definition has a PCI passthrough device configuration,
cloud-hypervisor process cannot respond within above mentioned timeout.
Even if cloud-hypervisor responds after the timeout, curl cannot read
the response. Because of this, virsh request to create a guest, hangs. This
only happens while using "mshv" hypervisor.

By setting CURLOPT_INFILESIZE to O, curl drops the Expect header and
sychronously waits for server to respond.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:41 +01:00
cec5bb372a ch: reattach PCI devices to host while stopping guest
Reattach PCI devices to host, while stopping ch guest.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:38 +01:00
1e8cc91f9d ch: allow hostdev in domain definitions
Allow hostdev configurations in ch guest definitions.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:35 +01:00
c6dbc6042d ch: prepare host for PCI passthrough
Prepare host to passthrough PCI devices for ch guests.

Co-authored-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:31 +01:00
acfe2e7a50 ch: prepare domain definition for pci passthrough
Check if the domain definition is valid for PCI passthrough and update
it if necessary.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:27 +01:00
5d4f9e1bdd ch: add host device manager to driver
Co-authored-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:24 +01:00
89ef0c0f2b hypervisor: move HostdevHostSupportsPassthroughVFIO
Move HostdevHostSupportsPassthroughVFIO method to hypervisor to be
shared between qemu and ch drivers.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:22 +01:00
b05f6134c9 hypervisor: move HostdevNeedsVFIO to hypervisor
Move HostdevNeedsVFIO method to hypervisor to be reused between qemu
and ch drivers.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 13:15:12 +01:00
0dad1ec009 kbase: virtiofs: Clarify migration support statement
virtiofs 1.11 contains support for migration so update the 'Note' which
states that migration is not supported.

Additionally mention that VM snapshots don't save state of the files
shared via virtiofs so reverting is not a good idea.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-15 10:34:29 +01:00
f35f817ebf qemu: process: Introduce setup of block-device backed NVRAM
In case when a management application will require to store the nvram in
a block device instead of a file libvirt needs to be able to set up the
block device.

This patch introduces support for setting up the block device by using
'qemu-img convert' to produce a qcow2-formatted block device.

The use of 'qcow2' is made mandatory as the UEFI firmware requires that
the NVRAM image has the exact expected size, which is almost impossible
with block devices. 'qcow2' also allows libvirt to detect wheher the
block device is formatted allowing file-like semantics.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:05 +01:00
fce4319f58 qemu: process: Extract setup of file-backed nvram from template
The setup of nvram will later be extended to also support block-device
backed nvram, so extract the file-backed nvram setup steps from
'qemuPrepareNVRAM' into 'qemuPrepareNVRAMFile'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:05 +01:00
32228ecb02 conf: Remove nonsensical requirement of nvram format matching firmware format
The nvram image can have any supported format and there's no technical
requirement of them having the same format. In fact the actual nvram
image doesn't necessarily need to have the same format as the template
if the user is willing to format it themselves (as libvirt is not going
to convert it).

Remove the nonsensical check and adjust tests. The test case required
swapping around the format in order to work properly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
d3016e47be qemuFirmwareMatchDomain: Don't base firmware selection on nvram image format
Basing the selection on the format of the actual NVRAM image makes no
sense as user may format the image themselves.

Additionally it doesn't make much sense to even limit the firmware
selection based on the nvram template itself. As format of the template
is given and firmware images don't really provide any choice.

Remove the limitation so that autoselection can pick a template
regardless of the selected format or template format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
2aa644a2fc qemuPrepareNVRAM: Refuse conversion of NVRAM backing file format
Refuse situations where the user configures a different format for a
file-backed nvram than the template file has.

At this point it's still required that the NVRAM and firmware share
format, but that is going to be relaxed, thus we need to refuse
configurations that the code can't handle.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
6540cc08b1 conf: Always format firmware image format
The code historically skipped the 'format' field for 'raw' images as we
didn't output it when no format support was present. Stop misleading and
output the format also for 'raw' images.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
49ce561e3f conf: domain: Output 'format' attribute of '<nvram>' also for' raw images
As the 'format' field is meant to carry the format of the nvram image we
should output it even when the image is 'raw'.

Currently this is not a problem but later patches will allow mismatch
between the nvram format and loader format (as nothing really
technically requires them to be the same and this then could become
problem).

Modify the condition and update tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
366907e520 firmware: Add 'templateFormat' XML attribute and plumb it in
Currently the qemu firmware code weirdly depends on the 'format' field
of the nvram image itself to do the auto-selection process as well as
then uses it to declare the actual type to qemu.

As it's not technically required that the template and the on disk image
share the type introduce a 'templateFormat' field which will split off
from the shared purpose of the type and will be used for the selection
and instantiation process, while 'format' will be left for the actual
type of the on disk image.

This patch introduces the field, adds XML infrastructure as well as
plumbs it to the firmware bits.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
f90567f3a8 docs: formatdomain: Clarify that NVRAM template is also being autoselected
The NVRAM template file may be autoselected same as the loader/firmware
image. Add a hint that this can occur and also that it doesn't
necessarily need to be from the 'qemu.conf' configured files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
a448d4a18a conf: domain: Clarify nvram/loader format logic
Restructure the code to assign first (as this is simpler to refactor in
the future) and avoid mixing implicit value checks with explicit ones by
checking for _NONE.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:04 +01:00
d57630c282 qemu: Install backing store terminators for 'pflash' blockdevs
The qemu driver does support qcow2 images for the firmware and nvram
pflash devices, but we do not do the full backing chain setup for them
as we don't expect that those images would actually have a backing
store. We don't tell that to qemu though which theoretically can lead to
qemu probing the backing store from the image itself. We don't want that
for now.

Deny qemu probing the backing store by installing a "terminator" empty
virStorageSource as 'backingStore' for pflash and nvram.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:03 +01:00
6a8bcd1110 qemuFirmwareEnsureNVRAM: Don't try to setup non-local nvram
'qemuFirmwareEnsureNVRAM' which fills the NVRAM configuration bits which
may be missing was basing its decision to do something based on whether
the 'path' field was set. This is insufficient if remote storage is to
be considered.

Use 'virStorageSourceIsEmpty()' instead as that properly considers
remote filesystems and explain why the source is unref'd when the
function decides to rewrite the config.

The 'firmware-auto-efi-format-nvram-qcow2-network-nbd' is modified to
omit filling the 'path' field, which without this fix would result in
the nvram to be reset to a local file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:03 +01:00
273157dd9f qemuPrepareNVRAM: Don't attempt to create NVRAM on block device
'virFileRewrite()' which is used to setup the NVRAM image if it doesn't
exist or when it is requested by the user forcibly replaces the
destination file by the file it creates. For block devices this
overwrites the device node file or the symlink pointing to the device
node by a regular file instead of formatting it.

As this not only makes the VM fail to start but also breaks user's /dev/
filesystem forbid it for now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-15 09:42:03 +01:00
fde04774db syntax-check: Suggest ways to fix internal references
The rule catches incorrect attempts to use internal references,
but doesn't guide the developer hitting a failure towards the
not exactly obvious acceptable alternatives.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-14 11:02:42 +01:00
b3a4b049c4 docs: Document authselect to enable the NSS module
When using recent Fedora and RHEL versions, the manual setup that
is otherwise necessary to enable the module can be replaced with
executing a single command.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-13 22:42:19 +01:00
3224b25607 docs: Rework documentation for the NSS module
The page contains some confusing information, especially around
limitations that supposedly only affect one of the two variants,
and goes into what is arguably an unnecessary amount of detail
when it comes to its inner workings.

We can make the page a lot shorter and snappier without
affecting its usefulness, so let's do just that.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-13 22:42:15 +01:00
24580d13d1 qemu: Move PostParse functions out of qemu_domain.c
Problem with qemu_domain.c is that it's constantly growing. But
there are few options for improvement. For instance, validation
functions were moved out and now live in qemu_validate.c. We can
do the same for PostParse functions, though since PostParse may
modify domain definition, some functions need to be exported from
qemu_domain.c.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-11-13 13:13:54 +01:00
bf2af76ec2 qemu_hotplug: Do not report unknown error when hot-unplugging non-existing device
When qemuDomainDeleteDevice() gets "DeviceNotFound" error it is a
special case as we're trying to remove a device which does not exists
any more.  Such occasion is indicated by the return value -2.

Callers of the aforementioned function ought to base their behaviour on
the return value.  However not all callers take as much care for the
return value as one could realistically anticipate.

Follow the usual direction of removing possible backend object (in case
of character devices), remove the device from its XML without waiting
for the device removal from QEMU (since it is already not there) and
basically follow the same algorithm as there is when the device was
removed, skipping over the wait for the device removal.

The overall return value also needs to be adjusted since
qemuDomainDeleteDevice() does not set an error on the -2 return value
and would otherwise trigger an unknown error being reported to the user
or management application.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-12 15:41:34 +01:00
aeebb30ba2 Drop unused function declarations
When moving function and/or renaming them sometimes corresponding
change to corresponding header file is not done. This leaves us
with functions that are declared in header files, but nowhere
implemented. Drop such declarations.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-12 15:35:53 +01:00
6c50d11276 virnetserverclient.h: Fix typo in comment of virNetServerClientPrivPreExecRestart()
The function the comment is referring to is
virNetServerClientPrivNew() not virNetServerClintPrivNew(). The
latter doesn't even exist.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-12 15:35:53 +01:00
a053f57ebc docs: Add Sys::Async::Virt to apps.html
As requested on the libvirt users list I am adding this mention to the
apps page.

Reported-by: Erik Huelsmann <ehuels@gmail.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-12 12:07:05 +01:00
dbe4bdbe3a Translated using Weblate (Swedish)
Currently translated at 95.7% (10079 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-12 11:00:29 +01:00
17d03614de Translated using Weblate (Swedish)
Currently translated at 95.7% (10078 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-12 11:00:29 +01:00
4d19cbaa0d Translated using Weblate (Swedish)
Currently translated at 95.7% (10078 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-12 11:00:29 +01:00
e13d1f0c8c Translated using Weblate (Swedish)
Currently translated at 95.7% (10077 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-12 11:00:29 +01:00
abef180b69 Translated using Weblate (Swedish)
Currently translated at 95.7% (10077 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-12 11:00:29 +01:00
75ac9929bb Translated using Weblate (Swedish)
Currently translated at 95.7% (10076 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-12 11:00:29 +01:00
d359855df7 Translated using Weblate (Swedish)
Currently translated at 95.7% (10076 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-12 11:00:29 +01:00
1287dc21a6 Translated using Weblate (Swedish)
Currently translated at 95.5% (10061 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-12 11:00:29 +01:00
e088f2107e Translated using Weblate (Swedish)
Currently translated at 95.5% (10061 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-12 11:00:29 +01:00
309c5cd4a3 ci: Update with newer lcitool
This switches to newer freebsd 14.1 and implements the new RUN_PIPELINE
behaviour introduced by Daniel.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-12 11:00:26 +01:00
d88ebd4374 ch_monitor: Report OS error when removing socket fails
When removing a socket in virCHMonitorClose() fails, a warning is
printed. But it doesn't contain errno nor g_strerror() which may
shed more light into why removing of the socket failed.

Oh, and since virCHMonitorClose() is registered as autoptr
cleanup for virCHMonitor() it may happen that virCHMonitorClose()
is called with mon->socketpath allocated but file not existing
yet (see virCHMonitorNew()). Thus ignore ENOENT and do not print
warning in that case - the file doesn't exist anyways.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-12 09:11:47 +01:00
f1f4cbb50a ch_monitor: Avoid possible double free in virCHMonitorClose()
The virCHMonitorClose() is meant to be called when monitor to
cloud-hypervisor process closes. It removes the socket and frees
string containing path to the socket.

In general, there is a problem with the following pattern:

  if (var) {
      do_something();
      g_free(var);
  }

because if the pattern executes twice the variable is freed
twice. That's why we have VIR_FREE() macro. Well, replace plain
g_free() with g_clear_pointer(). Mind you, this is NOT a
destructor where clearing pointers is needless.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-12 09:11:36 +01:00
4be361a385 test_driver: provide basic disk hotunplug support
Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-12 09:10:44 +01:00
c530a96151 test_driver: provide basic disk hotplug support
Add some basic plumbing, based on the qemu driver.

Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-12 09:10:44 +01:00
c7611a6b13 Translated using Weblate (Swedish)
Currently translated at 95.5% (10059 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:55 +01:00
756257497d Translated using Weblate (Swedish)
Currently translated at 95.3% (10039 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:55 +01:00
5ea60597b0 Translated using Weblate (Swedish)
Currently translated at 95.2% (10024 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-11 12:49:55 +01:00
ff836adb4b Translated using Weblate (Swedish)
Currently translated at 95.2% (10024 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:55 +01:00
5fbf054360 Translated using Weblate (Swedish)
Currently translated at 95.1% (10017 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:55 +01:00
948c9cf7a1 Translated using Weblate (Swedish)
Currently translated at 94.9% (9997 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:55 +01:00
1872a09f14 Translated using Weblate (Swedish)
Currently translated at 94.8% (9984 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-11 12:49:55 +01:00
340b5dad78 Translated using Weblate (Swedish)
Currently translated at 94.8% (9984 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:54 +01:00
863df80534 Translated using Weblate (Swedish)
Currently translated at 94.7% (9976 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-11 12:49:54 +01:00
d4c2dc239a Translated using Weblate (Swedish)
Currently translated at 94.7% (9976 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:54 +01:00
6721985db7 Translated using Weblate (Swedish)
Currently translated at 94.6% (9967 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-11 12:49:54 +01:00
b86dd42113 Translated using Weblate (Swedish)
Currently translated at 94.6% (9967 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-11 12:49:54 +01:00
27ae5e602a qemu_hotplug: Report better error message for platform serial devices
This should be better than the current for both hotplug:

    error: internal error: Invalid target model for serial device

and hot-unplug:

    error: An error occurred, but the cause is unknown

which should not be reached at all.

Resolves: https://issues.redhat.com/browse/RHEL-66222
Resolves: https://issues.redhat.com/browse/RHEL-66223
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 12:48:42 +01:00
52c2e3e0a7 qemu: Expose qemuChrIsPlatformDevice outside from qemu_command
Then it can be used from qemu_hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 12:48:42 +01:00
9dc2226e68 NEWS: qemu: add multi boot device support on s390x
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 12:20:03 +01:00
bf0308b2d4 qemu: command: add multi boot device support on s390x
If QEMU supports multi boot device make use of it instead of using the
single boot device machine parameter.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 10:15:06 +01:00
48fd995f3b tests: add capabilities for QEMU 9.2.0 on s390x
Let us introduce the xml and reply files for QEMU 9.2.0 on s390x.

A QEMU at commit v9.1.0-1348-g11b8920ed2 was used to generate this data.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 10:15:06 +01:00
3ccf692e08 qemu: capabilities: Add QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM
Add capability QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM to detect multi boot
device support in QEMU by checking the virtio-blk-ccw device property
existence of loadparm.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-11 10:15:06 +01:00
a3b8753db9 virnetdevopenvswitch: Warn on unsupported QoS settings
Let me preface this with stating the obvious: documentation on
QoS in OVS is very sparse. This is all based on my observation
and OVS codebase analysis.

For the following QoS setting:

  <bandwidth>
    <inbound average="512" peak="1024" burst="32"/>
  </bandwidth>

the following QoS setting is generated into OVS (NB, our XML
values are in KiB/s, OVS has them in bits/s):

  # ovs-vsctl list qos
  _uuid               : a087226b-2da6-4575-ad4c-bf570cb812a9
  external_ids        : {ifname=vnet1, vm-id="7714e6b5-4885-4140-bc59-2f77cc99b3b5"}
  other_config        : {burst="262144", max-rate="8192000", min-rate="4096000"}
  queues              : {0=655bf3a7-e530-4516-9caf-ec9555dfbd4c}
  type                : linux-htb

from which the following topology is generated:

  # for i in qdisc class; do tc -s -d -g $i show dev vnet1; done
  qdisc htb 1: root refcnt 2 r2q 10 default 0x1 direct_packets_stat 0 ver 3.17 direct_qlen 1000
   Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
   backlog 0b 0p requeues 0

  +---(1:fffe) htb rate 8192Kbit ceil 8192Kbit linklayer ethernet burst 1499b/1mpu 60b cburst 1499b/1mpu 60b level 7
       |       Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
       |       backlog 0b 0p requeues 0
       |
       +---(1:1) htb prio 0 quantum 51200 rate 4096Kbit ceil 8192Kbit linklayer ethernet burst 32Kb/1mpu 60b cburst 32Kb/1mpu 60b level 0
                 Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
                 backlog 0b 0p requeues 0

Long story short, the default class (1:) for an OVS interface has
average and peak set exactly as requested. But since it's nested
under another class (1:fffe), it can borrow unused bandwidth. And
the parent is set to have rate = ceil = peak from our XML. From
[1]: htb_tc_install() calls htb_parse_qdisc_details__() which
sets: 'hc->min_rate = hc->max_rate;' and then calls
htb_setup_class_(..., tc_make_handle(1, 0xfffe), tc_make_handle(1, 0), &hc);
to set up the top parent class.

In other words - the interface is set up to so that it can always
consume 'peak' bandwidth and there is no way for us to set it up
differently. It's too late to deny setting 'peak' different to
'average' at XML validation phase so do the next best thing -
throw a warning, just like we do in case <bandwidth/> is set for
an unsupported <interface/> type.

1: https://github.com/openvswitch/ovs/blob/main/lib/netdev-linux.c#L5039
Resolves: https://issues.redhat.com/browse/RHEL-53963
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-11-08 10:41:02 +01:00
9132b486a3 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 95.5% (10058 of 10526 strings)

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

Signed-off-by: zk dc <zkdc2345@qq.com>
2024-11-08 04:57:53 +01:00
844d1036eb qemu_domain: Automagically add IOMMU if needed
If a Q35 domain has huge number of vCPUS (over 255, currently), then
it needs IOMMU with Extended Interrupt Mode enabled (see check in
qemuValidateDomainVCpuTopology()).

Well, we already add some devices and to other tricks when
parsing new domain XML. Might as well add IOMMU device if above
condition is met.

Resolves: https://issues.redhat.com/browse/RHEL-65844
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-07 10:46:33 +01:00
b15047ff26 qemu: Turn EIM IOMMU on automagically
If a Q35 domain has huge number of vCPUS (over 255, currently), then
it needs IOMMU with Extended Interrupt Mode enabled (see check in
qemuValidateDomainVCpuTopology()).

Well, we already add some devices and to other tricks when
parsing new domain XML. Might as well turn the EIM on for IOMMU
device.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-07 10:46:33 +01:00
a9797d7c43 libvirt_private.syms: Export virDomainIOMMUDefNew()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-07 10:46:32 +01:00
e393d688a3 Translated using Weblate (Swedish)
Currently translated at 94.5% (9957 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-07 02:28:57 +01:00
e45313c031 ch: check return value of virJSONValueArrayAppend
It only errors out when presented with a non-array, but we do check
it everywhere else.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-06 17:12:32 +01:00
da66bf53b0 util: json: check return value of virJSONValueFromJsonC
In virJSONValueFromJsonC, the return value of virJSONValueFromJsonC
was not checked in one case.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-06 17:12:32 +01:00
13f40898ab qemu: chardev: avoid impossible overflow
In the rare case where int and long long are not the same size,
the multiplication of an int variable and an int constant might
overflow. Cast the constant to long long to avoid this.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: baa4edfb79
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-06 17:12:32 +01:00
2e64ca6ef2 Translated using Weblate (French)
Currently translated at 95.9% (10098 of 10526 strings)

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

Signed-off-by: Léane GRASSER <leane.grasser@proton.me>
2024-11-06 12:34:00 +01:00
736e386273 docs: fix since tag for TPM with custom path
The feature was pushed after the 10.9.0 release.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 579fd44612
2024-11-05 16:42:51 +01:00
806e266fa1 docs: formatdomain: fix XML snippets
Fix indentation, missing slashes for unpaired tags and missing angle
brackets.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2024-11-05 16:33:23 +01:00
bb5e26749f qemu: explicit swtpm state locking
With upcoming v0.10 swtpm (commit
aa483aeb6d),
file locking with "lock" option is now supported and reflected in
"tpmstate-opt-lock" capability.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
f1304cc566 qemu_tpm: handle file/block storage source
When swtpm reports "nvram-backend-dir", it can accepts a single file or
block device where TPM state will be stored. --tpmstate must be
backend-uri=file://<path>.

Teach the storage to use custom directory or file source location.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
a110042d0c schema: add TPM emulator <source type='dir' path='..'>
Learn to parse a directory for the TPM state.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
579fd44612 schema: add TPM emulator <source type='file' path='..'>
Learn to parse a file path for the TPM state.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
6d4eb07a55 tpm: rename 'storagepath' to 'source_path'
Mechanically replace existing 'storagepath' with 'source_path', as the
following patches introduce <source path='..'> configuration.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
cc0aab9395 util: check swtpm nvram-backend-{dir,file} capabilities
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-11-05 15:25:53 +01:00
78a9e7bf4a Translated using Weblate (Swedish)
Currently translated at 94.4% (9937 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-05 09:59:03 +01:00
ef8ea25a7c Translated using Weblate (Romanian)
Currently translated at 15.0% (1580 of 10526 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-11-05 09:59:03 +01:00
a52cd504b3 qemu: Report supported panic device models in domcapabilities
Domain capabilities include information about support for various
devices and models.

Panic devices are not included in the output which means that management
applications need to include the logic for choosing the right device
model or request a default model and try defining such a domain.

Add reporting of panic device models into the domain capabilities based
on the logic in qemuValidateDomainDefPanic() and also report whether
panic devices are supported based on whether at least one model is
supported.  That way consumers of the domain capability XML can
differentiate between libvirt not reporting the panic device models or
no model being supported.

Resolves: https://issues.redhat.com/browse/RHEL-65187
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-05 09:57:37 +01:00
5d9b886a4e spec: Fix attributes for some qemu dirs in %{_rundir}
The recent attempt to fix the attributes used wrong mode for some
directories used by the QEMU driver. Only dbus and swtpm directories use
770, all other directories are created with 755.

Fixes: 961fb8944d
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-04 16:39:41 +01:00
dec2f370ca Translated using Weblate (Swedish)
Currently translated at 94.2% (9917 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-04 14:45:48 +01:00
faf6edfa74 json: do not call json_tokener_free with NULL
Add an error message for the rare case if json_tokener_new
fails (allocation failure) and guard any use of json_tokener_free
where tok might be NULL (this was possible in libvirt-nss
when the json file could not be opened).

https://gitlab.com/libvirt/libvirt/-/issues/581

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Simon Pilkington
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2024-11-04 12:15:10 +01:00
23d78e1c58 Translated using Weblate (Swedish)
Currently translated at 94.0% (9897 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-03 15:32:22 +01:00
e081541b32 Translated using Weblate (Swedish)
Currently translated at 94.0% (9895 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-11-03 14:08:41 +01:00
14bf42613f Translated using Weblate (Swedish)
Currently translated at 94.0% (9895 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-03 14:08:41 +01:00
021fafe5f6 Translated using Weblate (English (United Kingdom))
Currently translated at 49.6% (5227 of 10526 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2024-11-02 13:30:42 +01:00
44de1c58a6 Translated using Weblate (Swedish)
Currently translated at 93.8% (9877 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-02 11:36:57 +01:00
6da4de016e Translated using Weblate (Swedish)
Currently translated at 93.6% (9854 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-02 00:25:42 +01:00
eb4ed1fe15 docs: domain: Be more upfront about 'sgio' not being actually supported
The support for the 'sgio' attribute for SCSI-backed devices was dropped
as there wasn't really ever any upstream support for it.

The docs do state that support for this depends on the hypervisor
itself, but we can be more clear that there is no hypervisor which does
support it.

There is also a suggestion to use 'sgio' instead of 'rawio' as being
more "secure" but since it no longer works drop this suggestion.

Resolves: https://issues.redhat.com/browse/RHEL-65268
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-01 15:53:13 +01:00
d02140383d virstring: Use 'g_new0' instead of improper use of 'g_malloc0_n'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-01 15:52:18 +01:00
bb4bd9d31f Replace improper use of g_malloc(0) with g_new0
Completely remove use of g_malloc (without zeroing of the allocated
memory) and forbid further use.

Replace use of g_malloc0 in cases where the variable holding the pointer
has proper type.

In all of the above cases we can use g_new0 instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-01 15:52:18 +01:00
354a3d2be4 virJSONValueFromString: Prefix error message from 'json-c'
The error message from 'json-c' was passed along without any libvirt
string which makes it hard to find in the source and isn't exactly clear
when present in logs:

 libvirtd[843]: internal error : invalid utf-8 string

Prefix the message with 'failed to parse JSON'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-11-01 15:51:53 +01:00
e71a510605 qemu: Fix maximum physical address size in baseline CPU
We should include maximum physical address size in the CPU definition
created by virConnectBaselineHypervisorCPU only if we know the value for
all input CPUs. Otherwise we would create a CPU definition that is not
usable on all hosts from which we gathered the CPU info.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-11-01 10:19:24 +01:00
f22d00a9e6 Post-release version bump to 10.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-01 10:16:35 +01:00
1990 changed files with 507526 additions and 309752 deletions

View File

@ -48,6 +48,7 @@
<shi_lei@massclouds.com> <shilei.massclouds@gmx.com> <shi_lei@massclouds.com> <shilei.massclouds@gmx.com>
<adrian.brzezinski@eo.pl> <redhat@adrb.pl> <adrian.brzezinski@eo.pl> <redhat@adrb.pl>
<matt@datto.com> <mcoleman@datto.com> <matt@datto.com> <mcoleman@datto.com>
<dbarboza@ventanamicro.com> <danielhb413@gmail.com>
# Name consolidation: # Name consolidation:
# Preferred author spelling <preferred email> # Preferred author spelling <preferred email>
@ -70,6 +71,7 @@ Wang Yufei (James) <james.wangyufei@huawei.com>
Deepak C Shetty <dpkshetty@gmail.com> Deepak C Shetty <dpkshetty@gmail.com>
Dave Allan <dallan@redhat.com> Dave Allan <dallan@redhat.com>
Richard W.M. Jones <rjones@redhat.com> Richard W.M. Jones <rjones@redhat.com>
Daniel Henrique Barboza <dbarboza@ventanamicro.com>
# Non-trivial consolidation: # Non-trivial consolidation:
# see git documentation for information about the format # see git documentation for information about the format

770
NEWS.rst
View File

@ -8,6 +8,718 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_. For a more fine-grained view, use the `git log`_.
v11.7.0 (unreleased)
====================
* **Security**
* **Removed features**
* **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
* **Improvements**
* **Bug fixes**
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
``virDomainSaveParams`` now supports an ``image_format`` parameter for
specifying the save image format on a per-domain basis. The parameter
accepts the same values as the driver-wide ``save_image_format`` setting
in ``qemu.conf``. An image format specified via ``virDomainSaveParams``
takes precedence over the driver-wide setting.
* qemu: Added guest load averages to the output of virDomainGetGuestInfo
This feature will be available with qemu guest agent 10.0 onwards.
* qemu: Add support for multiple iothreads for ``virtio-scsi`` controller
It's now possible to map multiple iothreads to the ``virtio-scsi`` controller
or even map them to specific virtqueues similarly to the ``virtio-blk``
device allowing for better performance in certain scenarios.
* qemu: integrate support for VM shutdown on host shutdown
It is now possible to instruct the QEMU driver to automatically perform
managed save, graceful shutdown, or hard poweroff on running VMs, when a
host shutdown is requested. This feature is intended to eventually replace
usage of the libvirt-guests script. The new approach improves on the
libvirt-guests script, by proactively monitoring logind for a signal that
a host shutdown has been requested. It will initiate the chosen action on
running guests immediately, allowing shutdown inhibitors to be released
sooner. The new solution is also able to iteratively try multiple actions
until one of them succeeds in shutting down the VM.
Since it must be mutually exclusive with the libvirt-guests script, this
feature currently requires a manual opt-in through editing of the
/etc/libvirt/qemu.conf configuration file. The libvirt-guests script must
be disabled before doing this.
* qemu: Add 'sparse' as a new save image format
QEMU's ``file`` migration has been supplemented with the new stream format
``mapped-ram``, where RAM pages are mapped directly to offsets in the
migration file. ``mapped-ram`` is now supported by augmenting the existing
save image formats with the ``sparse`` format.
* qemu: Add support for parallel save/restore
The ``sparse`` image format can support reading and writing by multiple
channels. ``virDomainSaveParams`` and ``virDomainRestoreParams`` now
support specifying the number of IO channels used for parallel save and
restore. Using multiple channels can reduce the time required to save
and restore domains.
* virsh: Introduce new hypervisor-cpu-models command
Added a new virsh command ``hypervisor-cpu-models``. The command pulls from
the existing domcapabilities XML and uses xpath to parse CPU model strings.
By default, only models reported as usable by the hypervisor on the host
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
The APIs using the guest agent now report two specific error codes aimed at
helping management applications/users to differentiate between timeout
while libvirt was synchronizing with the guest agent and timeout after a
command was already sent.
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
Attaching a virtio-mem device on s390 without an address type now gets a
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)
====================
* **Packaging changes**
* De-modularize the 'fs' storage file backend
The storage file backend for local files uses only code which we compile
into the internal libraries anyways so there's no point in having it
as a loadable module. The ``storage-file/libvirt_storage_file_fs.so`` module
no longer exists and its functionality is embedded directly.
* **Removed features**
* vbox: removed support for version 6.1 APIs
Libvirt no longer supports use of VirtualBox 6.1 since this version reached
its end of life on 2024/01.
* **New features**
* nodedev: Support ccwgroup based qeth devices
CCW group devices are devices that use multiple subchannels on the
mainframe's channel subsystem. A qeth group device maps to subchannels and
their corresponding device numbers and device bus-IDs. The ``ccwgroup``
device nodes are placed besides the subchannel nodes under computer and list
the group members within a new ``ccwgroup`` capability. A new capability
``ccwgroup_member`` is added into capability ``ccw`` to represent a device
membership to a ccwgroup. Filters are added to find ccwgroups as well as
ccwgroup members.
* ch: Support handling events from cloud-hypervisor
The ch driver now supports handling events from the cloud-hypervisor.
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.
* Introduce virtio-mem ``<memory/>`` model for s390 guests
The virtio-mem model of ``<memory/>`` device can now be used with s390
guests.
* Support using passt as the backend for interface type='vhostuser'
The combination of vhostuser transport with passt as the backend
provides high performance, fully featured networking without the
need for libvirt or QEMU to have any elevated privileges or
capabilities. Configuration and features are identical to the
configuration for type='user' with the passt backend.
* **Improvements**
* qemu: I/O error messages can be queried via ``virDomainGetMessages()``
The qemu hypervisor driver now preserves the last I/O error message along
with the timestamp when it was recorded and preserves it to be queried via
``virDomainGetMessages()``.
* **Bug fixes**
* tools: ssh-proxy: Check if domain is running before connecting to it
If domain is not running but has a static CID configured for its VSOCK then
the ssh-proxy parsed it anyways. This may have resulted in mistakenly
connecting to a different domain. Domain status is checked before parsing
its CID.
* apparmor: Allow SGX if configured
If domain has ``<memory model='sgx-epc'\>`` configured then libvirt now
adds corresponding devices into a per-domain profile so that AppArmor does
not deny QEMU access to them.
* qemu: Fix crash when starting a domain on a host with unknown host CPU
On hosts where we cannot detect a host CPU model (mostly aarch64 hosts)
starting a domain with a custom CPU model caused a crash of virtqemud.
The bug was introduced in libvirt-10.9.0
v11.0.0 (2025-01-15)
====================
* **New features**
* network/qemu/lxc: support vlans on standard Linux host bridges
The network, qemu, and lxc drivers now support (using the
``<vlan>`` subelement) vlan tagging and trunking on network
interfaces connected to a standard Linux host bridge.
* qemu: Add support for direct and extended tlbflush features
Domains can now utilise more tlbflush hyperv features.
* **Improvements**
* ch: Enable user aliases
User can now specify custom aliases for devices in domain XML
* qemu: Grab a QUERY job when formatting domain XML
Under some specific conditions it might have happened that domain XML did
not contain runtime information or returned an XML that's in process of
changing (e.g. by a thread that's hotplugging a device). Formatting domain
XML now serializes properly with other threads.
* virtiofs: Allow read only mode
The ``<filesystem/>`` with `virtiofsd` backend can now use ``<readonly/>``
tag to export underlying filesystem in read only mode.
* qemu: allow migration of vGPU from mdev device <-> SRIOV VF device
Some GPU vendors are switching from using vGPUs creating using
mdev and identified with a uuid, to vGPUs created as SRIOV VFs and
identified by their PCI address, and want to support live
migration from a host using one type of vGPU to the other
type. This is now possible.
* **Bug fixes**
* qemu: tpm: do not update profile name for transient domains
Fix a possible crash when starting a transient domain which was
introduced in the previous release.
* qemu: Fix snapshot to not delete disk image with internal snapshot
When a VM has internal snapshot that is parent to external snapshot and user
reverts to the internal snapshot and deletes the external snapshot libvirt
would delete the disk image containing the internal snapshot. This would
result in data loss.
* qemu: Do not format invalid XML with hyperv features in passthrough mode
When hyperv features were specified together with ``mode="passthrough"``
libvirt parsed and formatted such features in the domain XML even though
they were not used at all, resulting in XML that is not valid based on our
schema. This is now fixed by not parsing any specified features when the
passthrough mode is used.
* qemu: Fix a crash when starting a domain with ovs bridge and QOS
* cpu: Add missing -v1 variants for CPU models
Some CPU models (mostly old ones) were missed when versioned CPU model
names were introduced in the previous release.
* qemu: Fix false error when recovering failed post-copy migration
In some cases libvirt would report a failure to recover post-copy migration
even though the recovery started just fine and migration would eventually
successfully finish.
v10.10.0 (2024-12-02)
=====================
* **New features**
* qemu: add multi boot device support on s390x
For classical mainframe guests (i.e. LPAR or z/VM installations), you
always have to explicitly specify the disk where you want to boot from (or
"IPL" from, in s390x-speak -- IPL means "Initial Program Load").
In the past QEMU only used the first device in the boot order to IPL from.
With the new multi boot device support on s390x that is available with QEMU
version 9.2 and newer, this limitation is lifted. If the IPL fails for the
first device with the lowest boot index, the device with the second lowest
boot index will be tried and so on until IPL is successful or there are no
remaining boot devices to try.
Limitation: The s390x BIOS will try to IPL up to 8 total devices, any
number of which may be disks or network devices.
* qemu: Add support for versioned CPU models
Updates to QEMU CPU models with -vN suffix can now be used in libvirt just
like any other CPU model.
* 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 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.
* swtpm: Add support for profiles
Upcoming swtpm release will have TPM profile support that allows to
restrict a TPM's provided set of crypto algorithms and commands. Users can
now select profile by using ``<profile/>`` in their TPM XML definition.
* **Improvements**
* qemu: Support UEFI NVRAM images on block storage
Libvirt now allows users to use block storage as backend for UEFI NVRAM
images and allows them to be in format different than the template. When
qcow2 is used as the format, the images are now also auto-populated from the
template.
* qemu: Automatically add IOMMU when needed
When domain of 'qemu' or 'kvm' type has more than 255 vCPUs IOMMU with EIM
mode is required. Starting with this release libvirt automatically adds one
(or turns on the EIM mode if there's IOMMU without it).
* ch: allow hostdevs in domain definition
The Cloud Hypervisor driver (ch) now supports ``<hostdev/>``-s.
* ch: Enable callbacks for ch domain events
The Cloud Hypervisor driver (ch) now supports emitting events on domain
define, undefine, start, boot, stop and destroy.
* **Bug fixes**
* qemu: Fix reversion and inactive deletion of internal snapshots with UEFI NVRAM
In `v10.9.0 (2024-11-01)`_ creation of internal snapshots of VMs with UEFI
firmware was allowed, but certain operations such as reversion or inactive
deletion didn't work properly as they didn't consider the NVRAM qcow2 file.
* virnetdevopenvswitch: Warn on unsupported QoS settings
For OpenVSwitch vNICs libivrt does not set QoS directly using 'tc' but
offloads setting to OVS. But OVS is not as feature full as libvirt in this
regard and setting different 'peak' than 'average' results in vNIC always
sticking with 'peak'. Produce a warning if that's the case.
v10.9.0 (2024-11-01) v10.9.0 (2024-11-01)
==================== ====================
@ -39,7 +751,7 @@ v10.9.0 (2024-11-01)
warning : qemuSnapshotActiveInternalDeleteGetDevices:3841 : inconsistent internal snapshot state (deletion): VM='snap' snapshot='1727959843' missing='vda ' unexpected='' extra='' 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. with steps they took to the upstream tracker.
* qemu: improve documentation of image format settings * qemu: improve documentation of image format settings
@ -56,6 +768,7 @@ v10.9.0 (2024-11-01)
``<blockers model='...'>`` element is added for that CPU model listing ``<blockers model='...'>`` element is added for that CPU model listing
features required by the CPU model, but not supported on the host. features required by the CPU model, but not supported on the host.
v10.8.0 (2024-10-01) v10.8.0 (2024-10-01)
==================== ====================
@ -74,7 +787,7 @@ v10.8.0 (2024-10-01)
the bridge interface (normally it would not be set, as is done the bridge interface (normally it would not be set, as is done
with other forward modes). 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 Libvirt now automatically detects presence of ``showmount`` during runtime
as we do with other helper programs and also the as we do with other helper programs and also the
@ -121,7 +834,7 @@ v10.8.0 (2024-10-01)
* qemu: backup: Fix possible crashes when running monitoring commands during backup job * 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 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 * Fix various memleaks and overflows
@ -168,6 +881,17 @@ v10.7.0 (2024-09-02)
domain XML for descendants of the generic PC machine type (``i440fx``, domain XML for descendants of the generic PC machine type (``i440fx``,
``q35``, ``xenfv`` and ``isapc``). ``q35``, ``xenfv`` and ``isapc``).
* qemu: Add support for hyperv enlightenment feature ``hv-emsr-bitmap``
It is introduced since ``QEMU 7.10``, allowing L0 (KVM) and L1 (Hyper-V)
hypervisors to collaborate to avoid unnecessary updates to L2 MSR-Bitmap
upon vmexits.
* qemu: Add support for hyperv enlightenment feature ``hv-xmm-input``
It is introduced since ``QEMU 7.10``, allowing to pass parameters for
certain hypercalls using XMM registers (“XMM Fast Hypercall Input”).
* **Improvements** * **Improvements**
* ch: support restore with network devices * ch: support restore with network devices
@ -180,6 +904,7 @@ v10.7.0 (2024-09-02)
Cloud-Hypervisor driver now supports Ethernet, Network (NAT) and Bridge Cloud-Hypervisor driver now supports Ethernet, Network (NAT) and Bridge
networking modes. networking modes.
v10.6.0 (2024-08-05) v10.6.0 (2024-08-05)
==================== ====================
@ -297,6 +1022,18 @@ v10.5.0 (2024-07-01)
v10.4.0 (2024-06-03) v10.4.0 (2024-06-03)
==================== ====================
* **Security**
* ``CVE-2024-4418``: Fix stack use-after-free in virNetClientIOEventLoop()
Fix race condition leading to a stack use-after-free bug was found in libvirt.
Due to a bad assumption in the virNetClientIOEventLoop() method, the data
pointer to a stack-allocated virNetClientIOEventData structure ended up being
used in the virNetClientIOEventFD callback while the data pointer's stack frame
was concurrently being "freed" when returning from virNetClientIOEventLoop().
This flaw allows a local, unprivileged user to access virtproxyd without
authenticating.
* **New features** * **New features**
* qemu: Support for ras feature for virt machine type * qemu: Support for ras feature for virt machine type
@ -450,6 +1187,18 @@ v10.3.0 (2024-05-02)
v10.2.0 (2024-04-02) v10.2.0 (2024-04-02)
==================== ====================
* **Security**
* ``CVE-2024-2494``: remote: check for negative array lengths before allocation
Fix the flaw of the RPC library APIs of libvirt. The RPC server
de-serialization code allocates memory for arrays before the non-negative
length check is performed by the C API entry points. Passing a negative length
to the g_new0 function results in a crash due to the negative length being
treated as a huge positive number. A local unprivileged user could use this
flaw to perform a denial of service attack by causing the libvirt daemon to
crash.
* **New features** * **New features**
* ch: Basic save and restore support for ch driver * ch: Basic save and restore support for ch driver
@ -593,7 +1342,7 @@ v10.1.0 (2024-03-01)
``virt-admin`` doesn't try to guess the URI of the daemon to manage so a ``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. 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** * **Bug fixes**
@ -639,7 +1388,7 @@ v10.1.0 (2024-03-01)
* qemu: Fix reservation of manually specified port for disk migration * 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. it impossible to use it again.
@ -840,6 +1589,10 @@ v9.8.0 (2023-10-02)
<source dev='/dev/vhost-vdpa-0'> <source dev='/dev/vhost-vdpa-0'>
... ...
* cpu_map: Add the EPYC-Genoa cpu model
This model is introduced since ``QEMU 8.1``.
* **Improvements** * **Improvements**
* qemu: add nbdkit backend for network disks * qemu: add nbdkit backend for network disks
@ -988,7 +1741,8 @@ v9.5.0 (2023-07-03)
* **Bug fixes** * **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 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 ``/proc/meminfo`` file, which was not supported by the instance of the file
@ -5230,7 +5984,7 @@ v4.5.0 (2018-07-02)
* qemu: Fix a potential libvirtd crash on VM reconnect * qemu: Fix a potential libvirtd crash on VM reconnect
Initialization of the driver worker pool needs to come before libvirtd 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 have already emitted events which need to be handled prior to us getting to
the worker pool initialization. the worker pool initialization.
@ -6570,7 +7324,7 @@ v3.0.0 (2017-01-17)
* Event notifications for the secret object * 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. changes and secret value changes.
* New localPtr attribute for "ip" element in network XML * New localPtr attribute for "ip" element in network XML

View File

@ -6,6 +6,7 @@ FLAKE8 = @flake8_path@
BLACK = @black_path@ BLACK = @black_path@
RUNUTF8 = @runutf8@ RUNUTF8 = @runutf8@
PYTHON = @PYTHON3@ PYTHON = @PYTHON3@
PERL = @PERL@
GREP = @GREP@ GREP = @GREP@
SED = @SED@ SED = @SED@
AWK = @AWK@ AWK = @AWK@

View File

@ -13,23 +13,10 @@ if git and tests_enabled[0]
if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin' if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin'
make_prog = find_program('gmake') make_prog = find_program('gmake')
sed_prog = find_program('gsed') sed_prog = find_program('gsed')
grep_prog = find_program('ggrep')
else else
make_prog = find_program('make') make_prog = find_program('make')
sed_prog = find_program('sed') 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') grep_prog = find_program('grep')
endif endif
@ -42,6 +29,7 @@ if git and tests_enabled[0]
'black_path': black_path, 'black_path': black_path,
'runutf8': ' '.join(runutf8), 'runutf8': ' '.join(runutf8),
'PYTHON3': python3_prog.full_path(), 'PYTHON3': python3_prog.full_path(),
'PERL': perl_prog.full_path(),
'GREP': grep_prog.full_path(), 'GREP': grep_prog.full_path(),
'SED': sed_prog.full_path(), 'SED': sed_prog.full_path(),
'AWK': awk_prog.full_path(), 'AWK': awk_prog.full_path(),

View File

@ -92,8 +92,8 @@ sc_prohibit_raw_virclassnew:
# Avoid raw malloc and free, except in documentation comments. # Avoid raw malloc and free, except in documentation comments.
sc_prohibit_raw_allocation: sc_prohibit_raw_allocation:
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \ @prohibit='^.[^*].*\<((m|c|re)alloc|free|g_malloc) *\([^)]' \
halt='use VIR_ macros from viralloc.h instead of malloc/free' \ halt='use g_new0/g_malloc0/g_free instead of malloc/free/g_malloc' \
$(_sc_search_regexp) $(_sc_search_regexp)
# Avoid functions that can lead to double-close bugs. # Avoid functions that can lead to double-close bugs.
@ -247,6 +247,12 @@ sc_prohibit_canonicalize_file_name:
halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \ halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \
$(_sc_search_regexp) $(_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 # qsort from glibc has unstable sort ordering for "equal" members
sc_prohibit_qsort: sc_prohibit_qsort:
@prohibit='\<(qsort|qsort_r) *\(' \ @prohibit='\<(qsort|qsort_r) *\(' \
@ -401,6 +407,8 @@ msg_gen_function += virReportError
msg_gen_function += virReportErrorHelper msg_gen_function += virReportErrorHelper
msg_gen_function += virReportSystemError msg_gen_function += virReportSystemError
msg_gen_function += virLastErrorPrefixMessage msg_gen_function += virLastErrorPrefixMessage
msg_gen_function += vshError
msg_gen_function += vshWarn
# Uncomment the following and run "ninja test" to see diagnostics # Uncomment the following and run "ninja test" to see diagnostics
# that are not yet marked for translation, but that need to be rewritten # that are not yet marked for translation, but that need to be rewritten
@ -408,7 +416,6 @@ msg_gen_function += virLastErrorPrefixMessage
# msg_gen_function += fprintf # msg_gen_function += fprintf
# msg_gen_function += testError # msg_gen_function += testError
# msg_gen_function += vshPrint # msg_gen_function += vshPrint
# msg_gen_function += vshError
space = $(null) $(null) space = $(null) $(null)
func_re= ($(subst $(space),|,$(msg_gen_function))) func_re= ($(subst $(space),|,$(msg_gen_function)))
@ -1135,7 +1142,7 @@ sc_prohibit_backup_files:
sc_avoid_remote_reference_to_local_file: sc_avoid_remote_reference_to_local_file:
@prohibit='<#' \ @prohibit='<#' \
in_vc_files='\.rst$$' \ in_vc_files='\.rst$$' \
halt='use local reference within a file' \ halt='use `section`_ or `here <section_>`__ instead of `here <#section>`__' \
$(_sc_search_regexp) $(_sc_search_regexp)
# This Perl code is slightly obfuscated. Not only is each "$" doubled # This Perl code is slightly obfuscated. Not only is each "$" doubled
@ -1273,9 +1280,10 @@ po_file ?= $(top_srcdir)/po/POTFILES
# This is all generated files for RPC code. # This is all generated files for RPC code.
generated_files = \ generated_files = \
$(top_builddir)/src/*.[ch] \ $(top_builddir)/src/*.[ch] \
$(top_builddir)/src/*/*.[ch] $(top_builddir)/src/*/*.[ch] \
$(top_builddir)/src/*/*.policy.in
_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$) _gl_translatable_string_re ?= (^<policyconfig>|\b(N?_|gettext *)\([^)"]*("|$$))
# sc_po_check can fail if generated files are not built first # sc_po_check can fail if generated files are not built first
sc_po_check: sc_po_check:
@ -1324,9 +1332,9 @@ sc_spacing-check:
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl || \ $(PERL) $(top_srcdir)/build-aux/check-spacing.pl || \
{ echo 'incorrect formatting' 1>&2; exit 1; } { echo 'incorrect formatting' 1>&2; exit 1; }
sc_mock-noinline: sc_mockable-attribute:
$(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | $(RUNUTF8) \ $(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: sc_header-ifdef:
$(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[h]$$' | $(RUNUTF8) xargs \ $(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[h]$$' | $(RUNUTF8) xargs \
@ -1347,6 +1355,13 @@ sc_rst_since:
halt='format :since: correctly' \ halt='format :since: correctly' \
$(_sc_search_regexp) $(_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 ## ## Exceptions ##
@ -1411,8 +1426,11 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \
exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \ exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \
^(build-aux/syntax-check\.mk|tests/virfilemock\.c)$$ ^(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 = \ 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 = \ exclude_file_name_regexp--sc_prohibit_readlink = \
^src/(util/virutil|lxc/lxc_container)\.c$$ ^src/(util/virutil|lxc/lxc_container)\.c$$
@ -1437,7 +1455,7 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers\.c$$|scripts/rpcgen/tests/test_demo\.c$$) ^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers\.c$$|scripts/rpcgen/tests/test_demo\.c$$)
exclude_file_name_regexp--sc_trailing_blank = \ exclude_file_name_regexp--sc_trailing_blank = \
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|tests/virshtestdata/.*$$ /sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|tests/virshtestdata/.*|docs/fonts|scripts/rpcgen/tests/.*\.bin|tests/viracpidata/.*|tests/virpcitestdata/*|tests/virstoragetestdata/images/.*\.qcow2$$
exclude_file_name_regexp--sc_unmarked_diagnostics = \ exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$ ^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
@ -1504,6 +1522,9 @@ exclude_file_name_regexp--sc_black = \
exclude_file_name_regexp--sc_spacing-check = \ exclude_file_name_regexp--sc_spacing-check = \
^scripts/rpcgen/tests/test_demo\.[ch]$$ ^scripts/rpcgen/tests/test_demo\.[ch]$$
exclude_file_name_regexp--sc_prohibit_inline_functions = \
^src/storage_file/storage_source.*.c$$
## -------------- ## ## -------------- ##
## Implementation ## ## Implementation ##
## -------------- ## ## -------------- ##

View File

@ -33,12 +33,7 @@ function install_buildenv() {
glibc-langpack-en \ glibc-langpack-en \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -29,10 +29,8 @@ function install_buildenv() {
glib-dev \ glib-dev \
gnutls-dev \ gnutls-dev \
grep \ grep \
iproute2 \
iptables \ iptables \
json-c-dev \ json-c-dev \
kmod \
libcap-ng-dev \ libcap-ng-dev \
libnl3-dev \ libnl3-dev \
libpcap-dev \ libpcap-dev \
@ -44,19 +42,15 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
libxslt \ libxslt \
lvm2 \
lvm2-dev \ lvm2-dev \
make \ make \
meson \ meson \
musl-dev \ musl-dev \
netcf-dev \ netcf-dev \
nfs-utils \
numactl-dev \ numactl-dev \
open-iscsi \
parted-dev \ parted-dev \
perl \ perl \
pkgconf \ pkgconf \
polkit \
py3-docutils \ py3-docutils \
py3-flake8 \ py3-flake8 \
py3-pytest \ py3-pytest \

View File

@ -29,10 +29,8 @@ function install_buildenv() {
glib-dev \ glib-dev \
gnutls-dev \ gnutls-dev \
grep \ grep \
iproute2 \
iptables \ iptables \
json-c-dev \ json-c-dev \
kmod \
libcap-ng-dev \ libcap-ng-dev \
libnl3-dev \ libnl3-dev \
libpcap-dev \ libpcap-dev \
@ -44,19 +42,15 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
libxslt \ libxslt \
lvm2 \
lvm2-dev \ lvm2-dev \
make \ make \
meson \ meson \
musl-dev \ musl-dev \
netcf-dev \ netcf-dev \
nfs-utils \
numactl-dev \ numactl-dev \
open-iscsi \
parted-dev \ parted-dev \
perl \ perl \
pkgconf \ pkgconf \
polkit \
py3-docutils \ py3-docutils \
py3-flake8 \ py3-flake8 \
py3-pytest \ py3-pytest \

View File

@ -34,12 +34,7 @@ function install_buildenv() {
glibc-langpack-en \ glibc-langpack-en \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -59,17 +54,13 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -1,117 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture arm64
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-aarch64-linux-gnu \
libacl1-dev:arm64 \
libapparmor-dev:arm64 \
libattr1-dev:arm64 \
libaudit-dev:arm64 \
libblkid-dev:arm64 \
libc6-dev:arm64 \
libcap-ng-dev:arm64 \
libcurl4-gnutls-dev:arm64 \
libdevmapper-dev:arm64 \
libfuse-dev:arm64 \
libglib2.0-dev:arm64 \
libglusterfs-dev:arm64 \
libgnutls28-dev:arm64 \
libiscsi-dev:arm64 \
libjson-c-dev:arm64 \
libnl-3-dev:arm64 \
libnl-route-3-dev:arm64 \
libnuma-dev:arm64 \
libparted-dev:arm64 \
libpcap0.8-dev:arm64 \
libpciaccess-dev:arm64 \
librbd-dev:arm64 \
libreadline-dev:arm64 \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \
libxen-dev:arm64 \
libxml2-dev:arm64 \
systemtap-sdt-dev:arm64
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="aarch64-linux-gnu"
export MESON_OPTS="--cross-file=aarch64-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armel
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabi \
libacl1-dev:armel \
libapparmor-dev:armel \
libattr1-dev:armel \
libaudit-dev:armel \
libblkid-dev:armel \
libc6-dev:armel \
libcap-ng-dev:armel \
libcurl4-gnutls-dev:armel \
libdevmapper-dev:armel \
libfuse-dev:armel \
libglib2.0-dev:armel \
libglusterfs-dev:armel \
libgnutls28-dev:armel \
libiscsi-dev:armel \
libjson-c-dev:armel \
libnl-3-dev:armel \
libnl-route-3-dev:armel \
libnuma-dev:armel \
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \
libxml2-dev:armel \
systemtap-sdt-dev:armel
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="arm-linux-gnueabi"
export MESON_OPTS="--cross-file=arm-linux-gnueabi"

View File

@ -1,117 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armhf
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabihf \
libacl1-dev:armhf \
libapparmor-dev:armhf \
libattr1-dev:armhf \
libaudit-dev:armhf \
libblkid-dev:armhf \
libc6-dev:armhf \
libcap-ng-dev:armhf \
libcurl4-gnutls-dev:armhf \
libdevmapper-dev:armhf \
libfuse-dev:armhf \
libglib2.0-dev:armhf \
libglusterfs-dev:armhf \
libgnutls28-dev:armhf \
libiscsi-dev:armhf \
libjson-c-dev:armhf \
libnl-3-dev:armhf \
libnl-route-3-dev:armhf \
libnuma-dev:armhf \
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
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
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="arm-linux-gnueabihf"
export MESON_OPTS="--cross-file=arm-linux-gnueabihf"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-i686-linux-gnu \
libacl1-dev:i386 \
libapparmor-dev:i386 \
libattr1-dev:i386 \
libaudit-dev:i386 \
libblkid-dev:i386 \
libc6-dev:i386 \
libcap-ng-dev:i386 \
libcurl4-gnutls-dev:i386 \
libdevmapper-dev:i386 \
libfuse-dev:i386 \
libglib2.0-dev:i386 \
libglusterfs-dev:i386 \
libgnutls28-dev:i386 \
libiscsi-dev:i386 \
libjson-c-dev:i386 \
libnl-3-dev:i386 \
libnl-route-3-dev:i386 \
libnuma-dev:i386 \
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \
libxml2-dev:i386 \
systemtap-sdt-dev:i386
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/i686-linux-gnu-gcc'\n\
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/i686-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86'\n\
cpu = 'i686'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="i686-linux-gnu"
export MESON_OPTS="--cross-file=i686-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture mips64el
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-mips64el-linux-gnuabi64 \
libacl1-dev:mips64el \
libapparmor-dev:mips64el \
libattr1-dev:mips64el \
libaudit-dev:mips64el \
libblkid-dev:mips64el \
libc6-dev:mips64el \
libcap-ng-dev:mips64el \
libcurl4-gnutls-dev:mips64el \
libdevmapper-dev:mips64el \
libfuse-dev:mips64el \
libglib2.0-dev:mips64el \
libglusterfs-dev:mips64el \
libgnutls28-dev:mips64el \
libiscsi-dev:mips64el \
libjson-c-dev:mips64el \
libnl-3-dev:mips64el \
libnl-route-3-dev:mips64el \
libnuma-dev:mips64el \
libparted-dev:mips64el \
libpcap0.8-dev:mips64el \
libpciaccess-dev:mips64el \
librbd-dev:mips64el \
libreadline-dev:mips64el \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \
libxml2-dev:mips64el \
systemtap-sdt-dev:mips64el
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips64'\n\
cpu = 'mips64el'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="mips64el-linux-gnuabi64"
export MESON_OPTS="--cross-file=mips64el-linux-gnuabi64"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture mipsel
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-mipsel-linux-gnu \
libacl1-dev:mipsel \
libapparmor-dev:mipsel \
libattr1-dev:mipsel \
libaudit-dev:mipsel \
libblkid-dev:mipsel \
libc6-dev:mipsel \
libcap-ng-dev:mipsel \
libcurl4-gnutls-dev:mipsel \
libdevmapper-dev:mipsel \
libfuse-dev:mipsel \
libglib2.0-dev:mipsel \
libglusterfs-dev:mipsel \
libgnutls28-dev:mipsel \
libiscsi-dev:mipsel \
libjson-c-dev:mipsel \
libnl-3-dev:mipsel \
libnl-route-3-dev:mipsel \
libnuma-dev:mipsel \
libparted-dev:mipsel \
libpcap0.8-dev:mipsel \
libpciaccess-dev:mipsel \
librbd-dev:mipsel \
libreadline-dev:mipsel \
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \
libxml2-dev:mipsel \
systemtap-sdt-dev:mipsel
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mipsel'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="mipsel-linux-gnu"
export MESON_OPTS="--cross-file=mipsel-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture ppc64el
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-powerpc64le-linux-gnu \
libacl1-dev:ppc64el \
libapparmor-dev:ppc64el \
libattr1-dev:ppc64el \
libaudit-dev:ppc64el \
libblkid-dev:ppc64el \
libc6-dev:ppc64el \
libcap-ng-dev:ppc64el \
libcurl4-gnutls-dev:ppc64el \
libdevmapper-dev:ppc64el \
libfuse-dev:ppc64el \
libglib2.0-dev:ppc64el \
libglusterfs-dev:ppc64el \
libgnutls28-dev:ppc64el \
libiscsi-dev:ppc64el \
libjson-c-dev:ppc64el \
libnl-3-dev:ppc64el \
libnl-route-3-dev:ppc64el \
libnuma-dev:ppc64el \
libparted-dev:ppc64el \
libpcap0.8-dev:ppc64el \
libpciaccess-dev:ppc64el \
librbd-dev:ppc64el \
libreadline-dev:ppc64el \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \
libxml2-dev:ppc64el \
systemtap-sdt-dev:ppc64el
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'ppc64'\n\
cpu = 'powerpc64le'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="powerpc64le-linux-gnu"
export MESON_OPTS="--cross-file=powerpc64le-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture s390x
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-s390x-linux-gnu \
libacl1-dev:s390x \
libapparmor-dev:s390x \
libattr1-dev:s390x \
libaudit-dev:s390x \
libblkid-dev:s390x \
libc6-dev:s390x \
libcap-ng-dev:s390x \
libcurl4-gnutls-dev:s390x \
libdevmapper-dev:s390x \
libfuse-dev:s390x \
libglib2.0-dev:s390x \
libglusterfs-dev:s390x \
libgnutls28-dev:s390x \
libiscsi-dev:s390x \
libjson-c-dev:s390x \
libnl-3-dev:s390x \
libnl-route-3-dev:s390x \
libnuma-dev:s390x \
libparted-dev:s390x \
libpcap0.8-dev:s390x \
libpciaccess-dev:s390x \
librbd-dev:s390x \
libreadline-dev:s390x \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \
libxml2-dev:s390x \
systemtap-sdt-dev:s390x
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 's390x'\n\
cpu = 's390x'\n\
endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
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
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="s390x-linux-gnu"
export MESON_OPTS="--cross-file=s390x-linux-gnu"

View File

@ -1,100 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
clang \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gcc \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
libaudit-dev \
libblkid-dev \
libc6-dev \
libcap-ng-dev \
libclang-dev \
libcurl4-gnutls-dev \
libdevmapper-dev \
libfuse-dev \
libglib2.0-dev \
libglusterfs-dev \
libgnutls28-dev \
libiscsi-dev \
libjson-c-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
libnuma-dev \
libparted-dev \
libpcap0.8-dev \
libpciaccess-dev \
librbd-dev \
libreadline-dev \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \
libxen-dev \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
systemtap-sdt-dev \
wireshark-dev \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:arm64 \ libsanlock-dev:arm64 \
libsasl2-dev:arm64 \ libsasl2-dev:arm64 \
libselinux1-dev:arm64 \ libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \ libssh-dev:arm64 \
libssh2-1-dev:arm64 \ libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \ libtirpc-dev:arm64 \
libudev-dev:arm64 \ libudev-dev:arm64 \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:armel \ libsanlock-dev:armel \
libsasl2-dev:armel \ libsasl2-dev:armel \
libselinux1-dev:armel \ libselinux1-dev:armel \
libssh-gcrypt-dev:armel \ libssh-dev:armel \
libssh2-1-dev:armel \ libssh2-1-dev:armel \
libtirpc-dev:armel \ libtirpc-dev:armel \
libudev-dev:armel \ libudev-dev:armel \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:armhf \ libsanlock-dev:armhf \
libsasl2-dev:armhf \ libsasl2-dev:armhf \
libselinux1-dev:armhf \ libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \ libssh-dev:armhf \
libssh2-1-dev:armhf \ libssh2-1-dev:armhf \
libtirpc-dev:armhf \ libtirpc-dev:armhf \
libudev-dev:armhf \ libudev-dev:armhf \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:i386 \ libsanlock-dev:i386 \
libsasl2-dev:i386 \ libsasl2-dev:i386 \
libselinux1-dev:i386 \ libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \ libssh-dev:i386 \
libssh2-1-dev:i386 \ libssh2-1-dev:i386 \
libtirpc-dev:i386 \ libtirpc-dev:i386 \
libudev-dev:i386 \ libudev-dev:i386 \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:mips64el \ libsanlock-dev:mips64el \
libsasl2-dev:mips64el \ libsasl2-dev:mips64el \
libselinux1-dev:mips64el \ libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \ libssh-dev:mips64el \
libssh2-1-dev:mips64el \ libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \ libtirpc-dev:mips64el \
libudev-dev:mips64el \ libudev-dev:mips64el \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:mipsel \ libsanlock-dev:mipsel \
libsasl2-dev:mipsel \ libsasl2-dev:mipsel \
libselinux1-dev:mipsel \ libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \ libssh-dev:mipsel \
libssh2-1-dev:mipsel \ libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \ libtirpc-dev:mipsel \
libudev-dev:mipsel \ libudev-dev:mipsel \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:ppc64el \ libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \ libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \ libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \ libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \ libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \ libtirpc-dev:ppc64el \
libudev-dev:ppc64el \ libudev-dev:ppc64el \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:s390x \ libsanlock-dev:s390x \
libsasl2-dev:s390x \ libsasl2-dev:s390x \
libselinux1-dev:s390x \ libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \ libssh-dev:s390x \
libssh2-1-dev:s390x \ libssh2-1-dev:s390x \
libtirpc-dev:s390x \ libtirpc-dev:s390x \
libudev-dev:s390x \ libudev-dev:s390x \

View File

@ -26,9 +26,6 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -57,7 +54,7 @@ function install_buildenv() {
libsanlock-dev \ libsanlock-dev \
libsasl2-dev \ libsasl2-dev \
libselinux1-dev \ libselinux1-dev \
libssh-gcrypt-dev \ libssh-dev \
libssh2-1-dev \ libssh2-1-dev \
libtirpc-dev \ libtirpc-dev \
libudev-dev \ libudev-dev \
@ -65,16 +62,11 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:arm64 \ libsanlock-dev:arm64 \
libsasl2-dev:arm64 \ libsasl2-dev:arm64 \
libselinux1-dev:arm64 \ libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \ libssh-dev:arm64 \
libssh2-1-dev:arm64 \ libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \ libtirpc-dev:arm64 \
libudev-dev:arm64 \ libudev-dev:arm64 \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -77,12 +69,11 @@ function install_buildenv() {
libparted-dev:armel \ libparted-dev:armel \
libpcap0.8-dev:armel \ libpcap0.8-dev:armel \
libpciaccess-dev:armel \ libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \ libreadline-dev:armel \
libsanlock-dev:armel \ libsanlock-dev:armel \
libsasl2-dev:armel \ libsasl2-dev:armel \
libselinux1-dev:armel \ libselinux1-dev:armel \
libssh-gcrypt-dev:armel \ libssh-dev:armel \
libssh2-1-dev:armel \ libssh2-1-dev:armel \
libtirpc-dev:armel \ libtirpc-dev:armel \
libudev-dev:armel \ libudev-dev:armel \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -77,16 +69,14 @@ function install_buildenv() {
libparted-dev:armhf \ libparted-dev:armhf \
libpcap0.8-dev:armhf \ libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \ libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \ libreadline-dev:armhf \
libsanlock-dev:armhf \ libsanlock-dev:armhf \
libsasl2-dev:armhf \ libsasl2-dev:armhf \
libselinux1-dev:armhf \ libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \ libssh-dev:armhf \
libssh2-1-dev:armhf \ libssh2-1-dev:armhf \
libtirpc-dev:armhf \ libtirpc-dev:armhf \
libudev-dev:armhf \ libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \ libxml2-dev:armhf \
systemtap-sdt-dev:armhf systemtap-sdt-dev:armhf
mkdir -p /usr/local/share/meson/cross mkdir -p /usr/local/share/meson/cross

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -77,12 +69,11 @@ function install_buildenv() {
libparted-dev:i386 \ libparted-dev:i386 \
libpcap0.8-dev:i386 \ libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \ libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \ libreadline-dev:i386 \
libsanlock-dev:i386 \ libsanlock-dev:i386 \
libsasl2-dev:i386 \ libsasl2-dev:i386 \
libselinux1-dev:i386 \ libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \ libssh-dev:i386 \
libssh2-1-dev:i386 \ libssh2-1-dev:i386 \
libtirpc-dev:i386 \ libtirpc-dev:i386 \
libudev-dev:i386 \ libudev-dev:i386 \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:mips64el \ libsanlock-dev:mips64el \
libsasl2-dev:mips64el \ libsasl2-dev:mips64el \
libselinux1-dev:mips64el \ libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \ libssh-dev:mips64el \
libssh2-1-dev:mips64el \ libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \ libtirpc-dev:mips64el \
libudev-dev:mips64el \ libudev-dev:mips64el \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:ppc64el \ libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \ libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \ libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \ libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \ libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \ libtirpc-dev:ppc64el \
libudev-dev:ppc64el \ libudev-dev:ppc64el \

View File

@ -24,23 +24,15 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -83,7 +75,7 @@ function install_buildenv() {
libsanlock-dev:s390x \ libsanlock-dev:s390x \
libsasl2-dev:s390x \ libsasl2-dev:s390x \
libselinux1-dev:s390x \ libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \ libssh-dev:s390x \
libssh2-1-dev:s390x \ libssh2-1-dev:s390x \
libtirpc-dev:s390x \ libtirpc-dev:s390x \
libudev-dev:s390x \ libudev-dev:s390x \

View File

@ -26,9 +26,6 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -57,7 +54,7 @@ function install_buildenv() {
libsanlock-dev \ libsanlock-dev \
libsasl2-dev \ libsasl2-dev \
libselinux1-dev \ libselinux1-dev \
libssh-gcrypt-dev \ libssh-dev \
libssh2-1-dev \ libssh2-1-dev \
libtirpc-dev \ libtirpc-dev \
libudev-dev \ libudev-dev \
@ -65,16 +62,11 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -9,7 +9,7 @@ function install_buildenv() {
dnf install -y \ dnf install -y \
audit-libs-devel \ audit-libs-devel \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
clang \ clang \
@ -33,12 +33,7 @@ function install_buildenv() {
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \
@ -82,6 +73,7 @@ function install_buildenv() {
systemd-devel \ systemd-devel \
systemd-rpm-macros \ systemd-rpm-macros \
systemtap-sdt-devel \ systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \ wireshark-devel \
xen-devel xen-devel
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED

View File

@ -8,7 +8,7 @@ function install_buildenv() {
dnf update -y dnf update -y
dnf install -y \ dnf install -y \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
codespell \ codespell \
@ -23,22 +23,13 @@ function install_buildenv() {
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -8,7 +8,7 @@ function install_buildenv() {
dnf update -y dnf update -y
dnf install -y \ dnf install -y \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
codespell \ codespell \
@ -23,22 +23,13 @@ function install_buildenv() {
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -9,7 +9,7 @@ function install_buildenv() {
dnf install -y \ dnf install -y \
audit-libs-devel \ audit-libs-devel \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
clang \ clang \
@ -33,12 +33,7 @@ function install_buildenv() {
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -58,17 +53,13 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \
@ -82,6 +73,7 @@ function install_buildenv() {
systemd-devel \ systemd-devel \
systemd-rpm-macros \ systemd-rpm-macros \
systemtap-sdt-devel \ systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \ wireshark-devel \
xen-devel xen-devel
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED

View File

@ -24,22 +24,13 @@ function install_buildenv() {
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -24,22 +24,13 @@ function install_buildenv() {
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -34,12 +34,7 @@ function install_buildenv() {
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -59,17 +54,13 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -33,9 +33,6 @@ function install_buildenv() {
glibc-locale \ glibc-locale \
glusterfs-devel \ glusterfs-devel \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl-devel \ libacl-devel \
libapparmor-devel \ libapparmor-devel \
libattr-devel \ libattr-devel \
@ -60,17 +57,12 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja \ ninja \
numad \
open-iscsi \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3-base \ python3-base \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -32,9 +32,6 @@ function install_buildenv() {
glibc-locale \ glibc-locale \
glusterfs-devel \ glusterfs-devel \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl-devel \ libacl-devel \
libapparmor-devel \ libapparmor-devel \
libattr-devel \ libattr-devel \
@ -59,17 +56,12 @@ function install_buildenv() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja \ ninja \
numad \
open-iscsi \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3-base \ python3-base \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -26,9 +26,6 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -66,16 +63,11 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -26,9 +26,6 @@ function install_buildenv() {
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -66,16 +63,11 @@ function install_buildenv() {
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja' NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg' PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8' PIP3='/usr/local/bin/pip-3.8'
PKGS='augeas bash-completion ca_root_nss ccache 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='' PYPI_PKGS=''
PYTHON='/usr/local/bin/python3' PYTHON='/usr/local/bin/python3'

View File

@ -10,7 +10,7 @@ CROSS_PKGS=''
MAKE='/usr/local/bin/gmake' MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja' NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg' PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8' PIP3='/usr/local/bin/pip'
PKGS='augeas bash-completion ca_root_nss ccache 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='' PYPI_PKGS=''
PYTHON='/usr/local/bin/python3' PYTHON='/usr/local/bin/python3'

View File

@ -34,12 +34,7 @@ RUN dnf update -y && \
glibc-langpack-en \ glibc-langpack-en \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -59,17 +54,13 @@ RUN dnf update -y && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -4,7 +4,7 @@
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/alpine:3.19 FROM docker.io/library/alpine:3.22
RUN apk update && \ RUN apk update && \
apk upgrade && \ apk upgrade && \
@ -30,10 +30,8 @@ RUN apk update && \
glib-dev \ glib-dev \
gnutls-dev \ gnutls-dev \
grep \ grep \
iproute2 \
iptables \ iptables \
json-c-dev \ json-c-dev \
kmod \
libcap-ng-dev \ libcap-ng-dev \
libnl3-dev \ libnl3-dev \
libpcap-dev \ libpcap-dev \
@ -45,19 +43,15 @@ RUN apk update && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
libxslt \ libxslt \
lvm2 \
lvm2-dev \ lvm2-dev \
make \ make \
meson \ meson \
musl-dev \ musl-dev \
netcf-dev \ netcf-dev \
nfs-utils \
numactl-dev \ numactl-dev \
open-iscsi \
parted-dev \ parted-dev \
perl \ perl \
pkgconf \ pkgconf \
polkit \
py3-docutils \ py3-docutils \
py3-flake8 \ py3-flake8 \
py3-pytest \ py3-pytest \

View File

@ -30,10 +30,8 @@ RUN apk update && \
glib-dev \ glib-dev \
gnutls-dev \ gnutls-dev \
grep \ grep \
iproute2 \
iptables \ iptables \
json-c-dev \ json-c-dev \
kmod \
libcap-ng-dev \ libcap-ng-dev \
libnl3-dev \ libnl3-dev \
libpcap-dev \ libpcap-dev \
@ -45,19 +43,15 @@ RUN apk update && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
libxslt \ libxslt \
lvm2 \
lvm2-dev \ lvm2-dev \
make \ make \
meson \ meson \
musl-dev \ musl-dev \
netcf-dev \ netcf-dev \
nfs-utils \
numactl-dev \ numactl-dev \
open-iscsi \
parted-dev \ parted-dev \
perl \ perl \
pkgconf \ pkgconf \
polkit \
py3-docutils \ py3-docutils \
py3-flake8 \ py3-flake8 \
py3-pytest \ py3-pytest \

View File

@ -35,12 +35,7 @@ RUN dnf distro-sync -y && \
glibc-langpack-en \ glibc-langpack-en \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -60,17 +55,13 @@ RUN dnf distro-sync -y && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -1,123 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture arm64 && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-aarch64-linux-gnu \
libacl1-dev:arm64 \
libapparmor-dev:arm64 \
libattr1-dev:arm64 \
libaudit-dev:arm64 \
libblkid-dev:arm64 \
libc6-dev:arm64 \
libcap-ng-dev:arm64 \
libcurl4-gnutls-dev:arm64 \
libdevmapper-dev:arm64 \
libfuse-dev:arm64 \
libglib2.0-dev:arm64 \
libglusterfs-dev:arm64 \
libgnutls28-dev:arm64 \
libiscsi-dev:arm64 \
libjson-c-dev:arm64 \
libnl-3-dev:arm64 \
libnl-route-3-dev:arm64 \
libnuma-dev:arm64 \
libparted-dev:arm64 \
libpcap0.8-dev:arm64 \
libpciaccess-dev:arm64 \
librbd-dev:arm64 \
libreadline-dev:arm64 \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \
libxen-dev:arm64 \
libxml2-dev:arm64 \
systemtap-sdt-dev:arm64 && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armel && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabi \
libacl1-dev:armel \
libapparmor-dev:armel \
libattr1-dev:armel \
libaudit-dev:armel \
libblkid-dev:armel \
libc6-dev:armel \
libcap-ng-dev:armel \
libcurl4-gnutls-dev:armel \
libdevmapper-dev:armel \
libfuse-dev:armel \
libglib2.0-dev:armel \
libglusterfs-dev:armel \
libgnutls28-dev:armel \
libiscsi-dev:armel \
libjson-c-dev:armel \
libnl-3-dev:armel \
libnl-route-3-dev:armel \
libnuma-dev:armel \
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \
libxml2-dev:armel \
systemtap-sdt-dev:armel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,123 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armhf && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabihf \
libacl1-dev:armhf \
libapparmor-dev:armhf \
libattr1-dev:armhf \
libaudit-dev:armhf \
libblkid-dev:armhf \
libc6-dev:armhf \
libcap-ng-dev:armhf \
libcurl4-gnutls-dev:armhf \
libdevmapper-dev:armhf \
libfuse-dev:armhf \
libglib2.0-dev:armhf \
libglusterfs-dev:armhf \
libgnutls28-dev:armhf \
libiscsi-dev:armhf \
libjson-c-dev:armhf \
libnl-3-dev:armhf \
libnl-route-3-dev:armhf \
libnuma-dev:armhf \
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
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 && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture i386 && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-i686-linux-gnu \
libacl1-dev:i386 \
libapparmor-dev:i386 \
libattr1-dev:i386 \
libaudit-dev:i386 \
libblkid-dev:i386 \
libc6-dev:i386 \
libcap-ng-dev:i386 \
libcurl4-gnutls-dev:i386 \
libdevmapper-dev:i386 \
libfuse-dev:i386 \
libglib2.0-dev:i386 \
libglusterfs-dev:i386 \
libgnutls28-dev:i386 \
libiscsi-dev:i386 \
libjson-c-dev:i386 \
libnl-3-dev:i386 \
libnl-route-3-dev:i386 \
libnuma-dev:i386 \
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \
libxml2-dev:i386 \
systemtap-sdt-dev:i386 && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/i686-linux-gnu-gcc'\n\
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/i686-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86'\n\
cpu = 'i686'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mips64el && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mips64el-linux-gnuabi64 \
libacl1-dev:mips64el \
libapparmor-dev:mips64el \
libattr1-dev:mips64el \
libaudit-dev:mips64el \
libblkid-dev:mips64el \
libc6-dev:mips64el \
libcap-ng-dev:mips64el \
libcurl4-gnutls-dev:mips64el \
libdevmapper-dev:mips64el \
libfuse-dev:mips64el \
libglib2.0-dev:mips64el \
libglusterfs-dev:mips64el \
libgnutls28-dev:mips64el \
libiscsi-dev:mips64el \
libjson-c-dev:mips64el \
libnl-3-dev:mips64el \
libnl-route-3-dev:mips64el \
libnuma-dev:mips64el \
libparted-dev:mips64el \
libpcap0.8-dev:mips64el \
libpciaccess-dev:mips64el \
librbd-dev:mips64el \
libreadline-dev:mips64el \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \
libxml2-dev:mips64el \
systemtap-sdt-dev:mips64el && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips64'\n\
cpu = 'mips64el'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mipsel && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mipsel-linux-gnu \
libacl1-dev:mipsel \
libapparmor-dev:mipsel \
libattr1-dev:mipsel \
libaudit-dev:mipsel \
libblkid-dev:mipsel \
libc6-dev:mipsel \
libcap-ng-dev:mipsel \
libcurl4-gnutls-dev:mipsel \
libdevmapper-dev:mipsel \
libfuse-dev:mipsel \
libglib2.0-dev:mipsel \
libglusterfs-dev:mipsel \
libgnutls28-dev:mipsel \
libiscsi-dev:mipsel \
libjson-c-dev:mipsel \
libnl-3-dev:mipsel \
libnl-route-3-dev:mipsel \
libnuma-dev:mipsel \
libparted-dev:mipsel \
libpcap0.8-dev:mipsel \
libpciaccess-dev:mipsel \
librbd-dev:mipsel \
libreadline-dev:mipsel \
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \
libxml2-dev:mipsel \
systemtap-sdt-dev:mipsel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mipsel'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture ppc64el && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-powerpc64le-linux-gnu \
libacl1-dev:ppc64el \
libapparmor-dev:ppc64el \
libattr1-dev:ppc64el \
libaudit-dev:ppc64el \
libblkid-dev:ppc64el \
libc6-dev:ppc64el \
libcap-ng-dev:ppc64el \
libcurl4-gnutls-dev:ppc64el \
libdevmapper-dev:ppc64el \
libfuse-dev:ppc64el \
libglib2.0-dev:ppc64el \
libglusterfs-dev:ppc64el \
libgnutls28-dev:ppc64el \
libiscsi-dev:ppc64el \
libjson-c-dev:ppc64el \
libnl-3-dev:ppc64el \
libnl-route-3-dev:ppc64el \
libnuma-dev:ppc64el \
libparted-dev:ppc64el \
libpcap0.8-dev:ppc64el \
libpciaccess-dev:ppc64el \
librbd-dev:ppc64el \
libreadline-dev:ppc64el \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \
libxml2-dev:ppc64el \
systemtap-sdt-dev:ppc64el && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'ppc64'\n\
cpu = 'powerpc64le'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
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"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture s390x && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-s390x-linux-gnu \
libacl1-dev:s390x \
libapparmor-dev:s390x \
libattr1-dev:s390x \
libaudit-dev:s390x \
libblkid-dev:s390x \
libc6-dev:s390x \
libcap-ng-dev:s390x \
libcurl4-gnutls-dev:s390x \
libdevmapper-dev:s390x \
libfuse-dev:s390x \
libglib2.0-dev:s390x \
libglusterfs-dev:s390x \
libgnutls28-dev:s390x \
libiscsi-dev:s390x \
libjson-c-dev:s390x \
libnl-3-dev:s390x \
libnl-route-3-dev:s390x \
libnuma-dev:s390x \
libparted-dev:s390x \
libpcap0.8-dev:s390x \
libpciaccess-dev:s390x \
librbd-dev:s390x \
libreadline-dev:s390x \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \
libxml2-dev:s390x \
systemtap-sdt-dev:s390x && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 's390x'\n\
cpu = 's390x'\n\
endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
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"

View File

@ -1,103 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
clang \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gcc \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
libaudit-dev \
libblkid-dev \
libc6-dev \
libcap-ng-dev \
libclang-dev \
libcurl4-gnutls-dev \
libdevmapper-dev \
libfuse-dev \
libglib2.0-dev \
libglusterfs-dev \
libgnutls28-dev \
libiscsi-dev \
libjson-c-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
libnuma-dev \
libparted-dev \
libpcap0.8-dev \
libpciaccess-dev \
librbd-dev \
libreadline-dev \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \
libxen-dev \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
systemtap-sdt-dev \
wireshark-dev \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
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"

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:arm64 \ libsanlock-dev:arm64 \
libsasl2-dev:arm64 \ libsasl2-dev:arm64 \
libselinux1-dev:arm64 \ libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \ libssh-dev:arm64 \
libssh2-1-dev:arm64 \ libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \ libtirpc-dev:arm64 \
libudev-dev:arm64 \ libudev-dev:arm64 \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armel \ libsanlock-dev:armel \
libsasl2-dev:armel \ libsasl2-dev:armel \
libselinux1-dev:armel \ libselinux1-dev:armel \
libssh-gcrypt-dev:armel \ libssh-dev:armel \
libssh2-1-dev:armel \ libssh2-1-dev:armel \
libtirpc-dev:armel \ libtirpc-dev:armel \
libudev-dev:armel \ libudev-dev:armel \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armhf \ libsanlock-dev:armhf \
libsasl2-dev:armhf \ libsasl2-dev:armhf \
libselinux1-dev:armhf \ libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \ libssh-dev:armhf \
libssh2-1-dev:armhf \ libssh2-1-dev:armhf \
libtirpc-dev:armhf \ libtirpc-dev:armhf \
libudev-dev:armhf \ libudev-dev:armhf \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:i386 \ libsanlock-dev:i386 \
libsasl2-dev:i386 \ libsasl2-dev:i386 \
libselinux1-dev:i386 \ libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \ libssh-dev:i386 \
libssh2-1-dev:i386 \ libssh2-1-dev:i386 \
libtirpc-dev:i386 \ libtirpc-dev:i386 \
libudev-dev:i386 \ libudev-dev:i386 \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mips64el \ libsanlock-dev:mips64el \
libsasl2-dev:mips64el \ libsasl2-dev:mips64el \
libselinux1-dev:mips64el \ libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \ libssh-dev:mips64el \
libssh2-1-dev:mips64el \ libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \ libtirpc-dev:mips64el \
libudev-dev:mips64el \ libudev-dev:mips64el \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mipsel \ libsanlock-dev:mipsel \
libsasl2-dev:mipsel \ libsasl2-dev:mipsel \
libselinux1-dev:mipsel \ libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \ libssh-dev:mipsel \
libssh2-1-dev:mipsel \ libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \ libtirpc-dev:mipsel \
libudev-dev:mipsel \ libudev-dev:mipsel \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:ppc64el \ libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \ libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \ libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \ libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \ libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \ libtirpc-dev:ppc64el \
libudev-dev:ppc64el \ libudev-dev:ppc64el \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:s390x \ libsanlock-dev:s390x \
libsasl2-dev:s390x \ libsasl2-dev:s390x \
libselinux1-dev:s390x \ libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \ libssh-dev:s390x \
libssh2-1-dev:s390x \ libssh2-1-dev:s390x \
libtirpc-dev:s390x \ libtirpc-dev:s390x \
libudev-dev:s390x \ libudev-dev:s390x \

View File

@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -59,7 +56,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev \ libsanlock-dev \
libsasl2-dev \ libsasl2-dev \
libselinux1-dev \ libselinux1-dev \
libssh-gcrypt-dev \ libssh-dev \
libssh2-1-dev \ libssh2-1-dev \
libtirpc-dev \ libtirpc-dev \
libudev-dev \ libudev-dev \
@ -67,16 +64,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:arm64 \ libsanlock-dev:arm64 \
libsasl2-dev:arm64 \ libsasl2-dev:arm64 \
libselinux1-dev:arm64 \ libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \ libssh-dev:arm64 \
libssh2-1-dev:arm64 \ libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \ libtirpc-dev:arm64 \
libudev-dev:arm64 \ libudev-dev:arm64 \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -88,12 +80,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:armel \ libparted-dev:armel \
libpcap0.8-dev:armel \ libpcap0.8-dev:armel \
libpciaccess-dev:armel \ libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \ libreadline-dev:armel \
libsanlock-dev:armel \ libsanlock-dev:armel \
libsasl2-dev:armel \ libsasl2-dev:armel \
libselinux1-dev:armel \ libselinux1-dev:armel \
libssh-gcrypt-dev:armel \ libssh-dev:armel \
libssh2-1-dev:armel \ libssh2-1-dev:armel \
libtirpc-dev:armel \ libtirpc-dev:armel \
libudev-dev:armel \ libudev-dev:armel \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -88,16 +80,14 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:armhf \ libparted-dev:armhf \
libpcap0.8-dev:armhf \ libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \ libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \ libreadline-dev:armhf \
libsanlock-dev:armhf \ libsanlock-dev:armhf \
libsasl2-dev:armhf \ libsasl2-dev:armhf \
libselinux1-dev:armhf \ libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \ libssh-dev:armhf \
libssh2-1-dev:armhf \ libssh2-1-dev:armhf \
libtirpc-dev:armhf \ libtirpc-dev:armhf \
libudev-dev:armhf \ libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \ libxml2-dev:armhf \
systemtap-sdt-dev:armhf && \ systemtap-sdt-dev:armhf && \
eatmydata apt-get autoremove -y && \ eatmydata apt-get autoremove -y && \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -88,12 +80,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libparted-dev:i386 \ libparted-dev:i386 \
libpcap0.8-dev:i386 \ libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \ libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \ libreadline-dev:i386 \
libsanlock-dev:i386 \ libsanlock-dev:i386 \
libsasl2-dev:i386 \ libsasl2-dev:i386 \
libselinux1-dev:i386 \ libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \ libssh-dev:i386 \
libssh2-1-dev:i386 \ libssh2-1-dev:i386 \
libtirpc-dev:i386 \ libtirpc-dev:i386 \
libudev-dev:i386 \ libudev-dev:i386 \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mips64el \ libsanlock-dev:mips64el \
libsasl2-dev:mips64el \ libsasl2-dev:mips64el \
libselinux1-dev:mips64el \ libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \ libssh-dev:mips64el \
libssh2-1-dev:mips64el \ libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \ libtirpc-dev:mips64el \
libudev-dev:mips64el \ libudev-dev:mips64el \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:ppc64el \ libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \ libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \ libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \ libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \ libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \ libtirpc-dev:ppc64el \
libudev-dev:ppc64el \ libudev-dev:ppc64el \

View File

@ -26,23 +26,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libclang-rt-dev \ libclang-rt-dev \
libnbd-dev \ libnbd-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \
@ -94,7 +86,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:s390x \ libsanlock-dev:s390x \
libsasl2-dev:s390x \ libsasl2-dev:s390x \
libselinux1-dev:s390x \ libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \ libssh-dev:s390x \
libssh2-1-dev:s390x \ libssh2-1-dev:s390x \
libtirpc-dev:s390x \ libtirpc-dev:s390x \
libudev-dev:s390x \ libudev-dev:s390x \

View File

@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -59,7 +56,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev \ libsanlock-dev \
libsasl2-dev \ libsasl2-dev \
libselinux1-dev \ libselinux1-dev \
libssh-gcrypt-dev \ libssh-dev \
libssh2-1-dev \ libssh2-1-dev \
libtirpc-dev \ libtirpc-dev \
libudev-dev \ libudev-dev \
@ -67,16 +64,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -4,7 +4,7 @@
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40 FROM registry.fedoraproject.org/fedora:41
RUN dnf install -y nosync && \ RUN dnf install -y nosync && \
printf '#!/bin/sh\n\ printf '#!/bin/sh\n\
@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf install -y \ nosync dnf install -y \
audit-libs-devel \ audit-libs-devel \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
clang \ clang \
@ -44,12 +44,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -69,17 +64,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \
@ -93,6 +84,7 @@ exec "$@"\n' > /usr/bin/nosync && \
systemd-devel \ systemd-devel \
systemd-rpm-macros \ systemd-rpm-macros \
systemtap-sdt-devel \ systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \ wireshark-devel \
xen-devel && \ xen-devel && \
nosync dnf autoremove -y && \ nosync dnf autoremove -y && \

View File

@ -4,7 +4,7 @@
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40 FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \ RUN dnf install -y nosync && \
printf '#!/bin/sh\n\ printf '#!/bin/sh\n\
@ -19,7 +19,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf update -y && \ nosync dnf update -y && \
nosync dnf install -y \ nosync dnf install -y \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
codespell \ codespell \
@ -34,22 +34,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -4,7 +4,7 @@
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40 FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \ RUN dnf install -y nosync && \
printf '#!/bin/sh\n\ printf '#!/bin/sh\n\
@ -19,7 +19,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf update -y && \ nosync dnf update -y && \
nosync dnf install -y \ nosync dnf install -y \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
codespell \ codespell \
@ -34,22 +34,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -4,7 +4,7 @@
# #
# https://gitlab.com/libvirt/libvirt-ci # https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:39 FROM registry.fedoraproject.org/fedora:42
RUN dnf install -y nosync && \ RUN dnf install -y nosync && \
printf '#!/bin/sh\n\ printf '#!/bin/sh\n\
@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf install -y \ nosync dnf install -y \
audit-libs-devel \ audit-libs-devel \
augeas \ augeas \
bash-completion \ bash-completion-devel \
ca-certificates \ ca-certificates \
ccache \ ccache \
clang \ clang \
@ -44,12 +44,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -69,17 +64,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \
@ -93,6 +84,7 @@ exec "$@"\n' > /usr/bin/nosync && \
systemd-devel \ systemd-devel \
systemd-rpm-macros \ systemd-rpm-macros \
systemtap-sdt-devel \ systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \ wireshark-devel \
xen-devel && \ xen-devel && \
nosync dnf autoremove -y && \ nosync dnf autoremove -y && \

View File

@ -35,22 +35,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -35,22 +35,13 @@ exec "$@"\n' > /usr/bin/nosync && \
git \ git \
glibc-langpack-en \ glibc-langpack-en \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
kmod \
libnbd-devel \ libnbd-devel \
libxml2 \ libxml2 \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numad \
perl-base \ perl-base \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -45,12 +45,7 @@ exec "$@"\n' > /usr/bin/nosync && \
glusterfs-api-devel \ glusterfs-api-devel \
gnutls-devel \ gnutls-devel \
grep \ grep \
iproute \
iproute-tc \
iptables \
iscsi-initiator-utils \
json-c-devel \ json-c-devel \
kmod \
libacl-devel \ libacl-devel \
libattr-devel \ libattr-devel \
libblkid-devel \ libblkid-devel \
@ -70,17 +65,13 @@ exec "$@"\n' > /usr/bin/nosync && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja-build \ ninja-build \
numactl-devel \ numactl-devel \
numad \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3 \ python3 \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -34,9 +34,6 @@ RUN zypper update -y && \
glibc-locale \ glibc-locale \
glusterfs-devel \ glusterfs-devel \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl-devel \ libacl-devel \
libapparmor-devel \ libapparmor-devel \
libattr-devel \ libattr-devel \
@ -61,17 +58,12 @@ RUN zypper update -y && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja \ ninja \
numad \
open-iscsi \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3-base \ python3-base \
python3-docutils \ python3-docutils \
python3-flake8 \ python3-flake8 \

View File

@ -33,9 +33,6 @@ RUN zypper dist-upgrade -y && \
glibc-locale \ glibc-locale \
glusterfs-devel \ glusterfs-devel \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl-devel \ libacl-devel \
libapparmor-devel \ libapparmor-devel \
libattr-devel \ libattr-devel \
@ -60,17 +57,12 @@ RUN zypper dist-upgrade -y && \
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt \ libxslt \
lvm2 \
make \ make \
meson \ meson \
nfs-utils \
ninja \ ninja \
numad \
open-iscsi \
parted-devel \ parted-devel \
perl-base \ perl-base \
pkgconfig \ pkgconfig \
polkit \
python3-base \ python3-base \
python3-black \ python3-black \
python3-docutils \ python3-docutils \

View File

@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -68,16 +65,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -28,9 +28,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
gettext \ gettext \
git \ git \
grep \ grep \
iproute2 \
iptables \
kmod \
libacl1-dev \ libacl1-dev \
libapparmor-dev \ libapparmor-dev \
libattr1-dev \ libattr1-dev \
@ -68,16 +65,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libxml2-dev \ libxml2-dev \
libxml2-utils \ libxml2-utils \
locales \ locales \
lvm2 \
make \ make \
meson \ meson \
nfs-common \
ninja-build \ ninja-build \
numad \
open-iscsi \
perl-base \ perl-base \
pkgconf \ pkgconf \
polkitd \
python3 \ python3 \
python3-docutils \ python3-docutils \
python3-pytest \ python3-pytest \

View File

@ -11,8 +11,11 @@
# - RUN_PIPELINE - force creation of a CI pipeline when # - RUN_PIPELINE - force creation of a CI pipeline when
# pushing to a branch in a forked repository. Official # pushing to a branch in a forked repository. Official
# CI pipelines are triggered when merge requests are # CI pipelines are triggered when merge requests are
# created/updated. Setting this variable to a non-empty # created/updated. Setting this variable allows CI
# value allows CI testing prior to opening a merge request. # testing prior to opening a merge request. A value
# of "0" will create the pipeline but leave all jobs
# to be manually started, while "1" will immediately
# run all default jobs.
# #
# - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE, # - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE,
# but uses the CI environment (containers) from the upstream project # but uses the CI environment (containers) from the upstream project
@ -38,11 +41,13 @@
# #
# Aliases can be set for common usage # Aliases can be set for common usage
# #
# $ git config --local alias.push-ci "push -o ci.variable=RUN_PIPELINE=1" # $ git config --local alias.push-ci "push -o ci.variable=RUN_PIPELINE=0"
# $ git config --local alias.push-ci-now "push -o ci.variable=RUN_PIPELINE=1"
# #
# Allowing the less verbose invocation # Allowing the less verbose invocation
# #
# $ git push-ci # $ git push-ci (create pipeline but don't start jobs)
# $ git push-ci-now (create pipeline and start default jobs)
# #
# Pipeline variables can also be set in the repository # Pipeline variables can also be set in the repository
# pipeline config globally, or set against scheduled pipelines # pipeline config globally, or set against scheduled pipelines
@ -50,6 +55,7 @@
variables: variables:
RUN_UPSTREAM_NAMESPACE: libvirt RUN_UPSTREAM_NAMESPACE: libvirt
CONTAINER_UPSTREAM_NAMESPACE: libvirt
FF_SCRIPT_SECTIONS: 1 FF_SCRIPT_SECTIONS: 1

View File

@ -35,7 +35,7 @@
fi fi
- cat /packages.txt - cat /packages.txt
variables: variables:
IMAGE: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libvirt/ci-$NAME:latest IMAGE: $CI_REGISTRY/$CONTAINER_UPSTREAM_NAMESPACE/libvirt/ci-$NAME:latest
rules: rules:
### PUSH events ### PUSH events
@ -47,19 +47,27 @@
when: on_success when: on_success
# forks: pushes to a branch when a pipeline run in upstream env is explicitly requested # forks: pushes to a branch when a pipeline run in upstream env is explicitly requested
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1"'
when: on_success when: on_success
# forks: pushes to branches with pipeline requested # forks: pushes to branches with pipeline requested
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
variables: variables:
IMAGE: $TARGET_BASE_IMAGE IMAGE: $TARGET_BASE_IMAGE
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
variables:
IMAGE: $TARGET_BASE_IMAGE
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1"'
when: on_success when: on_success
variables: variables:
IMAGE: $TARGET_BASE_IMAGE IMAGE: $TARGET_BASE_IMAGE
@ -171,7 +179,7 @@
fi fi
- cat /packages.txt - cat /packages.txt
variables: variables:
IMAGE: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libvirt/ci-$NAME-cross-$CROSS:latest IMAGE: $CI_REGISTRY/$CONTAINER_UPSTREAM_NAMESPACE/libvirt/ci-$NAME-cross-$CROSS:latest
rules: rules:
### PUSH events ### PUSH events
@ -183,19 +191,27 @@
when: on_success when: on_success
# forks: pushes to a branch when a pipeline run in upstream env is explicitly requested # forks: pushes to a branch when a pipeline run in upstream env is explicitly requested
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1"'
when: on_success when: on_success
# forks: pushes to branches with pipeline requested # forks: pushes to branches with pipeline requested
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
variables: variables:
IMAGE: $TARGET_BASE_IMAGE IMAGE: $TARGET_BASE_IMAGE
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
variables:
IMAGE: $TARGET_BASE_IMAGE
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1"'
when: on_success when: on_success
variables: variables:
IMAGE: $TARGET_BASE_IMAGE IMAGE: $TARGET_BASE_IMAGE
@ -302,15 +318,21 @@
when: on_success when: on_success
# forks: pushes to branches with pipeline requested (including pipeline in upstream environment) # forks: pushes to branches with pipeline requested (including pipeline in upstream environment)
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE == "1"'
when: on_success when: on_success
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV && $JOB_OPTIONAL' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "0"'
when: manual when: manual
allow_failure: true allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1" && $JOB_OPTIONAL'
when: manual
allow_failure: true
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE_UPSTREAM_ENV == "1"'
when: on_success when: on_success
# upstream+forks: Run pipelines on MR, web, api & scheduled # upstream+forks: Run pipelines on MR, web, api & scheduled

View File

@ -33,15 +33,15 @@ x86_64-almalinux-9-clang:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9 TARGET_BASE_IMAGE: docker.io/library/almalinux:9
x86_64-alpine-319: x86_64-alpine-322:
extends: .native_build_job extends: .native_build_job
needs: needs:
- job: x86_64-alpine-319-container - job: x86_64-alpine-322-container
optional: true optional: true
allow_failure: false allow_failure: false
variables: variables:
NAME: alpine-319 NAME: alpine-322
TARGET_BASE_IMAGE: docker.io/library/alpine:3.19 TARGET_BASE_IMAGE: docker.io/library/alpine:3.22
x86_64-alpine-edge: x86_64-alpine-edge:
@ -70,30 +70,6 @@ x86_64-centos-stream-9:
- libvirt-rpms - libvirt-rpms
x86_64-debian-11:
extends: .native_build_job
needs:
- job: x86_64-debian-11-container
optional: true
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
x86_64-debian-11-clang:
extends: .native_build_job
needs:
- job: x86_64-debian-11-container
optional: true
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
x86_64-debian-12: x86_64-debian-12:
extends: .native_build_job extends: .native_build_job
needs: needs:
@ -127,30 +103,30 @@ x86_64-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
x86_64-fedora-39: x86_64-fedora-41:
extends: .native_build_job extends: .native_build_job
needs: needs:
- job: x86_64-fedora-39-container - job: x86_64-fedora-41-container
optional: true optional: true
allow_failure: false allow_failure: false
variables: variables:
NAME: fedora-39 NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:39 TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
- libvirt-rpms - libvirt-rpms
x86_64-fedora-40: x86_64-fedora-42:
extends: .native_build_job extends: .native_build_job
needs: needs:
- job: x86_64-fedora-40-container - job: x86_64-fedora-42-container
optional: true optional: true
allow_failure: false allow_failure: false
variables: variables:
NAME: fedora-40 NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
@ -246,110 +222,6 @@ x86_64-ubuntu-2404-clang:
# Cross build jobs # Cross build jobs
aarch64-debian-11:
extends: .cross_build_job
needs:
- job: aarch64-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: aarch64
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
armv6l-debian-11:
extends: .cross_build_job
needs:
- job: armv6l-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: armv6l
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
armv7l-debian-11:
extends: .cross_build_job
needs:
- job: armv7l-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: armv7l
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
i686-debian-11:
extends: .cross_build_job
needs:
- job: i686-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: i686
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
mips64el-debian-11:
extends: .cross_build_job
needs:
- job: mips64el-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: mips64el
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
mipsel-debian-11:
extends: .cross_build_job
needs:
- job: mipsel-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: mipsel
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
ppc64le-debian-11:
extends: .cross_build_job
needs:
- job: ppc64le-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: ppc64le
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
s390x-debian-11:
extends: .cross_build_job
needs:
- job: s390x-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: s390x
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
aarch64-debian-12: aarch64-debian-12:
extends: .cross_build_job extends: .cross_build_job
needs: needs:
@ -544,29 +416,29 @@ s390x-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
mingw32-fedora-40: mingw32-fedora-42:
extends: .cross_build_job extends: .cross_build_job
needs: needs:
- job: mingw32-fedora-40-container - job: mingw32-fedora-42-container
optional: true optional: true
allow_failure: false allow_failure: false
variables: variables:
CROSS: mingw32 CROSS: mingw32
JOB_OPTIONAL: 1 JOB_OPTIONAL: 1
NAME: fedora-40 NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
mingw64-fedora-40: mingw64-fedora-42:
extends: .cross_build_job extends: .cross_build_job
needs: needs:
- job: mingw64-fedora-40-container - job: mingw64-fedora-42-container
optional: true optional: true
allow_failure: false allow_failure: false
variables: variables:
CROSS: mingw64 CROSS: mingw64
NAME: fedora-40 NAME: fedora-42
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40 TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:42
mingw32-fedora-rawhide: mingw32-fedora-rawhide:
@ -602,7 +474,7 @@ x86_64-freebsd-13:
allow_failure: allow_failure:
exit_codes: 3 exit_codes: 3
variables: variables:
CIRRUS_VM_IMAGE_NAME: freebsd-13-3 CIRRUS_VM_IMAGE_NAME: freebsd-13-4
CIRRUS_VM_IMAGE_SELECTOR: image_family CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
INSTALL_COMMAND: pkg install -y INSTALL_COMMAND: pkg install -y
@ -617,7 +489,7 @@ x86_64-freebsd-14:
allow_failure: allow_failure:
exit_codes: 3 exit_codes: 3
variables: variables:
CIRRUS_VM_IMAGE_NAME: freebsd-14-0 CIRRUS_VM_IMAGE_NAME: freebsd-14-2
CIRRUS_VM_IMAGE_SELECTOR: image_family CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
INSTALL_COMMAND: pkg install -y INSTALL_COMMAND: pkg install -y

View File

@ -14,11 +14,11 @@ x86_64-almalinux-9-container:
NAME: almalinux-9 NAME: almalinux-9
x86_64-alpine-319-container: x86_64-alpine-322-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
variables: variables:
NAME: alpine-319 NAME: alpine-322
x86_64-alpine-edge-container: x86_64-alpine-edge-container:
@ -35,14 +35,6 @@ x86_64-centos-stream-9-container:
NAME: centos-stream-9 NAME: centos-stream-9
x86_64-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
x86_64-debian-12-container: x86_64-debian-12-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
@ -57,18 +49,18 @@ x86_64-debian-sid-container:
NAME: debian-sid NAME: debian-sid
x86_64-fedora-39-container: x86_64-fedora-41-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
variables: variables:
NAME: fedora-39 NAME: fedora-41
x86_64-fedora-40-container: x86_64-fedora-42-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
variables: variables:
NAME: fedora-40 NAME: fedora-42
x86_64-fedora-rawhide-container: x86_64-fedora-rawhide-container:
@ -109,70 +101,6 @@ x86_64-ubuntu-2404-container:
# Cross container jobs # Cross container jobs
aarch64-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-aarch64
armv6l-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-armv6l
armv7l-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-armv7l
i686-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-i686
mips64el-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-mips64el
mipsel-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-mipsel
ppc64le-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-ppc64le
s390x-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-s390x
aarch64-debian-12-container: aarch64-debian-12-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
@ -292,19 +220,19 @@ s390x-debian-sid-container:
NAME: debian-sid-cross-s390x NAME: debian-sid-cross-s390x
mingw32-fedora-40-container: mingw32-fedora-42-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
variables: variables:
JOB_OPTIONAL: 1 JOB_OPTIONAL: 1
NAME: fedora-40-cross-mingw32 NAME: fedora-42-cross-mingw32
mingw64-fedora-40-container: mingw64-fedora-42-container:
extends: .container_job extends: .container_job
allow_failure: false allow_failure: false
variables: variables:
NAME: fedora-40-cross-mingw64 NAME: fedora-42-cross-mingw64
mingw32-fedora-rawhide-container: mingw32-fedora-rawhide-container:

View File

@ -18,9 +18,13 @@ check-dco:
when: on_success when: on_success
# forks: pushes to branches with pipeline requested (including upstream env pipelines) # forks: pushes to branches with pipeline requested (including upstream env pipelines)
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE == "0"'
when: manual
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE == "1"'
when: on_success when: on_success
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE_UPSTREAM_ENV' - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE_UPSTREAM_ENV == "0"'
when: manual
- if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE_UPSTREAM_ENV == "1"'
when: on_success when: on_success
# upstream+forks: that's all folks # upstream+forks: that's all folks

View File

@ -29,23 +29,23 @@ centos-stream-9-tests:
# and libvirt-python CI jobs, so the new target needs to be introduced # and libvirt-python CI jobs, so the new target needs to be introduced
# there before it can be used here. The VM template for the target # there before it can be used here. The VM template for the target
# also needs to be created on the runner host. # also needs to be created on the runner host.
fedora-39-tests: fedora-41-tests:
extends: .integration_tests extends: .integration_tests
variables: variables:
# needed by libvirt-gitlab-executor # needed by libvirt-gitlab-executor
DISTRO: fedora-39 DISTRO: fedora-41
# can be overridden in forks to set a different runner tag # can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags: tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs: needs:
- x86_64-fedora-39 - x86_64-fedora-41
- project: libvirt/libvirt-perl - project: libvirt/libvirt-perl
job: x86_64-fedora-39 job: x86_64-fedora-41
ref: master ref: master
artifacts: true artifacts: true
- project: libvirt/libvirt-python - project: libvirt/libvirt-python
job: x86_64-fedora-39 job: x86_64-fedora-41
ref: master ref: master
artifacts: true artifacts: true
@ -53,22 +53,22 @@ fedora-39-tests:
# and libvirt-python CI jobs, so the new target needs to be introduced # and libvirt-python CI jobs, so the new target needs to be introduced
# there before it can be used here. The VM template for the target # there before it can be used here. The VM template for the target
# also needs to be created on the runner host. # also needs to be created on the runner host.
.fedora-39-upstream-qemu-tests: .fedora-41-upstream-qemu-tests:
extends: .integration_tests extends: .integration_tests
variables: variables:
# needed by libvirt-gitlab-executor # needed by libvirt-gitlab-executor
DISTRO: fedora-39 DISTRO: fedora-41
# can be overridden in forks to set a different runner tag # can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags: tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs: needs:
- x86_64-fedora-39 - x86_64-fedora-41
- project: libvirt/libvirt-perl - project: libvirt/libvirt-perl
job: x86_64-fedora-39 job: x86_64-fedora-41
ref: master ref: master
artifacts: true artifacts: true
- project: libvirt/libvirt-python - project: libvirt/libvirt-python
job: x86_64-fedora-39 job: x86_64-fedora-41
ref: master ref: master
artifacts: true artifacts: true

View File

@ -124,6 +124,9 @@ run_integration() {
DAEMONS="virtinterfaced virtlockd virtlogd virtnetworkd virtnodedevd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged" DAEMONS="virtinterfaced virtlockd virtlogd virtnetworkd virtnodedevd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged"
fi fi
# Force libvirt to use iptables to make sure libvirt-tck tests don't fail
run_cmd_quiet sudo augtool set /files/etc/libvirt/network.conf/firewall_backend "'iptables'"
echo "DAEMONS=$DAEMONS" echo "DAEMONS=$DAEMONS"
for daemon in $DAEMONS for daemon in $DAEMONS
do do

View File

@ -27,9 +27,6 @@ packages:
- glusterfs - glusterfs
- gnutls - gnutls
- grep - grep
- ip
- iptables
- iscsiadm
- json-c - json-c
- libacl - libacl
- libattr - libattr
@ -54,16 +51,12 @@ packages:
- libtirpc - libtirpc
- libudev - libudev
- libxml2 - libxml2
- lvm2
- make - make
- meson - meson
- modprobe
- netcf - netcf
- ninja - ninja
- numad
- openwsman - openwsman
- perl - perl
- pkcheck
- pkg-config - pkg-config
- portablexdr - portablexdr
- python3 - python3
@ -74,10 +67,8 @@ packages:
- rpmbuild - rpmbuild
- sanlock - sanlock
- sed - sed
- showmount
- systemd-rpm-macros - systemd-rpm-macros
- systemtap - systemtap
- tc
- wireshark - wireshark
- xen - xen
- xmllint - xmllint

View File

@ -19,7 +19,7 @@ targets:
RPM: skip RPM: skip
CC: clang CC: clang
alpine-319: x86_64 alpine-322: x86_64
alpine-edge: alpine-edge:
jobs: jobs:
@ -34,46 +34,6 @@ targets:
paths: paths:
- libvirt-rpms - libvirt-rpms
debian-11:
jobs:
- arch: x86_64
builds: false
- arch: x86_64
suffix: -clang
builds: false
- arch: aarch64
containers: false
builds: false
- arch: armv6l
containers: false
builds: false
- arch: armv7l
builds: false
- arch: i686
containers: false
builds: false
- arch: mips64el
containers: false
builds: false
- arch: mipsel
containers: false
builds: false
- arch: ppc64le
containers: false
builds: false
- arch: s390x
containers: false
builds: false
debian-12: debian-12:
jobs: jobs:
- arch: x86_64 - arch: x86_64
@ -144,7 +104,7 @@ targets:
containers: false containers: false
builds: false builds: false
fedora-39: fedora-41:
jobs: jobs:
- arch: x86_64 - arch: x86_64
artifacts: artifacts:
@ -152,7 +112,7 @@ targets:
paths: paths:
- libvirt-rpms - libvirt-rpms
fedora-40: fedora-42:
jobs: jobs:
- arch: x86_64 - arch: x86_64
artifacts: artifacts:

View File

@ -26,7 +26,7 @@ name will default to a preselected hypervisor, but it's probably not a
wise thing to do in most cases. See the `connection URI <uri.html>`__ wise thing to do in most cases. See the `connection URI <uri.html>`__
page for a full descriptions of the values allowed. page for a full descriptions of the values allowed.
OnDevice the application obtains a Once the application obtains a
`virConnectPtr <html/libvirt-libvirt-host.html#virConnectPtr>`__ `virConnectPtr <html/libvirt-libvirt-host.html#virConnectPtr>`__
connection to the hypervisor it can then use it to manage the connection to the hypervisor it can then use it to manage the
hypervisor's available domains and related virtualization resources, hypervisor's available domains and related virtualization resources,

View File

@ -206,6 +206,11 @@ Libraries
Allows using simple ruby objects to manipulate hypervisors, guests, Allows using simple ruby objects to manipulate hypervisors, guests,
storage, network etc. It is based on top of the `native ruby storage, network etc. It is based on top of the `native ruby
bindings <https://ruby.libvirt.org/>`__. bindings <https://ruby.libvirt.org/>`__.
`Perl Async bindings <https://github.com/ehuelsmann/perl-sys-async-virt#readme>`__
Perl `Sys::Async::Virt library <https://metacpan.org/pod/Sys::Async::Virt>`__
supporting the asynchronous paradigm introduced by `Future::AsyncAwait
<https://metacpan.org/pod/Future::AsyncAwait>`__ that tries to stay close to
the `Sys::Virt API <https://metacpan.org/pod/Sys::Virt>`__.
LiveCD / Appliances LiveCD / Appliances
------------------- -------------------

Some files were not shown because too many files have changed in this diff Show More