]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
34 hours agoutil: Rework virFileIsSharedFSOverride using virFileCheckParents
Jiri Denemark [Fri, 5 Dec 2025 15:52:32 +0000 (16:52 +0100)] 
util: Rework virFileIsSharedFSOverride using virFileCheckParents

The newly introduced virFileCheckParents is generic enough to be used
for checking whether a specific path or any of its parents is included
in the overrides array.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
34 hours agoutil: Fix race condition in virFileIsSharedFSOverride
Jiri Denemark [Fri, 5 Dec 2025 15:51:25 +0000 (16:51 +0100)] 
util: Fix race condition in virFileIsSharedFSOverride

Switch virFileIsSharedFSOverride to use virFileCheckParents to avoid a
race which could result in virFileCanonicalizePath to be called on a
path that does not exist anymore.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
34 hours agoutil: Fix race condition in virFileIsSharedFSType
Jiri Denemark [Fri, 5 Dec 2025 15:47:14 +0000 (16:47 +0100)] 
util: Fix race condition in virFileIsSharedFSType

virFileIsSharedFSType could end up calling statfs on a path that no
longer exists and return an error. If this happens for a path on a
shared filesystem, the caller may incorrectly consider the path as
non-shared.

Specifically, when starting a domain with TPM enabled and deciding
whether its vTPM state is stored on a shared storage, the race could
cause qemuTPMEmulatorBuildCommand to consider the state to be
non-shared. This means swtpm would be started without --migration even
when the state is actually stored on a shared storage and any attempt to
migrate such domain would fail with

    Operation not supported: the running swtpm does not support
    migration with shared storage

In fact, any caller of virFileGetExistingParent contained an inherent
TOCTOU race condition as the existing parent of a given path return by
virFileGetExistingParent may no longer exist at the time the caller
wants to check it.

This patch introduces a new virFileCheckParents API which is almost
identical to virFileGetExistingParent, but uses a supplied callback to
check each path. This new API is used in virFileIsSharedFSType to avoid
the race. The old function will later be completely removed once all
callers are switched to the new one.

Fixes: 05526b50909ff50c16e13a0b5580d41de74e3d59
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
34 hours agotests: Test virFileIsSharedFSOverride
Jiri Denemark [Fri, 5 Dec 2025 14:09:15 +0000 (15:09 +0100)] 
tests: Test virFileIsSharedFSOverride

Technically virFileIsSharedFSOverride is available on any OS, but we
need a mocked realpath() to test it. Because the virfilemock library
also mocks statfs() which is only available on Linux, we don't even try
to load the library anywhere else. Thus we need to skip testing
virFileIsSharedFSOverride on non-Linux too.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
36 hours agoqemuMigrationParamsForSave: Don't take opaque 'flags'
Peter Krempa [Thu, 4 Dec 2025 17:09:05 +0000 (18:09 +0100)] 
qemuMigrationParamsForSave: Don't take opaque 'flags'

Similarly to previous commit, 'flags' is really opaque. The function
lives in migration code and similar functions there expect migration
flags. Here we get virDomainSaveRestoreFlags. Here at least the dump
code handles it properly and passes VIR_DOMAIN_SAVE_BYPASS_CACHE rather
than VIR_DUMP_BYPASS_CACHE.

Note: We, in many cases, encourage use of 'flags' instead of a bunch of
boolean parameters. Since C doesn't do proper type checks on enums and
in fact with 'flags' we pass a binary or of some flags rather than pure
options from the enum there isn't really an elegant solution that would
be enforced by the compiler and easy on eyes. With a bunch of booleans
at least anyone reading the code will need to look up the function
definition to see the header rather than assume that passing in 'flags'
is fine without properly checking *which* flags are accepted by the
function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemuMigrationSrcToFile: Don't cross-contaminate 'flags' variable
Peter Krempa [Thu, 4 Dec 2025 16:40:33 +0000 (17:40 +0100)] 
qemuMigrationSrcToFile: Don't cross-contaminate 'flags' variable

The meaning of 'flags' is context dependant. 'qemuMigrationSrcToFile'
expects 'virDomainSaveRestoreFlags' rather than migration flags which is
not expected based on the location of the function.

Why this is wrong is clearly visible in 'doCoreDump' which passes in
'dump_flags' which are actually 'virDomainCoreDumpFlags' and the values
are different:

 VIR_DUMP_BYPASS_CACHE = (1 << 2)

 VIR_DOMAIN_SAVE_BYPASS_CACHE = 1 << 0

Since it checks only for VIR_DOMAIN_SAVE_BYPASS_CACHE pass it in as a
boolean instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agovirsh: Add completer for '--image-format' option of 'save' command
Peter Krempa [Thu, 4 Dec 2025 14:38:06 +0000 (15:38 +0100)] 
virsh: Add completer for '--image-format' option of 'save' command

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoinclude: Create constants for save image format values
Peter Krempa [Thu, 4 Dec 2025 14:22:56 +0000 (15:22 +0100)] 
include: Create constants for save image format values

The 'VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT' typed parameter for
'virDomainSaveParams' is implemented as a string but really encodes an
enumeration of supported types. We can't change the format any more but
can export the corresponding types as constants.

Additionally this also mentions the missing 'sparse' format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemu: conf: Use proper type for (save|dump|snapshot)ImageFormat
Peter Krempa [Thu, 4 Dec 2025 13:49:17 +0000 (14:49 +0100)] 
qemu: conf: Use proper type for (save|dump|snapshot)ImageFormat

Extract the definition of the enum into a separate header file and
convert the config struct to use the proper types.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemu: Use 'virQEMUSaveFormat' type everywhere except qemu_conf
Peter Krempa [Thu, 4 Dec 2025 13:38:19 +0000 (14:38 +0100)] 
qemu: Use 'virQEMUSaveFormat' type everywhere except qemu_conf

Convert all code refering to the save image type to use the proper enum
value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemuSnapshotPrepare: Prohibit 'manual' disk snapshot mode with VIR_DOMAIN_SNAPSHOT_CR...
Peter Krempa [Mon, 1 Dec 2025 15:50:09 +0000 (16:50 +0100)] 
qemuSnapshotPrepare: Prohibit 'manual' disk snapshot mode with VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag

If the snapshot has a disk using 'manual' snapshot mode we keep the VM
paused until the user resumes it (presumably after they've done steps to
take the disk snapshot).

Since quiescing is done via the guest agent this means it will not be
possible while the VM is paused.

Rather than trying to implement complex recovery from this state prevent
the use of VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE for the snapshot. The user
still can call virDomainFSFreeze/virDomainFSThaw manually.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemu: snapshot: Setup disks for manual snapshot only when the VM is actually paused
Peter Krempa [Mon, 1 Dec 2025 15:36:16 +0000 (16:36 +0100)] 
qemu: snapshot: Setup disks for manual snapshot only when the VM is actually paused

When creating a snapshot with 'VIR_DOMAIN_SNAPSHOT_CREATE_LIVE' the VM
is paused only after dumping the memory state.

This means that also the steps to do a 'manual' disk snapshot
(deactivation of the block nodes in qemu) must happen only once the VM
is paused.

Move the manual snapshot setup code after the memory snapshot code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
36 hours agoqemuMigrationSrcToFile: Don't leak 'qemuFDPass' in cleanup path
Peter Krempa [Tue, 2 Dec 2025 21:16:24 +0000 (22:16 +0100)] 
qemuMigrationSrcToFile: Don't leak 'qemuFDPass' in cleanup path

A temporary 'qemuFDPass' is used when cleaning up after a migration to a
file but it's not freed after use. Declare it as autoptr.

Fixes: c2518f7bc7d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2 days agoqemu: Treat memory device source nodemask as strict NUMA policy
Michal Privoznik [Tue, 2 Dec 2025 11:26:28 +0000 (12:26 +0100)] 
qemu: Treat memory device source nodemask as strict NUMA policy

A memory device can have <nodemask/> which specifies which host
NUMA nodes the memory should be allocated from (currently
supported for dimm, virtio-mem and sgx-epc models).
But when generating corresponding command line for the device,
the NUMA policy is taken from the guest NUMA node that
corresponds to the memory device (as defined by target/node) or
overall domain NUMA policy (as defined by <numatune/>).

This may lead to memory being allocated from unexpected NUMA
node. For instance, if the memory device has
<nodemask>0</nodemask> and domain has <numatune> <memory
mode='preferred' nodeset='1'/> </numatune> then the cmd line for
the memory device also has just "policy":"preferred".

Treat <nodemask/> as mode='strict'.

But I agree that this is kind of nonsense configuration. Why
would somebody want to prefer one NUMA node but then configure
memory device to allocate NUMA from the other?

Resolves: https://issues.redhat.com/browse/RHEL-114415
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 days agoqemuxmlconftest: Introduce memory-hotplug-numa-preferred test case
Michal Privoznik [Tue, 2 Dec 2025 11:20:02 +0000 (12:20 +0100)] 
qemuxmlconftest: Introduce memory-hotplug-numa-preferred test case

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 days agoqemu.conf.in: Fix some typos
Jaak Ristioja [Fri, 5 Dec 2025 22:00:11 +0000 (00:00 +0200)] 
qemu.conf.in: Fix some typos

Signed-off-by: Jaak Ristioja <jaak@ristioja.ee>
3 days agoqemu: tpm: Account for possible migration without actually sharing storage
Peter Krempa [Mon, 1 Dec 2025 10:35:32 +0000 (11:35 +0100)] 
qemu: tpm: Account for possible migration without actually sharing storage

The current logic in 'qemuTPMEmulatorBuildCommand' skips all setup if
the *location* of the data is on what we'd consider shared storage.

This means that if the location is not actually shared (e.g. it's shared
betweeh some other hosts than the two doing the migration) and the path
wasn't ever used (e.g. by migrating out) from the host where we're
migrating into the complete setup of the location would be skipped even
when it doesn't exist.

Fix the logic by skipping only some of the setup steps so that
'qemuTPMEmulatorCreateStorage' can still create the storage if it
doesn't exist.

The rest of the code then needs to take the 'created' flag returned from
'qemuTPMEmulatorCreateStorage' into account.

Fixes: 68103e9daf633b789428fedef56f816c92f6ee75
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 days agoNEWS: Mention the passt hostname and fqdn attributes
Han Han via Devel [Fri, 5 Dec 2025 09:31:30 +0000 (17:31 +0800)] 
NEWS: Mention the passt hostname and fqdn attributes

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6 days agoqemu: Use pci_bus to identify multi-smmuv3 model
Nathan Chen via Devel [Tue, 2 Dec 2025 19:59:47 +0000 (11:59 -0800)] 
qemu: Use pci_bus to identify multi-smmuv3 model

Use presence of non-negative pci_bus to identify multi-smmuv3
IOMMU model, instead of the niommus attribute. This allows for
specifying a single arm-smmuv3 on the qemu command line,
instead of both the virt-machine smmuv3 and arm-smmuv3
being specified at the same time.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Fixes: e70c4d54d365 conf: Support multiple device-pluggable smmuv3 IOMMUs
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 days agotests: add test for a single per-device smmuv3
Ján Tomko [Fri, 5 Dec 2025 07:50:51 +0000 (08:50 +0100)] 
tests: add test for a single per-device smmuv3

Signed-off-by: Ján Tomko <jtomko@redhat.com>
8 days agoci: refresh with 'lcitool manifest'
Michal Privoznik [Wed, 3 Dec 2025 15:34:18 +0000 (16:34 +0100)] 
ci: refresh with 'lcitool manifest'

Update FreeBSD to their new minor versions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
9 days agolib: Avoid changing const strings via strchr() and friends
Michal Privoznik [Wed, 26 Nov 2025 13:50:11 +0000 (14:50 +0100)] 
lib: Avoid changing const strings via strchr() and friends

There's new commit in glibc [1] which makes memchr(), strchr(),
strrchr(), strpbrk() and strstr() reflect type of the input
string. If it's a constant string, then the return type of these
functions is also 'const char *'. But this change tickles
-Wincompatible-pointer-types-discards-qualifiers warning.

And indeed, there are some places where we use a 'char *' typed
variable to store the retval, or even misuse the fact 'char *' is
returned and modify const string.

To fix this, a couple of different approaches is used:

  a) switch variable type to 'const char *',
  b) switch argument to 'char *' (in a few places we have
     strdup()-ed) the const string already,
  c) strdup() the string and use b).

1: https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agoiptablesPrivateChainCreate: Avoid modifying const string
Michal Privoznik [Thu, 27 Nov 2025 11:23:46 +0000 (12:23 +0100)] 
iptablesPrivateChainCreate: Avoid modifying const string

The iptablesPrivateChainCreate() function is given an array of
const strings. This constitutes a promise to the caller that the
data is not modified. But inside the data is modified anyway (to
cut out some parts of the data). Well, with a help from
g_strdup() the promise can be kept.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agoiptablesPrivateChainCreate: Switch to STRSKIP()
Michal Privoznik [Wed, 26 Nov 2025 14:05:50 +0000 (15:05 +0100)] 
iptablesPrivateChainCreate: Switch to STRSKIP()

The body of iptablesPrivateChainCreate() uses STRPREFIX() to
match strings starting with certain prefix. Then it uses pointer
arithmetic to skip the prefix. Well, that's exactly what
STRSKIP() is meant to do. Switch the body to use the latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agoiptablesPrivateChainCreate: Rename @tmp variable
Michal Privoznik [Wed, 26 Nov 2025 15:32:11 +0000 (16:32 +0100)] 
iptablesPrivateChainCreate: Rename @tmp variable

The iptablesPrivateChainCreate() function gets a NULL terminated
array of strings (@lines argument), each item representing one
line of iptables output. Currently, the variable used to iterate
over the array is named 'tmp' which is not very descriptive.
Rename it to 'line'.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agovirSkipSpacesBackwards: Turn @endp into const
Michal Privoznik [Wed, 26 Nov 2025 09:05:49 +0000 (10:05 +0100)] 
virSkipSpacesBackwards: Turn @endp into const

The aim of virSkipSpacesBackwards() is find the first space
trailing character in given string, For instance, if the input is
"Something whitespacey   ", then the output should be pointing to
the very first space after "y".

Problem here is that the input string is constant, but the
returned pointer is non-constant. This is confusing, a caller
shouldn't be able to modify the string, since the input was a
constant string.

Therefore, make the function return a const pointer too.

Under the hood the function used virTrimSpaces() which under some
circumstances could modify the input string. A trick was used to
hide this fact away, but to be double sure rewrite the function's
body.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agovirfirewalltest: Introduce testIPtablesSetupPrivateChains()
Michal Privoznik [Wed, 26 Nov 2025 20:40:06 +0000 (21:40 +0100)] 
virfirewalltest: Introduce testIPtablesSetupPrivateChains()

When the network driver starts up it may inject some firewall
rules (e.g. for a network with NAT). So far, this scenario wasn't
covered in our test suite. The reason for adding this test is
twofold: the first, check we add correct rules, the second is to
cover iptablesPrivateChainCreate() as its implementation is soon
to be changed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agovirstringtest: Introduce a test for virSkipSpacesBackwards()
Michal Privoznik [Wed, 26 Nov 2025 09:05:23 +0000 (10:05 +0100)] 
virstringtest: Introduce a test for virSkipSpacesBackwards()

The signature and implementation of virSkipSpacesBackwards() is
soon about to change. Introduce a test case to make sure its
behaviour stays the same.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 days agovircommand: Update documentation to virCommandSetDryRun()
Michal Privoznik [Wed, 26 Nov 2025 19:41:47 +0000 (20:41 +0100)] 
vircommand: Update documentation to virCommandSetDryRun()

Throughout years, virCommandSetDryRun() has gained more
functionality and arguments. But:

1) not all arguments are covered in documentation,
2) the example wouldn't even compile.

Expand the documentation to reflect current behaviour.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
10 days agocpu_map: update vmx-* features
Hector Cao [Mon, 24 Nov 2025 13:40:30 +0000 (14:40 +0100)] 
cpu_map: update vmx-* features

the vmx-* features are currently decoded from the 32-lower bits
(EAX) of the MSR 64-bit values. They should be decoded instead
from the 32-higher bits (EDX).

Signed-off-by: Hector Cao <hector.cao@canonical.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
10 days agocpu_map: fix sync script to extract correctly vmx-* features
Hector Cao [Mon, 24 Nov 2025 13:40:29 +0000 (14:40 +0100)] 
cpu_map: fix sync script to extract correctly vmx-* features

The src/cpu_map/x86_features.xml file contains the definition
of all x86 CPU features, these definitions specify how we can
decode the feature support fom the CPUID or MSR values.

The helper script sync_qemu_features_i386.py builds the
x86_features.xml file from QEMU source code to be in sync
with supported features in QEMU. This helper script parses
QEMU target/i386/cpu.c file looking for CPU feature definitions
and convert them into x86_features.xml contents.

This is the resulting definition for the vmx-intr-exit feature
encoded in the MSR 0x48d.

  <!-- msr 0x0000048d -->
  <feature name='vmx-intr-exit'>
    <msr index='0x0000048d' edx='0x00000000' eax='0x00000001'/>
  </feature>

EAX holds the 32 lower bits of the MSRE 64-bits value and should
not be used to detect the VMX-* features. Indeed, VMX-* bit
position should be parsed from QEMU source code in the 32 higher
bits of the corresponding MSR value.

This commit fixes this issue by using the 32 higher bits (EDX)
to represent VMX-* features.

Signed-off-by: Hector Cao <hector.cao@canonical.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
10 days agospec: Fix RPM build when %{fedora} is undefined
Jiri Denemark [Mon, 1 Dec 2025 12:09:20 +0000 (13:09 +0100)] 
spec: Fix RPM build when %{fedora} is undefined

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 days agoPost-release version bump to 12.0.0
Jiri Denemark [Mon, 1 Dec 2025 10:59:59 +0000 (11:59 +0100)] 
Post-release version bump to 12.0.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 days agoRelease of libvirt-11.10.0 v11.10.0
Jiri Denemark [Mon, 1 Dec 2025 10:57:01 +0000 (11:57 +0100)] 
Release of libvirt-11.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
11 days agoTranslated using Weblate (Spanish)
Fco. Javier F. Serrador [Sun, 30 Nov 2025 17:58:33 +0000 (17:58 +0000)] 
Translated using Weblate (Spanish)

Currently translated at 79.1% (8713 of 11005 strings)

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

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
13 days agoNEWS: Mention CVE-2025-13193 and improvements for block stats/config and backups
Peter Krempa [Fri, 28 Nov 2025 14:54:30 +0000 (15:54 +0100)] 
NEWS: Mention CVE-2025-13193 and improvements for block stats/config and backups

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
13 days agorpm: disable QEMU driver on non-64-bit arches for Fedora >= 44
Daniel P. Berrangé [Thu, 27 Nov 2025 14:10:22 +0000 (14:10 +0000)] 
rpm: disable QEMU driver on non-64-bit arches for Fedora >= 44

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
13 days agonews: document improved certs, host validate details & TDX fix
Daniel P. Berrangé [Thu, 27 Nov 2025 13:59:52 +0000 (13:59 +0000)] 
news: document improved certs, host validate details & TDX fix

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
13 days agoformatdomaincaps: Fix typo in Hyper-V Enlightenments section
Jiri Denemark [Fri, 28 Nov 2025 07:57:21 +0000 (08:57 +0100)] 
formatdomaincaps: Fix typo in Hyper-V Enlightenments section

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
13 days agoNEWS: Fix incoming migration to QEMU 10.0.0
Jiri Denemark [Thu, 27 Nov 2025 14:15:46 +0000 (15:15 +0100)] 
NEWS: Fix incoming migration to QEMU 10.0.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
13 days agoNEWS: Add CVE-2025-12748
Martin Kletzander [Fri, 28 Nov 2025 10:03:08 +0000 (11:03 +0100)] 
NEWS: Add CVE-2025-12748

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoNEWS: Document features/improvements/bug fixes I've participated in
Michal Privoznik [Thu, 27 Nov 2025 13:19:58 +0000 (14:19 +0100)] 
NEWS: Document features/improvements/bug fixes I've participated in

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agosrc: fix redundant/misleading build conditional for KVM MSR code
Daniel P. Berrangé [Mon, 24 Nov 2025 13:50:22 +0000 (13:50 +0000)] 
src: fix redundant/misleading build conditional for KVM MSR code

The condition

   WITH_LINUX_KVM_H && (defined(__linux__) || defined(__FreeBSD__))

is redundant. If the meson check for linux/kvm.h succeeded, we
must be on a Linux host and cannot be on a FreeBSD host. Remove
these redundant OS conditions from the MSR code to stop misleading
readers.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoTranslated using Weblate (Chinese (Simplified) (zh_CN)) v11.10.0-rc2
jianqing yan [Thu, 27 Nov 2025 06:58:32 +0000 (06:58 +0000)] 
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 97.8% (10763 of 11005 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
2 weeks agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Thu, 27 Nov 2025 06:58:31 +0000 (06:58 +0000)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (11005 of 11005 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2 weeks agoTranslated using Weblate (Portuguese)
Américo Monteiro [Thu, 27 Nov 2025 06:58:30 +0000 (06:58 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 100.0% (11005 of 11005 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
Translated using Weblate (Portuguese)

Currently translated at 100.0% (11005 of 11005 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2 weeks agoTranslated using Weblate (Korean)
김인수 [Thu, 27 Nov 2025 06:58:30 +0000 (06:58 +0000)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (11005 of 11005 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% (10972 of 11005 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2 weeks agoci: refresh with 'lcitool manifest'
Michal Privoznik [Fri, 21 Nov 2025 14:19:49 +0000 (15:19 +0100)] 
ci: refresh with 'lcitool manifest'

- Add AlmaLinux 10
- Add CentOS Stream 10
- Add Fedora 43
- Remove EOL Fedora 41
- Switch mingw from Fedora 42 to Fedora 43
- Switch integration tests from Fedora 41 to Fedora 43

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoNEWS: Document Hyper-V virttype for Qemu Domains
Praveen K Paladugu [Tue, 25 Nov 2025 01:11:32 +0000 (19:11 -0600)] 
NEWS: Document Hyper-V virttype for Qemu Domains

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoUpdate translation files
Hosted Weblate [Tue, 25 Nov 2025 12:21:36 +0000 (12:21 +0000)] 
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>
2 weeks agopo: Refresh potfile for v11.10.0 v11.10.0-rc1
Jiri Denemark [Tue, 25 Nov 2025 12:10:14 +0000 (13:10 +0100)] 
po: Refresh potfile for v11.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoTranslated using Weblate (Italian)
Salvatore Cocuzza [Sun, 23 Nov 2025 07:06:20 +0000 (07:06 +0000)] 
Translated using Weblate (Italian)

Currently translated at 70.4% (7734 of 10976 strings)

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

Signed-off-by: Salvatore Cocuzza <info@salvatorecocuzza.it>
2 weeks agoTranslated using Weblate (Portuguese (Brazil))
Renan Birck Pinheiro [Sun, 23 Nov 2025 07:06:20 +0000 (07:06 +0000)] 
Translated using Weblate (Portuguese (Brazil))

Currently translated at 44.0% (4837 of 10976 strings)

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

Signed-off-by: Renan Birck Pinheiro <renan.birck.pinheiro@gmail.com>
Translated using Weblate (Portuguese (Brazil))

Currently translated at 44.0% (4834 of 10976 strings)

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

Signed-off-by: Renan Birck Pinheiro <renan.birck.pinheiro@gmail.com>
2 weeks agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Sun, 23 Nov 2025 07:06:18 +0000 (07:06 +0000)] 
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 97.8% (10739 of 10976 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
2 weeks agoTranslated using Weblate (Czech)
Pavel Borecki [Sun, 23 Nov 2025 07:06:18 +0000 (07:06 +0000)] 
Translated using Weblate (Czech)

Currently translated at 94.4% (10365 of 10976 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>
2 weeks agoTranslated using Weblate (Czech)
Weblate [Sun, 23 Nov 2025 07:06:17 +0000 (07:06 +0000)] 
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
Translated using Weblate (Czech)

Currently translated at 94.4% (10367 of 10976 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2 weeks agoTranslated using Weblate (Korean)
김인수 [Sun, 23 Nov 2025 07:06:16 +0000 (07:06 +0000)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10976 of 10976 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% (10975 of 10976 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 100.0% (10976 of 10976 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2 weeks agoTranslated using Weblate (Portuguese)
Américo Monteiro [Sun, 23 Nov 2025 07:06:15 +0000 (07:06 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 100.0% (10976 of 10976 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
Translated using Weblate (Portuguese)

Currently translated at 100.0% (10976 of 10976 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
Translated using Weblate (Portuguese)

Currently translated at 99.8% (10964 of 10976 strings)

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

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
2 weeks agoqemuxmlconftest: Update 'aarch64' tests using 'virt-4.2' machine type
Peter Krempa [Mon, 24 Nov 2025 09:46:47 +0000 (10:46 +0100)] 
qemuxmlconftest: Update 'aarch64' tests using 'virt-4.2' machine type

In the upcoming qemu-10.2 release the 'virt-4.2' machine type will be
removed.

To preserve the spirit of the test pin the existing test to qemu-10.0
and add a new version using 'virt-10.0' machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoqemuxmlconftest: Update 'aarch64' tests using 'virt-4.0' machine type
Peter Krempa [Mon, 24 Nov 2025 09:33:25 +0000 (10:33 +0100)] 
qemuxmlconftest: Update 'aarch64' tests using 'virt-4.0' machine type

In the upcoming qemu-10.2 release the 'virt-4.0' machine type will be
removed. Update all existing tests which use it to 'virt-10.0' which is
currently present in our caps dump.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoqemucapabilitiestest: Update 'caps_10.2.0_x86_64' to 'v10.2.0-rc1-38-gfb241d0a1f'
Peter Krempa [Mon, 3 Nov 2025 12:04:09 +0000 (13:04 +0100)] 
qemucapabilitiestest: Update 'caps_10.2.0_x86_64' to 'v10.2.0-rc1-38-gfb241d0a1f'

Notable changes:
 - New 'postcopy-device' migration state
 - New 'exit-with-parent' option
 - Features 'guest_tunnel_csum', 'host_tunnel', 'host_tunnel_csum',
   'guest_tunnel' of 'virtio-net-pci' are now enabled by default
 - 'extended-tseg-mbytes' is now 64 for 'mch' device

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoNEWS: mention VNC 'wait' attribute for bhyve
Roman Bogorodskiy [Sat, 22 Nov 2025 05:18:50 +0000 (06:18 +0100)] 
NEWS: mention VNC 'wait' attribute for bhyve

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agodocs: bhyve: document VNC's wait attribute
Roman Bogorodskiy [Fri, 21 Nov 2025 17:21:44 +0000 (18:21 +0100)] 
docs: bhyve: document VNC's wait attribute

Document the new VNC's 'wait' attribute in formatdomain.rst and
drvbhyve.rst.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agospec: Fix 'libvirt-daemon-driver-storage-zfs' on Fedora 43 and newer
Peter Krempa [Mon, 24 Nov 2025 07:42:56 +0000 (08:42 +0100)] 
spec: Fix 'libvirt-daemon-driver-storage-zfs' on Fedora 43 and newer

On Fedora 43 and newer the 'fuse-zfs' package was removed. Commit
bd30147e740 added an 'Obsoletes' directive so that the storage driver
core package will update properly but hardcoded the obsoleted version
as 11.4 (when the change was comitted) similarly to the old sheepdog/rbd
packages and disabled the build.

Now it is still possible to obtain ZFS support from other means and it
may be useful for users to have libvirt's ZFS backend. This patch thus:

 - re-enables build of 'libvirt-daemon-driver-storage-zfs' on Fedora
 - removes 'libvirt-daemon-driver-storage-zfs' as 'Requires dependency
   from 'daemon-driver-storage' meta-package on Fedora 43 and newer
 - removes dependancy on '/sbin/zpool' and '/sbin/zfs' on Fedora 43
   and newer

With this the package still is built and installable but will require
users to get their ZFS support installed somehow.

Fixes: bd30147e740d49fdb5844160e480ca34611f75e5
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoAdd support for 'dpofua' setting for SCSI disks
Peter Krempa [Fri, 21 Nov 2025 13:46:21 +0000 (14:46 +0100)] 
Add support for 'dpofua' setting for SCSI disks

Add the 'dpofua' setting in the XML and for the qemu driver.

DPO - Disable Page Out and FUA - Force Unit Access are two features
implemented by SCSI disks (either both together or neither of them)
which influence how caching is handled. QEMU provides a good default
but in certain specific occasions changing the default may have
performance benefits.

Add support for setting them via the XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2 weeks agovirDomainDiskDefCheckABIStability: Add missing check for 'removable' property
Peter Krempa [Fri, 21 Nov 2025 13:39:40 +0000 (14:39 +0100)] 
virDomainDiskDefCheckABIStability: Add missing check for 'removable' property

The 'removable' state is guest-visible.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2 weeks agodocs: page.xsl: Convert repository edit URI into a parameter
Peter Krempa [Sun, 23 Nov 2025 15:48:30 +0000 (16:48 +0100)] 
docs: page.xsl: Convert repository edit URI into a parameter

Allow other sub-projects using the XSL template without modification.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agodocs: site.xsl: Use separate 'asset_href_base' and 'link_href_base'
Peter Krempa [Sun, 23 Nov 2025 14:42:23 +0000 (15:42 +0100)] 
docs: site.xsl: Use separate 'asset_href_base' and 'link_href_base'

While our main page uses same argument for both to ensure that the
linking works also when browsed locally sub-projects such as
libvirt-wiki and libvirt-security-notice will want to pull 'site.xsl' as
is into their build assets. Pass both arguments via the build system so
that we don't have to carry distinct instances.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agodocs: css: Split out any main-page CSS to local.css
Peter Krempa [Sun, 23 Nov 2025 14:19:25 +0000 (15:19 +0100)] 
docs: css: Split out any main-page CSS to local.css

Our other sub-projects such as the libvirt-wiki and soon also the
libvirt-security-notices will use the same CSS via asset import script.

Move any specifics into 'local.css' which will be defined by the
sub-projects so that 'main.css' can be imported directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agodocs: index: Link to security notices from home page
Peter Krempa [Sun, 23 Nov 2025 14:10:48 +0000 (15:10 +0100)] 
docs: index: Link to security notices from home page

Our main page mentions security notices which we host at
https://security.libvirt.org but links to them only from the security
process page. Since we already have the wording there, turn it directly
into a link.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agokbase: Add note about preserving VM on shutdown to backup article
Peter Krempa [Wed, 19 Nov 2025 07:49:04 +0000 (08:49 +0100)] 
kbase: Add note about preserving VM on shutdown to backup article

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: backup: Add support for VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN
Peter Krempa [Thu, 13 Nov 2025 15:26:43 +0000 (16:26 +0100)] 
qemu: backup: Add support for VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN

Implement the support for VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN
which will keep the qemu process around while the backup is still
running.

The above is achieved by avoiding killing the qemu process in the
shutdown qemu monitor event handlers. Instead 'system_reset' QMP command
is issued and the domain object is transitioned into _PAUSED state in
sync with what qemu does.

Now once the backup job finishes (or is cancelled e.g. for pull mode
backups) the backup job termination code re-asseses if the qemu process
needs to be killed or the VM was re-started by un-pausing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agolib: Introduce VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN flag
Peter Krempa [Thu, 13 Nov 2025 15:12:08 +0000 (16:12 +0100)] 
lib: Introduce VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN flag

This flag will instruct the hypervisor driver to keep the VM around
while the backup is running if the guest OS decides to shut down, so
that the backup can be finished.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agolib: Introduce VIR_DOMAIN_EVENT_SUSPENDED_GUEST_SHUTDOWN event reason
Peter Krempa [Tue, 18 Nov 2025 14:45:22 +0000 (15:45 +0100)] 
lib: Introduce VIR_DOMAIN_EVENT_SUSPENDED_GUEST_SHUTDOWN event reason

Upcoming patches will introduce the possibility for the domain to be
kept paused after the guest OS shuts itself down. It'll allow jobs
such as backup to finish as e.g. in the qemu driver it requires the qemu
process.

Add an the appropriate reason for the VIR_DOMAIN_EVENT_SUSPENDED
lifecycle event.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemuBlockJobProcessEventConcludedBackup: Notify the backup job later
Peter Krempa [Thu, 13 Nov 2025 16:15:57 +0000 (17:15 +0100)] 
qemuBlockJobProcessEventConcludedBackup: Notify the backup job later

Move the notification to the backup job after finishing the cleanup of
the current block job the backup operation consists of.

Currently the termination of the blockjob would e.g. delete the scratch
files before they are detached from qemu.

In later patches the termination of the backup job may cause the qemu
process to be killed (if the guest OS shut down but the qemu process
was being kept alive to finish the backup) which would cause errors in
the monitor commands for dismissing the block job.

Since the NBD server still needs to be terminated first as otherwise
the scratch files can't be unplugged from qemu we need to split the
operation into two. First the NBD server is terminated, then the
current block job is finalized and then the backup job is notified.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: backup: Don't attempt to stop the NBD server twice
Peter Krempa [Wed, 19 Nov 2025 08:11:18 +0000 (09:11 +0100)] 
qemu: backup: Don't attempt to stop the NBD server twice

When notifying the backup code about termination of the block job which
is part of a backup operation the code attempts to terminate the NBD
server. This is done for every blockjob so could cause us to attempt to
terminate the NBD server multiple times which doesn't cause problems but
generates spurious errors.

Add a flag that the NBD server was stopped and do it just once. Don't
bother storing the flag in the status XML as it's just for the shutdown
phase.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemuProcessReconnect: Continue reconnection if VM untergoes fake-reboot
Peter Krempa [Wed, 19 Nov 2025 09:19:29 +0000 (10:19 +0100)] 
qemuProcessReconnect: Continue reconnection if VM untergoes fake-reboot

'qemuProcessShutdownOrReboot' may or may not kill the VM. In
'qemuProcessReconnect' if we decided that the VM was in a state
requiring 'qemuProcessShutdownOrReboot' to be called we'd stop the
reconnection unconditionally.

Now if the VM ought to undergo a fake reboot we really need to reconnect
to the process because the process will be kept around for much longer.

Make qemuProcessShutdownOrReboot return whether it killed the VM and
continue the reconnection if it didn't.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agovirDomainNestedJobAllowed: Allow VIR_JOB_MODIFY_MIGRATION_SAFE if VIR_JOB_MODIFY...
Peter Krempa [Tue, 18 Nov 2025 16:09:33 +0000 (17:09 +0100)] 
virDomainNestedJobAllowed: Allow VIR_JOB_MODIFY_MIGRATION_SAFE if VIR_JOB_MODIFY is allowed

The VIR_JOB_MODIFY_MIGRATION_SAFE is supposed to be a subset of _MODIFY
jobs which are allowed during migration.

Now with async jobs which allow VIR_JOB_MODIFY (namely the backup job)
it shouldn't be required to explicitly mention
VIR_JOB_MODIFY_MIGRATION_SAFE since we already allow everything.

Adjust the logic in virDomainNestedJobAllowed to accept
VIR_JOB_MODIFY_MIGRATION_SAFE if VIR_JOB_MODIFY is allowed so that other
places can simply allow the latter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: always report s390 prot-virt feature in domain caps
Daniel P. Berrangé [Thu, 20 Nov 2025 17:42:35 +0000 (17:42 +0000)] 
qemu: always report s390 prot-virt feature in domain caps

Our preference is to unconditionally report all features known
to libvirt code, rather than pre-filter them by architecture.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoqemu: always report TDX feature caps on x86
Daniel P. Berrangé [Thu, 20 Nov 2025 11:34:45 +0000 (11:34 +0000)] 
qemu: always report TDX feature caps on x86

Currently domain capabilities will only ever report

    <tdx supported='yes'/>

so it is not possible to determine whether libvirt itself is
new enough to have TDX support or not, vs the host OS lacking
it.

For SEV and s390 prot-virt, the capability is always reported
whether supported or not, so do likewise for TDX, so other
x86 hosts get:

    <tdx supported='no'/>

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoqemu: correctly detect working TDX support
Daniel P. Berrangé [Thu, 20 Nov 2025 11:24:31 +0000 (06:24 -0500)] 
qemu: correctly detect working TDX support

Querying existence of the 'tdx-guest' type merely tells us whether
QEMU has been compiled with TDX support, not whether it is usable
on the host. Thus QEMU was incorrectly reporting

    <tdx supported='yes'/>
    ...
    <launchSecurity supported='yes'>
      <enum name='sectype'>
        <value>tdx</value>
      </enum>
    </launchSecurity>

on every platform with new enough QEMU.

Unfortunately an earlier patch for a 'query-tdx-capabilities' QMP
command in QEMU was dropped, so there is no way to ask QEMU whether
it can launch a TDX guest. Libvirt must directly query the KVM
device and ask for supported VM types.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agodocs: describe support for multiple certs & PQC config
Daniel P. Berrangé [Thu, 6 Nov 2025 12:47:55 +0000 (12:47 +0000)] 
docs: describe support for multiple certs & PQC config

This describes the new index based certificate naming scheme, and
how to create & deploy certificates for post-quantum cryptography.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: support loading multiple certificate identities
Daniel P. Berrangé [Thu, 6 Nov 2025 11:46:49 +0000 (11:46 +0000)] 
rpc: support loading multiple certificate identities

In addition to servercert.pem / serverkey.pem, we now also support
loading servercert{N}.pem / serverkey{N}.pem, for values of {N}
between 0 and 3 inclusive.

If servercert0.pem is provided, then using servercert.pem becomes
optional. The first missing index terminates the loading process.
eg if servercert1.pem is NOT present, then it will NOT attempt to
look for servercert2.pem / servercert3.pem.

This also applies to clientcert.pem / clientkey.pem.

This facilitates the transition to post-quantum cryptography by
allowing loading of certificates with different algorithms,
eg traditional RSA based cert, and optional ECC based cert or
MLDSA based cert for PQC.

The use of CA cert files is unchanged with only a single cacert.pem
loaded. WHen multiple CAs are needed they must be concatenated in
the single cacert.pem file.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: reduce duplication when locating credentials
Daniel P. Berrangé [Wed, 5 Nov 2025 17:42:11 +0000 (17:42 +0000)] 
rpc: reduce duplication when locating credentials

The three different APIs for locating credentials differ only in
what directories they search and their policy for missing files.
Their code can be collapsed onto a single helper method. This
will greatly facilitate the subsequent patch that expands the
logic to locate many certificate files.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: move file access checks into TLS config API
Daniel P. Berrangé [Wed, 5 Nov 2025 13:23:55 +0000 (13:23 +0000)] 
rpc: move file access checks into TLS config API

A future patch will require fule access checks to be done
as part of locating the certificate files, as we will have
the ability to load many more files, most of which will be
optional.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: skip fallback when using custom PKI path
Daniel P. Berrangé [Tue, 4 Nov 2025 09:32:54 +0000 (09:32 +0000)] 
rpc: skip fallback when using custom PKI path

The virNetTLSConfigCustomCreds will always set the cert paths
to non-NULL strings. This in turn means that the later call to
virNetTLSConfigSystemCreds will be a no-op aside from duplicating
log information. Refactor the conditions so that the call to
find system credentials is skipped when using custom credentials.

While this patch could have just done an early "return 0" after
the virNetTLSConfigCustomCreds call, an "} else {" branch is
instead added, since this will facilitate a later patch in this
series which prefers a common return path.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoremote: support specifying multiple keys/certs in libvirtd.conf
Daniel P. Berrangé [Mon, 3 Nov 2025 17:27:26 +0000 (17:27 +0000)] 
remote: support specifying multiple keys/certs in libvirtd.conf

The 'cert_file' and 'key_file' parameters in libvirtd.conf only
permit a single cert/key. To support hybrid deployments for PQC,
we need to be able to request multiple certs/keys. This involves
new 'cert_files' and 'key_files' config parameters that accept a
list of filenames. The new parameters are mutually exclusive with
the old parameters.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: add support for loading multiple certs & keys
Daniel P. Berrangé [Mon, 3 Nov 2025 17:15:59 +0000 (17:15 +0000)] 
rpc: add support for loading multiple certs & keys

In the transition to Post-Quantum Cryptography, it will often be
desirable to load multiple sets of certificates, some with RSA/ECC
and some with MLDSA. This extends the TLS context code to support
the loading of many certs, passed as a NULL terminated array.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: refactor TLS sanity checking to support many cert files
Daniel P. Berrangé [Mon, 3 Nov 2025 16:44:42 +0000 (16:44 +0000)] 
rpc: refactor TLS sanity checking to support many cert files

Future patches will make it possible to load multiple certificate
files. This prepares the sanity checking code to support that by
taking a NUL terminated array of cert filenames.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agorpc: change 'isServer' parameter from 'int' to 'bool'
Daniel P. Berrangé [Tue, 4 Nov 2025 15:43:04 +0000 (15:43 +0000)] 
rpc: change 'isServer' parameter from 'int' to 'bool'

The callers are all passing in a 'bool' value, and this type
should be maintained rather than cast to 'int' and then
inpreted as a bool again later.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoremote: use g_strfreev for free()ing lists of strings
Daniel P. Berrangé [Mon, 3 Nov 2025 17:33:41 +0000 (17:33 +0000)] 
remote: use g_strfreev for free()ing lists of strings

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agodomain_addr.c: update virtconsole port reservation comment and allowZero var
Aaron M. Brown [Fri, 19 Sep 2025 19:26:20 +0000 (15:26 -0400)] 
domain_addr.c: update virtconsole port reservation comment and allowZero var

Rename variable "allowZero" to "allowPortZero" for clarity and update the virtconsole port reservation comment,
as port 0 is reserved for the first virtconsole unless specified.

Signed-off-by: Aaron M. Brown <aaronmbr@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agodomain_addr.c: Fix virtio console port autoassign on virtio-serial bus
Aaron M. Brown [Fri, 19 Sep 2025 19:26:19 +0000 (15:26 -0400)] 
domain_addr.c: Fix virtio console port autoassign on virtio-serial bus

This change fixes an issue with virtio console port assignment on virtio-serial buses.
Currently, when trying to autoassign a virtio console device, the device cannot be
assigned to a port greater than 0 on virtio-serial buses.
You will receive the following error:

`virtio-serial-bus: A port already exists at id 0`

Therefore, the data needs to be passed back into info when allowZero is true.
We should also preserve the controller data when allowZero is true, and
propagate allowZero into virDomainVirtioSerialAddrNextFromController
to get an appropriate startPort.

Fixes: 16db8d2e ("Add functions to track virtio-serial addresses")
Signed-off-by: Aaron M. Brown <aaronmbr@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agotests: Add console-virtio-serial-autoassign-address tests
Aaron M. Brown [Fri, 19 Sep 2025 19:26:18 +0000 (15:26 -0400)] 
tests: Add console-virtio-serial-autoassign-address tests

Add test coverage for multiple virtio consoles on a virtio-serial controller.
This test makes sure that multiple virtconsoles get auto-assigned appropriate
port numbers on a virtio-serial-bus.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Aaron M. Brown <aaronmbr@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agosrc: cap the data size in stream I/O functions
Daniel P. Berrangé [Mon, 24 Nov 2025 11:17:22 +0000 (11:17 +0000)] 
src: cap the data size in stream I/O functions

The main stream I/O functions have a design flaw in that they accept
'size_t' as the input data length, while intending to return the
amount actually processed in an 'int'.

Fortunately all functions explicitly document that less data may be
processed than requested, and with the remote driver data cap we will
never get anywhere near exceeding an 'int' even on 32-bit.

For sanity, however, lets explicitly cap the data size in the public
API to fix the design flaw.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoinclude: fix version for recent block stats constants
Daniel P. Berrangé [Mon, 24 Nov 2025 10:27:21 +0000 (10:27 +0000)] 
include: fix version for recent block stats constants

The recent commit:

  commit 166be0d48cedb8def6085bd10ede4b1875eb2ceb
  Author:     Peter Krempa <pkrempa@redhat.com>
  AuthorDate: Fri Sep 12 13:32:36 2025 +0200
  Commit:     Peter Krempa <pkrempa@redhat.com>
  CommitDate: Wed Nov 5 14:27:57 2025 +0100

      Expose qemu timed block statistics via bulk stats API

had a bit of delay between authoring and merging, such that the
merged version number was outdated.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agotests: qemuxmlconftest: Add case for hyperv domains
Praveen K Paladugu [Fri, 7 Nov 2025 20:14:00 +0000 (14:14 -0600)] 
tests: qemuxmlconftest: Add case for hyperv domains

Add qemuxmlconftest test for hyperv domains.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: qemucapabilities: Introduce MSHV capability
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:59 +0000 (14:13 -0600)] 
tests: qemucapabilities: Introduce MSHV capability

Add case to test libvirt's parsing of MSHV capability.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: Add domaincaps case for mshv
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:58 +0000 (14:13 -0600)] 
tests: Add domaincaps case for mshv

Add domaincaps tests data for mshv capability

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoconf: Fix virttype handling in schemas
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:57 +0000 (14:13 -0600)] 
conf: Fix virttype handling in schemas

Create a common `virttype` definition in basictypes.rng and reuse it
to enumerate all virt types. This change eliminates the need to duplicate
virttypes in multiple locations.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>