1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-14 12:58:33 +03:00

Compare commits

...

553 Commits

Author SHA1 Message Date
Stefan Berger
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Pavel Hrdina
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
Michal Privoznik
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
Martin Kletzander
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
Shalini Chellathurai Saroja
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
Jiri Denemark
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
Praveen K Paladugu
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
Praveen K Paladugu
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Michal Privoznik
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Pavel Hrdina
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
Alexander Kuznetsov
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Nicolás Gal
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Dion Bosschieter
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 c4fb52dc72b312431a3a28e3a163b38441a95665 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
Alexander Kuznetsov
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
Yalan Zhang
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
Peter Krempa
07d8755523 domain_caps: Don't leak 'cpu0_id' in 'virSEVCapabilitiesFree'
Freeing the 'virSEVCapability' object leaked the 'cpu0_id' field since
its introduction.

Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-03-06 14:06:46 +01:00
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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: 738c5bae888cfa72ed359899cf1a41fed9dbb0f5
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Peter Krempa
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: 0236e6154c46603bc443eda2f05c8ce511c55b08
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Pavel Hrdina
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
Pavel Hrdina
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
Pavel Hrdina
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
Cleber Rosa
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
Michal Privoznik
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
Roman Bogorodskiy
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
Jim Fehlig
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
Jim Fehlig
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
Jim Fehlig
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
Jim Fehlig
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
Jim Fehlig
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
Jim Fehlig
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
Peter Krempa
1bbb1a02d9 schemas: domaincaps: Add missing schema for '<cpu0Id>'
Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08
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
Peter Krempa
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: 2aa644a2fc8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 16:59:35 +01:00
Ján Tomko
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
Ján Tomko
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
Ján Tomko
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
Ján Tomko
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
Jiri Denemark
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
Jiri Denemark
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Martin Kletzander
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
Martin Kletzander
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
Martin Kletzander
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
Martin Kletzander
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Michal Privoznik
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
Yuri Chornoivan
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
Ján Tomko
98262a61b2 docs: formatdomain: fix typo in passt section
A mismatch in backticks happened.

Fixes: a47a89a9d335c111a9c2fbb3f4e1c3a13001e74b
Reported-by: Yalan Zhang <yalzhang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-02-26 10:45:20 +01:00
Peter Krempa
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
Michal Privoznik
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
Jiri Denemark
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: e622970c8785ec1f7e142d72f792d89f870e07d0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-02-25 09:35:26 +01:00
Jiri Denemark
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
Weblate
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
Jiri Denemark
ce88939324 po: Refresh potfile for v11.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-02-24 12:54:04 +01:00
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
jianqing yan
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
Anonymous
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
Laine Stump
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
Laine Stump
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Daniel P. Berrangé
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
Jiri Denemark
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: f928eb5fc80ca0ed7277f2513b63aed36c09d275
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
Laine Stump
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: 785cd56e5803fbbf60715fb6c7536360df5b4b9e
Signed-off-by: Laine Stump <laine@redhat.com>
2025-02-17 23:25:45 -05:00
Andrea Bolognani
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
Ján Tomko
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Laine Stump
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
Boris Fiuczynski
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
Michal Privoznik
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
Michal Privoznik
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
Andi Chandler
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Pavel Hrdina
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: 517248e2394476a3105ff5866b0b718fc6583073
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-02-12 12:04:45 +01:00
Daniel P. Berrangé
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
Martin Kletzander
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 643c74abff01.  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
Andi Chandler
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
Remus-Gabriel Chelu
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
Nicolás Gal
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
Boris Fiuczynski
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Nicolás Gal
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
Martin Kletzander
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
Michal Privoznik
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
Guoyi Tu
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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: 985cb9c32a6
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-02-05 19:27:36 +01:00
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Boris Fiuczynski
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
Fabricio Duarte
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
Daniel P. Berrangé
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
Nicolás Gal
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
2d6bd6f05f qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling
The field is named 'device' in the event so unify our naming.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0] 415b14903e

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

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

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

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

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

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

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

Translated using Weblate (Korean)

Currently translated at 99.6% (10745 of 10781 strings)

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

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

Translated using Weblate (Korean)

Currently translated at 98.4% (10619 of 10781 strings)

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

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

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

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

Translated using Weblate (Spanish)

Currently translated at 50.0% (5395 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 50.0% (5391 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 49.6% (5357 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 49.0% (5287 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 48.3% (5212 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 47.9% (5173 of 10781 strings)

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

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

Translated using Weblate (Spanish)

Currently translated at 47.7% (5149 of 10781 strings)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Create them explicitly ahead of time instead, ensuring
consistency.

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

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

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

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Co-authored-by: Vineeth Pillai <viremana@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-01-24 17:03:56 +01:00
Purna Pavan Chandra Aekkaladevi
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
Purna Pavan Chandra Aekkaladevi
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
Daniel Henrique Barboza
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
Daniel Henrique Barboza
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
Daniel Henrique Barboza
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
Daniel Henrique Barboza
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
Heinrich Schuchardt
3e9440dbcb virsysinfo: fix RISC-V detection
The correct compiler define to detect the RISC-V architecture is __riscv.

Fixes: b902cfece0db ("virsysinfo: Try reading DMI table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2025-01-23 15:05:21 +01:00
Shalini Chellathurai Saroja
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
Jiri Denemark
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
Michal Privoznik
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
Jiang XueQian
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: a8d828c88bbdaf83ae78dc06cdd84d5667fcc424
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
Ján Tomko
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
Ján Tomko
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
Cole Robinson
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
Peter Krempa
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: f8558a87ac8525b16f4cbba4f24e0885fde2b79e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-20 16:47:24 +01:00
Peter Krempa
7a8c2319ac libvirt.spec: Move ownership of 'storage-file' backends directory to gluster
Commit f8558a87ac8525b16f4cbba4f24e0885fde2b79e de-modularized the
'storage-file' backend for local files, and thus now the only
possibility to have the directory is when compiling with gluster.

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

Fixes: f8558a87ac8525b16f4cbba4f24e0885fde2b79e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-20 16:47:24 +01:00
Michal Privoznik
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Peter Krempa
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
Daniel P. Berrangé
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
Nicolas Gal
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Temuri Doghonadze
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
Weblate
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
Jiri Denemark
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
Jiri Denemark
a0b9f813a1 Release of libvirt-11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-15 09:06:33 +01:00
Laine Stump
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
Laine Stump
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
Yuri Chornoivan
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
Nicolas Gal
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
Jiri Denemark
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
Martin Kletzander
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
Pavel Hrdina
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
Michal Privoznik
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
Ján Tomko
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
Martin Kletzander
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
Michal Privoznik
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
Jiri Denemark
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
Weblate
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
Yuri Chornoivan
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
Weblate
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
Daniel P. Berrangé
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
Laine Stump
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
Leigh Brown
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
Pavel Hrdina
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
Jiri Denemark
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
Jiri Denemark
4c7bb1cc4a po: Refresh potfile for v11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-09 11:48:26 +01:00
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Jiri Denemark
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
Weblate
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
Ricky Tigg
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
Nicolas Gal
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
Nicolas Gal
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
Nicolas Gal
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
Nicolas Gal
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
Nicolas Gal
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
Nicolas Gal
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
Nicolas Gal
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
Ricky Tigg
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
Ricky Tigg
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
Weblate
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
Ricky Tigg
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
Anders Jonsson
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
Andi Chandler
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
Göran Uddeborg
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
Laine Stump
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
Leigh Brown
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
Leigh Brown
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
Leigh Brown
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
Georgia Garcia
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
Georgia Garcia
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
Georgia Garcia
76b9227eea security_apparmor: fix memleaks in AppArmorSetFDLabel
proc and fd_path are allocated but never freed. Fix by using
g_autofree instead.

Fixes: b9757fea30785a92aa95ea675b9bc371e4fb2e8c
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-01-08 10:46:14 -07:00
Praveen K Paladugu
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Stefan Hellermann
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
Martin Kletzander
9df14f5173 conf: Adjust hyperv tlbflush formatting
Commit 247357cc292a 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
Ján Tomko
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
Adam Julis
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
Jim Fehlig
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Marc-André Lureau
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
Marc-André Lureau
958283a21f qemu_tpm: lock the state explicitly when running swtpm
Commit bb5e26749fe5b ("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
Marc-André Lureau
90014e7bc4 Revert "qemu: explicit swtpm state locking"
This reverts commit bb5e26749fe5b5856a3541be2cbe147701e6e121.

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
Michal Privoznik
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
Xianglai Li
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
Martin Kletzander
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
Martin Kletzander
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
Praveen K Paladugu
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
Praveen K Paladugu
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
Praveen K Paladugu
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
Praveen K Paladugu
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Daniel P. Berrangé
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 9e3cc0ff5e81ed2056a6a528893fd2cb5609d70b
Fixes 37800af9a400385801da6d73654249fdb51a93d8
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-19 18:03:20 +00:00
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Michal Privoznik
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: 51c098347d7f2af9b4386ac0adc4431997d06f3d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2024-12-19 09:14:53 +01:00
Michal Privoznik
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: 2d222ecf6e73614a400b830ac56e9aaa1bc55ecc
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-18 15:27:12 +01:00
Daniel P. Berrangé
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
Jiri Denemark
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
Collin Walling
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
Collin Walling
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
Collin Walling
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
Collin Walling
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
Collin Walling
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
Collin Walling
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
Collin Walling
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
Michal Privoznik
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Laine Stump
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Alexander Kuznetsov
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Jiri Denemark
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
Michal Privoznik
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
Praveen K Paladugu
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
Ján Tomko
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: d79542eec669eb9c449bb8228179e7a87e768017
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
Heinrich Schuchardt
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
Peter Krempa
daa560858b qemuDomainDiskChangeSupportedIothreads: Change error wording to fix grammar
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2024-12-10 08:54:29 +01:00
Daniel P. Berrangé
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
Daniel P. Berrangé
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
Leigh Brown
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
Jiri Denemark
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: a3b8753db975d8b92b122ccc7daee986974f8b18
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-12-04 16:27:00 +01:00
Jiri Denemark
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
790 changed files with 183523 additions and 332737 deletions

View File

@ -48,6 +48,7 @@
<shi_lei@massclouds.com> <shilei.massclouds@gmx.com>
<adrian.brzezinski@eo.pl> <redhat@adrb.pl>
<matt@datto.com> <mcoleman@datto.com>
<dbarboza@ventanamicro.com> <danielhb413@gmail.com>
# Name consolidation:
# Preferred author spelling <preferred email>
@ -70,6 +71,7 @@ Wang Yufei (James) <james.wangyufei@huawei.com>
Deepak C Shetty <dpkshetty@gmail.com>
Dave Allan <dallan@redhat.com>
Richard W.M. Jones <rjones@redhat.com>
Daniel Henrique Barboza <dbarboza@ventanamicro.com>
# Non-trivial consolidation:
# see git documentation for information about the format

174
NEWS.rst
View File

@ -8,6 +8,180 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v11.2.0 (unreleased)
====================
* **Security**
* **Removed features**
* **New features**
* **Improvements**
* **Bug fixes**
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 lifecyle 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)
=====================

View File

@ -401,6 +401,8 @@ msg_gen_function += virReportError
msg_gen_function += virReportErrorHelper
msg_gen_function += virReportSystemError
msg_gen_function += virLastErrorPrefixMessage
msg_gen_function += vshError
msg_gen_function += vshWarn
# Uncomment the following and run "ninja test" to see diagnostics
# that are not yet marked for translation, but that need to be rewritten
@ -408,7 +410,6 @@ msg_gen_function += virLastErrorPrefixMessage
# msg_gen_function += fprintf
# msg_gen_function += testError
# msg_gen_function += vshPrint
# msg_gen_function += vshError
space = $(null) $(null)
func_re= ($(subst $(space),|,$(msg_gen_function)))
@ -1273,9 +1274,10 @@ po_file ?= $(top_srcdir)/po/POTFILES
# This is all generated files for RPC code.
generated_files = \
$(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:
@ -1437,7 +1439,7 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers\.c$$|scripts/rpcgen/tests/test_demo\.c$$)
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 = \
^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$

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

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \
libssh-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \

View File

@ -57,7 +57,7 @@ function install_buildenv() {
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \

View File

@ -82,7 +82,7 @@ function install_buildenv() {
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \

View File

@ -82,7 +82,7 @@ function install_buildenv() {
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \

View File

@ -82,7 +82,7 @@ function install_buildenv() {
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \

View File

@ -83,7 +83,7 @@ function install_buildenv() {
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \

View File

@ -57,7 +57,7 @@ function install_buildenv() {
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \

View File

@ -8,7 +8,7 @@ function install_buildenv() {
dnf update -y
dnf install -y \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
codespell \

View File

@ -8,7 +8,7 @@ function install_buildenv() {
dnf update -y
dnf install -y \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
codespell \

View File

@ -9,7 +9,7 @@ function install_buildenv() {
dnf install -y \
audit-libs-devel \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
clang \
@ -82,6 +82,7 @@ function install_buildenv() {
systemd-devel \
systemd-rpm-macros \
systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \
xen-devel
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED

View File

@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8'
PKGS='augeas bash-completion ca_root_nss 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 polkit py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PYPI_PKGS=''
PYTHON='/usr/local/bin/python3'

View File

@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip'
PKGS='augeas bash-completion ca_root_nss 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 polkit py311-black py311-docutils py311-flake8 py311-pytest python3 qemu readline'
PYPI_PKGS=''
PYTHON='/usr/local/bin/python3'

View File

@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/alpine:3.19
FROM docker.io/library/alpine:3.21
RUN apk update && \
apk upgrade && \

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

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-gcrypt-dev:mipsel \
libssh-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \

View File

@ -59,7 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-gcrypt-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \

View File

@ -93,7 +93,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-gcrypt-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \

View File

@ -93,7 +93,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-gcrypt-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \

View File

@ -93,7 +93,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-gcrypt-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-gcrypt-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-gcrypt-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \

View File

@ -94,7 +94,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-gcrypt-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \

View File

@ -59,7 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-gcrypt-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \

View File

@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40
FROM registry.fedoraproject.org/fedora:41
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@ -19,7 +19,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
codespell \

View File

@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:40
FROM registry.fedoraproject.org/fedora:41
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@ -19,7 +19,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
codespell \

View File

@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM registry.fedoraproject.org/fedora:39
FROM registry.fedoraproject.org/fedora:41
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
@ -20,7 +20,7 @@ exec "$@"\n' > /usr/bin/nosync && \
nosync dnf install -y \
audit-libs-devel \
augeas \
bash-completion \
bash-completion-devel \
ca-certificates \
ccache \
clang \
@ -93,6 +93,7 @@ exec "$@"\n' > /usr/bin/nosync && \
systemd-devel \
systemd-rpm-macros \
systemtap-sdt-devel \
systemtap-sdt-dtrace \
wireshark-devel \
xen-devel && \
nosync dnf autoremove -y && \

View File

@ -55,6 +55,7 @@
variables:
RUN_UPSTREAM_NAMESPACE: libvirt
CONTAINER_UPSTREAM_NAMESPACE: libvirt
FF_SCRIPT_SECTIONS: 1

View File

@ -35,7 +35,7 @@
fi
- cat /packages.txt
variables:
IMAGE: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libvirt/ci-$NAME:latest
IMAGE: $CI_REGISTRY/$CONTAINER_UPSTREAM_NAMESPACE/libvirt/ci-$NAME:latest
rules:
### PUSH events
@ -179,7 +179,7 @@
fi
- cat /packages.txt
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:
### PUSH events

View File

@ -33,15 +33,15 @@ x86_64-almalinux-9-clang:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9
x86_64-alpine-319:
x86_64-alpine-321:
extends: .native_build_job
needs:
- job: x86_64-alpine-319-container
- job: x86_64-alpine-321-container
optional: true
allow_failure: false
variables:
NAME: alpine-319
TARGET_BASE_IMAGE: docker.io/library/alpine:3.19
NAME: alpine-321
TARGET_BASE_IMAGE: docker.io/library/alpine:3.21
x86_64-alpine-edge:
@ -70,30 +70,6 @@ x86_64-centos-stream-9:
- 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:
extends: .native_build_job
needs:
@ -127,21 +103,6 @@ x86_64-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
x86_64-fedora-39:
extends: .native_build_job
needs:
- job: x86_64-fedora-39-container
optional: true
allow_failure: false
variables:
NAME: fedora-39
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:39
artifacts:
expire_in: 1 day
paths:
- libvirt-rpms
x86_64-fedora-40:
extends: .native_build_job
needs:
@ -157,6 +118,21 @@ x86_64-fedora-40:
- libvirt-rpms
x86_64-fedora-41:
extends: .native_build_job
needs:
- job: x86_64-fedora-41-container
optional: true
allow_failure: false
variables:
NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
artifacts:
expire_in: 1 day
paths:
- libvirt-rpms
x86_64-fedora-rawhide:
extends: .native_build_job
needs:
@ -246,110 +222,6 @@ x86_64-ubuntu-2404-clang:
# 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:
extends: .cross_build_job
needs:
@ -544,29 +416,29 @@ s390x-debian-sid:
TARGET_BASE_IMAGE: docker.io/library/debian:sid-slim
mingw32-fedora-40:
mingw32-fedora-41:
extends: .cross_build_job
needs:
- job: mingw32-fedora-40-container
- job: mingw32-fedora-41-container
optional: true
allow_failure: false
variables:
CROSS: mingw32
JOB_OPTIONAL: 1
NAME: fedora-40
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40
NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
mingw64-fedora-40:
mingw64-fedora-41:
extends: .cross_build_job
needs:
- job: mingw64-fedora-40-container
- job: mingw64-fedora-41-container
optional: true
allow_failure: false
variables:
CROSS: mingw64
NAME: fedora-40
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:40
NAME: fedora-41
TARGET_BASE_IMAGE: registry.fedoraproject.org/fedora:41
mingw32-fedora-rawhide:
@ -602,7 +474,7 @@ x86_64-freebsd-13:
allow_failure:
exit_codes: 3
variables:
CIRRUS_VM_IMAGE_NAME: freebsd-13-3
CIRRUS_VM_IMAGE_NAME: freebsd-13-4
CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
INSTALL_COMMAND: pkg install -y
@ -617,7 +489,7 @@ x86_64-freebsd-14:
allow_failure:
exit_codes: 3
variables:
CIRRUS_VM_IMAGE_NAME: freebsd-14-1
CIRRUS_VM_IMAGE_NAME: freebsd-14-2
CIRRUS_VM_IMAGE_SELECTOR: image_family
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
INSTALL_COMMAND: pkg install -y

View File

@ -14,11 +14,11 @@ x86_64-almalinux-9-container:
NAME: almalinux-9
x86_64-alpine-319-container:
x86_64-alpine-321-container:
extends: .container_job
allow_failure: false
variables:
NAME: alpine-319
NAME: alpine-321
x86_64-alpine-edge-container:
@ -35,14 +35,6 @@ x86_64-centos-stream-9-container:
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:
extends: .container_job
allow_failure: false
@ -57,13 +49,6 @@ x86_64-debian-sid-container:
NAME: debian-sid
x86_64-fedora-39-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-39
x86_64-fedora-40-container:
extends: .container_job
allow_failure: false
@ -71,6 +56,13 @@ x86_64-fedora-40-container:
NAME: fedora-40
x86_64-fedora-41-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-41
x86_64-fedora-rawhide-container:
extends: .container_job
allow_failure: true
@ -109,70 +101,6 @@ x86_64-ubuntu-2404-container:
# 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:
extends: .container_job
allow_failure: false
@ -292,19 +220,19 @@ s390x-debian-sid-container:
NAME: debian-sid-cross-s390x
mingw32-fedora-40-container:
mingw32-fedora-41-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: fedora-40-cross-mingw32
NAME: fedora-41-cross-mingw32
mingw64-fedora-40-container:
mingw64-fedora-41-container:
extends: .container_job
allow_failure: false
variables:
NAME: fedora-40-cross-mingw64
NAME: fedora-41-cross-mingw64
mingw32-fedora-rawhide-container:

View File

@ -29,23 +29,23 @@ centos-stream-9-tests:
# 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
# also needs to be created on the runner host.
fedora-39-tests:
fedora-41-tests:
extends: .integration_tests
variables:
# needed by libvirt-gitlab-executor
DISTRO: fedora-39
DISTRO: fedora-41
# can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs:
- x86_64-fedora-39
- x86_64-fedora-41
- project: libvirt/libvirt-perl
job: x86_64-fedora-39
job: x86_64-fedora-41
ref: master
artifacts: true
- project: libvirt/libvirt-python
job: x86_64-fedora-39
job: x86_64-fedora-41
ref: master
artifacts: true
@ -53,22 +53,22 @@ fedora-39-tests:
# 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
# also needs to be created on the runner host.
.fedora-39-upstream-qemu-tests:
.fedora-41-upstream-qemu-tests:
extends: .integration_tests
variables:
# needed by libvirt-gitlab-executor
DISTRO: fedora-39
DISTRO: fedora-41
# can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs:
- x86_64-fedora-39
- x86_64-fedora-41
- project: libvirt/libvirt-perl
job: x86_64-fedora-39
job: x86_64-fedora-41
ref: master
artifacts: true
- project: libvirt/libvirt-python
job: x86_64-fedora-39
job: x86_64-fedora-41
ref: master
artifacts: true

View File

@ -124,6 +124,9 @@ run_integration() {
DAEMONS="virtinterfaced virtlockd virtlogd virtnetworkd virtnodedevd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged"
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"
for daemon in $DAEMONS
do

View File

@ -19,7 +19,7 @@ targets:
RPM: skip
CC: clang
alpine-319: x86_64
alpine-321: x86_64
alpine-edge:
jobs:
@ -34,46 +34,6 @@ targets:
paths:
- 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:
jobs:
- arch: x86_64
@ -144,7 +104,7 @@ targets:
containers: false
builds: false
fedora-39:
fedora-40:
jobs:
- arch: x86_64
artifacts:
@ -152,7 +112,7 @@ targets:
paths:
- libvirt-rpms
fedora-40:
fedora-41:
jobs:
- arch: x86_64
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>`__
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>`__
connection to the hypervisor it can then use it to manage the
hypervisor's available domains and related virtualization resources,

View File

@ -283,13 +283,19 @@ harddisk, cdrom, network) determining where to obtain/find the boot image.
:since:`Since 8.5.0`, it's possible for the element to have ``type`` attribute
(accepts values ``file``, ``block`` and ``network``) in that case the NVRAM
storage is described by a ``<source>`` sub-element with the same syntax as
``disk``'s source. See `Hard drives, floppy disks, CDROMs`_.
``disk``'s source. See `Hard drives, floppy disks, CDROMs`_. For ``block``
backed NVRAM images it may be necessary to ensure that the block device
has the correct guest visible size based on hypervisor expectations. This
may require use of non ``raw`` format image that allows arbitrary disk
size.
**Note:** ``network`` backed NVRAM the variables are not instantiated from
the ``template`` and it's user's responsibility to provide a valid NVRAM image.
This element supports a ``format`` attribute, which specifies the format
of the NVRAM image. :since:`Since 9.2.0 (QEMU only)`
of the NVRAM image. :since:`Since 9.2.0 (QEMU only)` Note that hypervisors
may not support automatic population of the nvram if ``format`` differs from
``templateFormat`` or may support only a specific ``format``.
It is not valid to provide this element if the loader is marked as
stateless.
@ -391,6 +397,7 @@ and full virtualized guests.
<kernel>/root/f8-i386-vmlinuz</kernel>
<initrd>/root/f8-i386-initrd</initrd>
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
<shim>/path/to/shim.efi</shim>
<dtb>/root/ppc.dtb</dtb>
</os>
...
@ -411,6 +418,10 @@ and full virtualized guests.
The contents of this element specify arguments to be passed to the kernel (or
installer) at boot time. This is often used to specify an alternate primary
console (eg serial port), or the installation media source / kickstart file
``shim``
Use specified fully-qualified path to load an initial UEFI bootloader that
handles chaining to a trusted full bootloader under secure boot
environments.
``dtb``
The contents of this element specify the fully-qualified path to the
(optional) device tree binary (dtb) image in the host OS.
@ -484,9 +495,26 @@ These options apply to any form of booting of the guest OS.
...
``acpi``
The ``table`` element contains a fully-qualified path to the ACPI table. The
``type`` attribute contains the ACPI table type (currently only ``slic`` is
supported) :since:`Since 1.3.5 (QEMU)` :since:`Since 5.9.0 (Xen)`
The ``table`` element contains a fully-qualified path to the ACPI table,
with the ``type`` attribute dictating what data must be present in the
file:
* ``raw``: a single ACPI table with header and data, with ACPI
signature auto-detected from header (:since:`Since 11.2.0 (QEMU)`).
* ``rawset``: concatenation of multiple ACPI tables with header
and data, each with any ACPI signature, auto-detected from header
(:since:`Since 11.2.0 (Xen)`).
* ``slic``: a single ACPI table with header and data, providing
software licensing information. The ACPI table signature in the
header will be forced to ``SLIC`` (:since:`Since 1.3.5 (QEMU)`,
mis-interpreted as ``rawset`` :since:`Since 5.9.0 (Xen)`).
* ``msdm``: a single ACPI table with header and data, providing
Microsoft Data Management information. The ACPI table signature
in the header will be forced to ``MSDM``
(:since:`Since 11.2.0 (QEMU)`).
Each type may be used only once, except for ``raw`` which can
appear multiple times.
SMBIOS System Information
@ -1482,38 +1510,46 @@ In case no restrictions need to be put on CPU model and its features, a simpler
presented to the guest. This is the default when no ``mode`` attribute is
specified. This mode makes it so that a persistent guest will see the same
hardware no matter what host the guest is booted on.
``host-model``
The ``host-model`` mode is essentially a shortcut to copying host CPU
definition from capabilities XML into domain XML. Since the CPU definition
is copied just before starting a domain, exactly the same XML can be used
on different hosts while still providing the best guest CPU each host
supports. The ``match`` attribute can't be used in this mode. Specifying
CPU model is not supported either, but ``model``'s ``fallback`` attribute
may still be used. Using the ``feature`` element, specific flags may be
enabled or disabled specifically in addition to the host model. This may
be used to fine tune features that can be emulated. :since:`(Since 1.1.1)`
. Libvirt does not model every aspect of each CPU so the guest CPU will
not match the host CPU exactly. On the other hand, the ABI provided to the
The ``host-model`` mode is essentially a shortcut to copying host-model
CPU definition from `domain capabilities XML
<formatdomaincaps.html#cpu-configuration>`__ into domain XML. Since the
CPU definition is copied just before starting a domain, exactly the same
XML can be used on different hosts while still providing the best guest
CPU each host supports. The ``match`` attribute can't be used in this
mode. Specifying CPU model is not supported either, but ``model``'s
``fallback`` attribute may still be used. Using the ``feature`` element,
specific flags may be enabled or disabled specifically in addition to the
host model. This may be used to fine tune features that can be emulated.
:since:`(Since 1.1.1)`
Libvirt does not model every aspect of each CPU so the guest CPU will not
match the host CPU exactly. On the other hand, the ABI provided to the
guest is reproducible. During migration, complete CPU model definition is
transferred to the destination host so the migrated guest will see exactly
the same CPU model for the running instance of the guest, even if the
destination host contains more capable CPUs or newer kernel; but shutting
down and restarting the guest may present different hardware to the guest
according to the capabilities of the new host. Prior to libvirt 3.2.0 and
QEMU 2.9.0 detection of the host CPU model via QEMU is not supported. Thus
the CPU configuration created using ``host-model`` may not work as
expected. :since:`Since 3.2.0 and QEMU 2.9.0` this mode works the way it
was designed and it is indicated by the ``fallback`` attribute set to
``forbid`` in the host-model CPU definition advertised in `domain
capabilities XML <formatdomaincaps.html#cpu-configuration>`__. When
``fallback`` attribute is set to ``allow`` in the domain capabilities
XML, it is recommended to use ``custom`` mode with just the CPU model
from the host capabilities XML. :since:`Since 1.2.11` PowerISA allows
processors to run VMs in binary compatibility mode supporting an older
version of ISA. Libvirt on PowerPC architecture uses the ``host-model``
to signify a guest mode CPU running in binary compatibility mode.
Example: When a user needs a power7 VM to run in compatibility mode on a
Power8 host, this can be described in XML as follows :
transferred to the destination host so the migrated guest will see
exactly the same CPU model for the running instance of the guest, even if
the destination host contains more capable CPUs or newer kernel; but
shutting down and restarting the guest may present different hardware to
the guest according to the capabilities of the new host.
Prior to libvirt 3.2.0 and QEMU 2.9.0 detection of the host CPU model via
QEMU is not supported. Thus the CPU configuration created using
``host-model`` may not work as expected. :since:`Since 3.2.0 and QEMU
2.9.0` this mode works the way it was designed and it is indicated by the
``fallback`` attribute set to ``forbid`` in the host-model CPU definition
advertised in `domain capabilities XML
<formatdomaincaps.html#cpu-configuration>`__. When ``fallback`` attribute
is set to ``allow`` in the domain capabilities XML, it is recommended to
use ``custom`` mode with just the CPU model from the host capabilities
XML.
:since:`Since 1.2.11` PowerISA allows processors to run VMs in binary
compatibility mode supporting an older version of ISA. Libvirt on
PowerPC architecture uses the ``host-model`` to signify a guest mode CPU
running in binary compatibility mode. Example: When a user needs a power7
VM to run in compatibility mode on a Power8 host, this can be described
in XML as follows:
::
@ -1993,7 +2029,10 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
<vendor_id state='on' value='KVM Hv'/>
<frequencies state='on'/>
<reenlightenment state='on'/>
<tlbflush state='on'/>
<tlbflush state='on'>
<direct state='on'/>
<extended state='on'/>
</tlbflush>
<ipi state='on'/>
<evmcs state='on'/>
<emsr_bitmap state='on'/>
@ -2032,6 +2071,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
<async-teardown enabled='yes'/>
<ras state='on'/>
<ps2 state='on'/>
<aia value='aplic-imsic'/>
</features>
...
@ -2068,9 +2108,9 @@ are:
Enable various features improving behavior of guests running Microsoft
Windows.
=============== ====================================================================== ============================================ =======================================================
=============== ====================================================================== ============================================ ========================================================================
Feature Description Value Since
=============== ====================================================================== ============================================ =======================================================
=============== ====================================================================== ============================================ ========================================================================
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0)`
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0)`
spinlocks Enable spinlock support on, off; retries - at least 4095 :since:`1.1.0 (QEMU 2.0)`
@ -2082,13 +2122,13 @@ are:
vendor_id Set hypervisor vendor id on, off; value - string, up to 12 characters :since:`1.3.3 (QEMU 2.5)`
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12)`
reenlightenment Enable re-enlightenment notification on migration on, off :since:`4.7.0 (QEMU 3.0)`
tlbflush Enable PV TLB flush support on, off :since:`4.7.0 (QEMU 3.0)`
tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0)`
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1)`
evmcs Enable Enlightened VMCS on, off :since:`4.10.0 (QEMU 3.1)`
avic Enable use Hyper-V SynIC with hardware APICv/AVIC on, off :since:`8.10.0 (QEMU 6.2)`
emsr_bitmap Avoid unnecessary updates to L2 MSR Bitmap upon vmexits. on, off :since:`10.7.0 (QEMU 7.1)`
xmm_input Enable XMM Fast Hypercall Input on, off :since:`10.7.0 (QEMU 7.1)`
=============== ====================================================================== ============================================ =======================================================
=============== ====================================================================== ============================================ ========================================================================
:since:`Since 8.0.0`, the hypervisor can be configured further by setting
the ``mode`` attribute to one of the following values:
@ -2279,6 +2319,13 @@ are:
disable the emulation of a PS/2 controller used by ``ps2`` bus input devices.
If the attribute is not defined, the hypervisor default will be used.
:since:`Since 10.7.0` (QEMU only)
``aia``
Configure aia (Advanced Interrupt Architecture) for RISC-V 'virt'
guests. Possible values for the ``value`` attribute are ``aplic`` (one
emulated APLIC device present per socket), ``aplic-imsic`` (one APLIC and
one IMSIC device present per core), or ``none`` (no support for AIA).
If the attribute is not defined, the hypervisor default
will be used. :since:`Since 11.1.0` (QEMU/KVM and RISC-V guests only)
Time keeping
------------
@ -3417,10 +3464,27 @@ paravirtualized driver is specified via the ``disk`` element.
*Note:* ``iothread`` is mutually exclusive with ``iothreads``.
- The optional ``iothreads`` sub-element allows specifying multiple IOThreads
via the ``iothread`` sub-element with attribute ``id`` the disk will use
for I/O operations. Optionally the ``iothread`` element can have multiple
``queue`` subelements specifying that given iothread should be used to
handle given queues. :since:`Since 10.0.0 (QEMU 9.0, virtio disks only)`.
Example::
for I/O operations. The virt queues (see ``queues`` attribute below) are
automatically distributed among the configured iothreads.
Optionally the ``iothread`` element can have multiple ``queue``
subelements with mandatory ``id`` atribute specifying that the iothread
should be used to handle given virt queue. If queue mapping is present
the ``queues`` attribute of ``driver`` must be configured and all
configured virt queues must be included in the mapping. The
``virtio-blk`` device exposes request virt queues ``0`` to ``N-1`` where
N is the number of queues configured for the device.
:since:`Since 10.0.0 (QEMU 9.0, virtio disks only)`.
Examples::
<driver name='qemu' queues='4'>
<iothreads>
<iothread id='2'/>
<iothread id='3'/>
</iothreads>
</driver>
<driver name='qemu' queues='3'>
<iothreads>
@ -3551,12 +3615,13 @@ paravirtualized driver is specified via the ``disk`` element.
:since:`Since 0.10.1`
``vendor``
If present, this element specifies the vendor of a virtual hard disk or
CD-ROM device. It must not be longer than 8 printable characters.
:since:`Since 1.0.1`
CD-ROM device. It must not be longer than 8 printable characters. Only for
'scsi' ``bus``.:since:`Since 1.0.1`
``product``
If present, this element specifies the product of a virtual hard disk or
CD-ROM device. It must not be longer than 16 printable characters.
:since:`Since 1.0.1`
CD-ROM device. It must not be longer than 16 printable characters for 'scsi'
(:since:`Since 1.0.1`). For 'sata' or 'ide' not longer than 40 printable
characters (:since:`Since 11.1.0`). Other ``bus`` is not supported.
``address``
If present, the ``address`` element ties the disk to a given slot of a
controller (the actual ``<controller>`` device can often be inferred by
@ -3821,8 +3886,8 @@ A directory on the host that can be accessed directly from the guest.
:since:`Since 10.0.0`
``readonly``
Enables exporting filesystem as a readonly mount for guest, by default
read-write access is given (currently only works for QEMU/KVM driver; not
with virtiofs).
read-write access is given (works for QEMU/KVM driver, :since:`Since 11.0.0,
requires virtiofs 1.13.0` ).
``space_hard_limit``
Maximum space available to this guest's filesystem. :since:`Since 0.9.13`
Only supported by the OpenVZ driver.
@ -5069,25 +5134,34 @@ to the interface.
</devices>
...
Userspace (SLIRP or passt) connection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Userspace connection using SLIRP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``user`` type connects the guest interface to the outside via a
The ``user`` interface type connects the guest interface to the outside via a
transparent userspace proxy that doesn't require any special system
privileges, making it usable in cases when libvirt itself is running
with no privileges (e.g. libvirt's "session mode" daemon, or when
libvirt is run inside an unprivileged container).
By default, this user proxy is done with QEMU's internal SLIRP driver
which has DHCP & DNS services that give the guest IP addresses
starting from ``10.0.2.15``, a default route of ``10.0.2.2`` and DNS
server of ``10.0.2.3``. :since:`Since 3.8.0` it is possible to override
the default network address by including an ``ip`` element specifying
an IPv4 address in its one mandatory attribute,
``address``. Optionally, a second ``ip`` element with a ``family``
attribute set to "ipv6" can be specified to add an IPv6 address to the
interface. ``address``. Optionally, address ``prefix`` can be
specified.
By default, this user proxy is done with QEMU's SLIRP driver, a
userspace proxy built into QEMU that has DHCP & DNS services that give
the guest an IP address of ``10.0.2.15``, a default route of
``10.0.2.2`` and DNS server at ``10.0.2.3``.
:since:`Since 3.8.0` it is possible to override the guest's default
network address by including an ``ip`` element specifying an IPv4
address in its one mandatory attribute, ``address``. Optionally, a
second ``ip`` element with a ``family`` attribute set to "ipv6" can be
specified to add an IPv6 address to the interface. ``address``.
Optionally, an address ``prefix`` can be specified. These settings are
surprisingly **not** used by SLIRP to set the exact IP address;
instead they are used to determine what network/subnet the guest's IP
address should be on, and the guest will be given an address in that
subnet, but the host portion of the address will still be "2.15". In
the example below, for example, the guest will be given the IP address
172.17.2.15 (**note that the '1.1' in the host portion of the address
has been ignored**), default route of 172.17.2.2, and DNS server
172.17.2.3.
::
@ -5097,34 +5171,74 @@ specified.
...
<interface type='user'>
<mac address="00:11:22:33:44:55"/>
<ip family='ipv4' address='172.17.2.0' prefix='24'/>
<ip family='ipv6' address='2001:db8:ac10:fd01::' prefix='64'/>
<ip family='ipv4' address='172.17.1.1' prefix='16'/>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'/>
</interface>
</devices>
...
:since:`Since 9.0.0` an alternate backend implementation of the
``user`` interface type can be selected by setting the interface's
``<backend>`` subelement ``type`` attribute to ``passt``. In this
case, the passt transport (https://passt.top) is used. Similar to
SLIRP, passt has an internal DHCP server that provides a requesting
guest with one ipv4 and one ipv6 address; it then uses userspace
proxies and a separate network namespace to provide outgoing
UDP/TCP/ICMP sessions, and optionally redirect incoming traffic
destined for the host toward the guest instead.
Userspace connection using passt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When the passt backend is used, the ``<backend>`` attribute
``logFile`` can be used to tell the passt process for this interface
where to write its message log, and the ``<source>`` attribute ``dev``
can tell it to use a particular host interface to derive the routes
given to the guest for forwarding traffic upstream. Due to the design
decisions of passt, if using SELinux, the log file is recommended to
reside in the runtime directory of a user under which the passt
process will run, most probably ``/run/user/$UID`` where ``$UID`` is
the UID of the user, e.g. ``qemu``. Beware that libvirt does not
create this directory if it does not already exist to avoid possible,
however unlikely, issues, especially since this logfile attribute is
meant mostly for debugging.
:since:`Since 9.0.0 (QEMU and KVM only)` an alternate backend
implementation of the ``user`` interface type can be selected by
setting the interface's ``<backend>`` subelement ``type`` attribute to
``passt``. In this case, the passt transport `(details here)
<https://passt.top>`__ is used. passt is run as a separate process
from QEMU - the passt process handles the details of forwarding
network traffic back and forth to the physical network (using
userspace proxies and a separate network namespace to provide outgoing
UDP/TCP/ICMP sessions, and optionally redirecting incoming traffic
destined for the host toward the guest instead), and a socket between
passt and QEMU forwards that traffic on to the guest (and back out,
of course).
:since:`Since 11.1.0 (QEMU and KVM only)` you may prefer to use the
passt backend with the more efficient and performant type='vhostuser'
rather than type='user'. All the options related to passt in the
paragraphs below here also apply when using the passt backend with
type='vhostuser'; any other details specific to vhostuser are
described `here
<formatdomain.html#vhost-user-connection-with-passt-backend>`__.
Similar to SLIRP, passt has an internal DHCP server that provides a
requesting guest with one ipv4 and one ipv6 address. There are default
values for both of these, or you can use the ``<ip>`` element
(described above, with behavioral differences as outlined below) to
configure one IPv4 and one IPv6 address that passt's DHCP server can
provide to the guest.
Unlike SLIRP, when no ``<ip>`` address is specified, passt will by
default provide the guest with an IP address, DNS server, etc. that
are identical to those settings on the host itself (through the magic
of the proxies and a separate network namespace, this doesn't create
any conflict).
Also different from SLIRP's behavior: if you do specify IP
address(es), the exact address and netmask/prefix you specify will be
provided to the guest (i.e. passt doesn't interpret the <ip> settings
as a network address like SLIRP does, but as a host address). In
example given above, the guest IP would be set to exactly 172.17.1.1.
Just as with SLIRP, though, once traffic from the guest leaves the
host towards the rest of the network, it will always appear as if it
came from the host's IP.
There are a few other options that are configurable only for the passt
backend. For example, the ``<backend>`` attribute ``logFile`` can be
used to tell the passt process for this interface where to write its
message log, and the ``<source>`` attribute ``dev`` can tell it a
particular host interface to use when deriving the routes given to the
guest for forwarding traffic upstream. Due to the design decisions of
passt, when using SELinux on the host, it is recommended that the log
file reside in the runtime directory of the user under which the passt
process will run, most probably ``/run/user/$UID`` (where ``$UID`` is
the UID of that user), e.g. ``/run/user/1000``. Be aware that libvirt
does not create this directory if it does not already exist to avoid
possible, however unlikely, issues with orphaned directories or
permissions, etc. The logfile attribute is meant mostly for debugging,
so it shouldn't be set under normal circumstances.
Additionally, when passt is used, multiple ``<portForward>`` elements
can be added to forward incoming network traffic for the host to this
@ -5161,7 +5275,7 @@ ports **with the exception of some subset**.
<backend type='passt' logFile='/run/user/$UID/passt-domain.log'/>
<mac address="00:11:22:33:44:55"/>
<source dev='eth0'/>
<ip family='ipv4' address='172.17.2.4' prefix='24'/>
<ip family='ipv4' address='172.17.5.4' prefix='24'/>
<ip family='ipv6' address='2001:db8:ac10:fd01::20'/>
<portForward proto='tcp'>
<range start='2022' to='22'/>
@ -5780,7 +5894,7 @@ following attributes are available for the ``virtio`` NIC driver:
The optional ``queues`` attribute controls the number of queues to be used
for either `Multiqueue
virtio-net <https://www.linux-kvm.org/page/Multiqueue>`__ or vhost-user (See
`vhost-user interface`_) network interfaces. Use of multiple packet
`vhost-user connection`_) network interfaces. Use of multiple packet
processing queues requires the interface having the
``<model type='virtio'/>`` element. Each queue will potentially be handled by
a different processor, resulting in much higher throughput.
@ -6036,28 +6150,29 @@ VLAN tags to apply to the guest's network traffic :since:`Since 0.10.0`.
Network connections that support guest-transparent VLAN tagging include
``type='bridge'`` interfaces connected to an Open vSwitch bridge, SRIOV
Virtual Functions (VF) used via ``type='hostdev'`` (direct device assignment)
and, :since:`since 1.3.5`, SRIOV VFs used via ``type='direct'`` with
``mode='passthrough'`` (macvtap "passthru" mode). All other
connection types, including standard linux bridges and libvirt's own virtual
Virtual Functions (VF) used via ``type='hostdev'`` (direct device assignment),
:since:`since 1.3.5`, SRIOV VFs used via ``type='direct'`` with
``mode='passthrough'`` (macvtap "passthru" mode) and, :since:`since 11.0.0`
standard linux bridges. Other connection types, including libvirt's own virtual
networks, **do not** support it. 802.1Qbh (vn-link) and 802.1Qbg (VEPA) switches
provide their own way (outside of libvirt) to tag guest traffic onto a specific
VLAN. Each tag is given in a separate ``<tag>`` subelement of ``<vlan>`` (for
example: ``<tag id='42'/>``). For VLAN trunking of multiple tags (which is
supported only on Open vSwitch connections), multiple ``<tag>`` subelements can
be specified, which implies that the user wants to do VLAN trunking on the
interface for all the specified tags. In the case that VLAN trunking of a single
tag is desired, the optional attribute ``trunk='yes'`` can be added to the
toplevel ``<vlan>`` element to differentiate trunking of a single tag from
normal tagging.
supported on Open vSwitch connections and standard linux bridges), multiple
``<tag>`` subelements can be specified, which implies that the user wants to do
VLAN trunking on the interface for all the specified tags. In the case that VLAN
trunking of a single tag is desired, the optional attribute ``trunk='yes'`` can
be added to the toplevel ``<vlan>`` element to differentiate trunking of a
single tag from normal tagging.
For network connections using Open vSwitch it is also possible to configure
'native-tagged' and 'native-untagged' VLAN modes :since:`Since 1.1.0`. This is
done with the optional ``nativeMode`` attribute on the ``<tag>`` subelement:
``nativeMode`` may be set to 'tagged' or 'untagged'. The ``id`` attribute of the
``<tag>`` subelement containing ``nativeMode`` sets which VLAN is considered to
be the "native" VLAN for this interface, and the ``nativeMode`` attribute
determines whether or not traffic for that VLAN will be tagged.
For network connections using Open vSwitch and standard linux bridges it is also
possible to configure 'native-tagged' and 'native-untagged' VLAN modes
:since:`Since 1.1.0`. This is done with the optional ``nativeMode`` attribute on
the ``<tag>`` subelement: ``nativeMode`` may be set to 'tagged' or 'untagged'.
The ``id`` attribute of the ``<tag>`` subelement containing ``nativeMode`` sets
which VLAN is considered to be the "native" VLAN for this interface, and the
``nativeMode`` attribute determines whether or not traffic for that VLAN will be
tagged.
Isolating guests' network traffic from each other
@ -6224,8 +6339,8 @@ similarly named elements used to configure the guest side of the interface
(described above).
vhost-user interface
^^^^^^^^^^^^^^^^^^^^
vhost-user connection
^^^^^^^^^^^^^^^^^^^^^
:since:`Since 1.2.7` the vhost-user enables the communication between a QEMU
virtual machine and other userspace process using the Virtio transport protocol.
@ -6252,16 +6367,63 @@ plane is based on shared memory.
</devices>
...
The ``<source>`` element has to be specified along with the type of char device.
Currently, only type='unix' is supported, where the path (the directory path of
the socket) and mode attributes are required. Both ``mode='server'`` and
``mode='client'`` are supported. vhost-user requires the virtio model type, thus
the ``<model>`` element is mandatory. :since:`Since 4.1.0` the element has an
optional child element ``reconnect`` which configures reconnect timeout if the
connection is lost. It has two attributes ``enabled`` (which accepts ``yes`` and
``no``) and ``timeout`` which specifies the amount of seconds after which
The ``<source>`` element has to be specified along with the type of
char device. Currently, only type='unix' is supported, where the path
(the directory path of the socket) and mode attributes are
required. Both ``mode='server'`` and ``mode='client'`` are
supported. (:since:`Since 11.1.0` the default source type for
vhostuser interfaces is 'unix' and default mode is 'client', so those
two attributes are now optional).
The vhost-user protocol only works with the virtio guest driver, so
the ``<model>`` element ``type`` attribute is mandatory (:since:`Since
11.1.0` the default model type for vhostuser interfaces is now
'virtio' so ``<model>`` is no longer mandatory). :since:`Since 4.1.0`
the ``<source>`` element has an optional child element ``reconnect``
which configures reconnect timeout if the connection is lost. It has
two attributes ``enabled`` (which accepts ``yes`` and ``no``) and
``timeout`` which specifies the amount of seconds after which
hypervisor tries to reconnect.
Note that when ``mode='server'`` is used, the hypervisor will wait for the
incoming connection to be established prior to actually running the VM. This is
not possible when hotplugging an interface with such config so the VM will
continue to run even when no connection is made. It's advised to use
``mode='client'`` instead.
vhost-user connection with passt backend
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:since:`Since 11.1.0 (QEMU and KVM only)` passt can be used as the
other end of the vhost-user connection. This is a compelling
alternative, because passt provides all of its network connectivity
without requiring any elevated privileges or capabilities, and
vhost-user uses shared memory to make this unprivileged connection
very high performance as well. You can set a type='vhostuser'
interface to use passt as the backend by adding ``<backend
type='passt'/>``. When passt is the backend, only a single driver
queue is supported, and the ``<source>`` path/type/mode are all
implied to be "matching the passt process" so **must not** be
specified. All of the passt options `described here
<formatdomain.html#userspace-connection-using-passt>`__, are also
supported for ``type='vhostuser'`` with the passt backend, e.g.
setting guest-side IP addresses with ``<ip>`` and port forwarding with
``<portForward``.
::
...
<devices>
<interface type='vhostuser'>
<backend type='passt'/>
<mac address='52:54:00:3b:83:1a'/>
<source dev='enp1s0'/>
<ip address='10.30.0.5 prefix='24'/>
</interface>
</devices>
...
Traffic filtering with NWFilter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -6595,7 +6757,7 @@ interaction with the admin.
<graphics type='dbus'/>
``p2p`` (accepts ``on`` or ``off``) enables peer-to-peer connections,
``p2p`` (accepts ``yes`` or ``no``) enables peer-to-peer connections,
established through virDomainOpenGraphics() APIs.
``address`` (accepts a `D-Bus address
@ -8303,27 +8465,32 @@ Example: usage of external TPM emulator :since:`Since 9.0.0`
``profile``
The ``profile`` node is used to set a profile for a TPM 2.0 given in the
source attribute. This profile will be set when the TPM is initially
created and after that cannot be changed anymore. Once a profile has been
set the name attribute will be updated with the name of the profile that
is running. If no profile is provided, then swtpm will use the latest
built-in 'default' profile or the default profile set in swtpm_setup.conf.
Otherwise swtpm_setup will search for a profile with the given name with
appended .json suffix in a configurable local and then in a distro
directory. If none could be found in either, it will fall back trying to
use a built-in one.
``source`` attribute. This attribute describes the name of the file under
which the profile is stored, e.g. 'local:restricted' describes a locally
created profile with name 'restricted.json' that is found in the directory
pointed to by swtpm_setup.conf's local_profiles_dir. This profile will be set
when the TPM is initially created and after that the profile cannot be
changed anymore. Once a profile has been set, the ``name`` attribute will be
updated with the profile's name from its JSON description, for example
'custom:restricted'. If no profile is provided, then swtpm will use the
latest built-in 'default' profile or the default profile set in
swtpm_setup.conf. Otherwise swtpm_setup will search for a profile with the
given name with appended .json suffix in a configurable local and then in a
distro directory. If none could be found in either, it will fall back trying
to use a built-in one.
The built-in 'null' profile provides backwards compatibility with
libtpms v0.9 but also restricts the user to use only TPM features that were
available at the time of libtpms v0.9. The built-in 'custom' profile is the
only profile that a user can modify and where the ``removeDisabled``
available at the time of libtpms v0.9. The built-in 'custom' profile, or
those with the prefix 'custom:' in the name, are the
only profiles that a user can modify and where the ``removeDisabled``
attribute has any effect. This attribute is particularly useful when a host
is running in FIPS mode and therefore some crypto algorithms (camellia,
tdes, unpadded RSA encryption, 1024-bit RSA keys, and others) are
disabled. When it is set to ``check`` (recommended) then only those
algorithms that are currently disabled will automatically be removed from
the 'custom' profile, while when it is set to ``fips-host`` then all
potentially disabled algorithms will be removed. :since:`Since 10.??.0`
potentially disabled algorithms will be removed. :since:`Since 10.10.0`
TPM profiles provided by a distro can be referenced with the 'distro:'
prefix. Locally created TPM profiles can be referenced with the

View File

@ -520,28 +520,29 @@ VLAN tags to apply to the guest's network traffic :since:`Since 0.10.0`.
Network connections that support guest-transparent VLAN tagging include
``type='bridge'`` interfaces connected to an Open vSwitch bridge, SRIOV
Virtual Functions (VF) used via ``type='hostdev'`` (direct device assignment)
and, :since:`since 1.3.5`, SRIOV VFs used via ``type='direct'`` with
``mode='passthrough'`` (macvtap "passthru" mode). All other
connection types, including standard linux bridges and libvirt's own virtual
networks, **do not** support it. 802.1Qbh (vn-link) and 802.1Qbg (VEPA) switches
provide their own way (outside of libvirt) to tag guest traffic onto a specific
VLAN. Each tag is given in a separate ``<tag>`` subelement of ``<vlan>`` (for
example: ``<tag id='42'/>``). For VLAN trunking of multiple tags (which is
supported only on Open vSwitch connections), multiple ``<tag>`` subelements can
be specified, which implies that the user wants to do VLAN trunking on the
interface for all the specified tags. In the case that VLAN trunking of a single
tag is desired, the optional attribute ``trunk='yes'`` can be added to the
toplevel ``<vlan>`` element to differentiate trunking of a single tag from
normal tagging.
Virtual Functions (VF) used via ``type='hostdev'`` (direct device assignment),
:since:`since 1.3.5`, SRIOV VFs used via ``type='direct'`` with
``mode='passthrough'`` (macvtap "passthru" mode) and, :since:`since 11.0.0`,
standard linux bridges. All other connection types, including libvirt's own
virtual networks, **do not** support it. 802.1Qbh (vn-link) and 802.1Qbg (VEPA)
switches provide their own way (outside of libvirt) to tag guest traffic onto a
specific VLAN. Each tag is given in a separate ``<tag>`` subelement of
``<vlan>`` (for example: ``<tag id='42'/>``). For VLAN trunking of multiple
tags (which is supported on Open vSwitch connections and standard linux
bridges), multiple ``<tag>`` subelements can be specified, which implies that
the user wants to do VLAN trunking on the interface for all the specified tags.
In the case that VLAN trunking of a single tag is desired, the optional
attribute ``trunk='yes'`` can be added to the toplevel ``<vlan>`` element to
differentiate trunking of a single tag from normal tagging.
For network connections using Open vSwitch it is also possible to configure
'native-tagged' and 'native-untagged' VLAN modes :since:`Since 1.1.0`. This is
done with the optional ``nativeMode`` attribute on the ``<tag>`` subelement:
``nativeMode`` may be set to 'tagged' or 'untagged'. The ``id`` attribute of the
``<tag>`` subelement containing ``nativeMode`` sets which VLAN is considered to
be the "native" VLAN for this interface, and the ``nativeMode`` attribute
determines whether or not traffic for that VLAN will be tagged.
For network connections using Open vSwitch :since:`since 1.1.10` and standard
linux bridges :since:`since 11.0.0` it is also possible to configure
'native-tagged' and 'native-untagged' VLAN modes. This is done with the optional
``nativeMode`` attribute on the ``<tag>`` subelement: ``nativeMode`` may be set
to 'tagged' or 'untagged'. The ``id`` attribute of the ``<tag>`` subelement
containing ``nativeMode`` sets which VLAN is considered to be the "native" VLAN
for this interface, and the ``nativeMode`` attribute determines whether or not
traffic for that VLAN will be tagged.
``<vlan>`` elements can also be specified in a ``<portgroup>`` element, as well
as directly in a domain's ``<interface>`` element. In the case that a vlan tag

View File

@ -16,7 +16,7 @@ The libvirt project:
`QEMU <drvqemu.html>`__,
`Xen <drvxen.html>`__,
`Virtuozzo <drvvirtuozzo.html>`__,
`VMWare ESX <drvesx.html>`__,
`VMware ESX <drvesx.html>`__,
`LXC <drvlxc.html>`__,
`BHyve <drvbhyve.html>`__ and
`more <drivers.html>`__

View File

@ -568,6 +568,7 @@ domcapabilities
domcapabilities [virttype] [emulatorbin] [arch] [machine]
[--xpath EXPRESSION] [--wrap]
[--disable-deprecated-features]
Print an XML document describing the domain capabilities for the
@ -609,6 +610,11 @@ a standalone document, however, for ease of additional processing,
the **--wrap** argument will cause the matching node to be wrapped
in a common root node.
The **--disable-deprecated-features** argument will modify the contents
of host-model CPU XML, updating the features list with any features
flagged as deprecated for the CPU model by the hypervisor. These
features will be paired with the "disable" policy.
pool-capabilities
-----------------
@ -948,15 +954,22 @@ provide on the host. (This is different from ``cpu-compare`` which compares the
CPU definition with the host CPU without considering any specific hypervisor
and its abilities.)
The XML *FILE* may contain either a host or guest CPU definition. The host CPU
definition is the <cpu> element and its contents as printed by the
``capabilities`` command. The guest CPU definition is the <cpu> element and its
contents from the domain XML definition or the CPU definition created from the
host CPU model found in the domain capabilities XML (printed by the
``domcapabilities`` command). In addition to the <cpu> element itself, this
command accepts full domain XML, capabilities XML, or domain capabilities XML
containing the CPU definition. For more information on guest CPU definition
see: `https://libvirt.org/formatdomain.html#elementsCPU <https://libvirt.org/formatdomain.html#cpu-model-and-topology>`__.
The XML *FILE* should contain a guest CPU definition: either the ``<cpu>``
element and its contents from a domain XML definition or a CPU definition
created from the host CPU model found in the ``<mode name="host-model">``
element in the domain capabilities XML (printed by the ``domcapabilities``
command). The ``<mode name="host-model">`` element itself or even its
``<cpu>`` parent element found in domain capabilities XML is not accepted.
The element has to be transformed into an actual CPU definition. For more
information on guest CPU definition see:
`https://libvirt.org/formatdomain.html#elementsCPU <https://libvirt.org/formatdomain.html#cpu-model-and-topology>`__.
Alternatively this command will automatically extract the CPU definition when
provided with a full domain or domain capabilities XML.
For historical reasons the XML *FILE* may also contain a host CPU definition,
but such usage is strongly discouraged as it will most likely provide incorrect
results.
The *virttype* option specifies the virtualization type (usable in the 'type'
attribute of the <domain> top level element from the domain XML). *emulator*
@ -987,15 +1000,19 @@ As an alternative for *FILE* in case the XML would only contain a CPU model
with no additional features the CPU model name itself can be passed as *model*.
Exactly one of *FILE* and *model* must be used.
The XML *FILE* may contain either host or guest CPU definitions describing the
host CPU model. The host CPU definition is the <cpu> element and its contents
as printed by ``capabilities`` command. The guest CPU definition may be created
from the host CPU model found in domain capabilities XML (printed by
``domcapabilities`` command). In addition to the <cpu> elements, this command
accepts full capabilities XMLs, or domain capabilities XMLs containing the CPU
definitions. It is recommended to use only the CPU definitions from domain
capabilities, as on some architectures using the host CPU definition may either
fail or provide unexpected results.
The XML *FILE* should contain guest CPU definitions created from the host CPU
model found in the ``<mode name="host-model">`` element domain capabilities
XMLs (printed by the ``domcapabilities`` command on each host). The
``<mode name="host-model">`` elements themselves or even their ``<cpu>``
parent elements found in domain capabilities XMLs are not accepted. The
elements have to be transformed into actual CPU definitions.
Alternatively this command will automatically extract the CPU definitions when
provided with domain capabilities XMLs.
For historical reasons the XML *FILE* may also contain host CPU definitions,
but such usage is strongly discouraged as it will most likely provide incorrect
results.
When *FILE* contains only a single CPU definition, the command will print the
same CPU with restrictions imposed by the capabilities of the hypervisor.
@ -2428,14 +2445,15 @@ When selecting the *--state* group the following fields are returned:
* ``vcpu.<num>.state`` - state of the virtual CPU <num>, as
number from virVcpuState enum
* ``vcpu.<num>.time`` - virtual cpu time spent by virtual
CPU <num> (in microseconds)
* ``vcpu.<num>.wait`` - virtual cpu time spent by virtual
CPU <num> waiting on I/O (in microseconds)
CPU <num> (in nanoseconds)
* ``vcpu.<num>.wait`` - time the vCPU <num> thread was waiting in the runqueue
as the scheduler has something else running ahead of it (in nanoseconds),
requires CONFIG_SCHED_INFO on Linux
* ``vcpu.<num>.halted`` - virtual CPU <num> is halted: yes or
no (may indicate the processor is idle or even disabled,
depending on the architecture)
* ``vcpu.<num>.delay`` - time the vCPU <num> thread was enqueued by the
host scheduler, but was waiting in the queue instead of running.
* ``vcpu.<num>.delay`` - time the vCPU <num> thread was waiting in the runqueue
as the scheduler has something else running ahead of it (in nanoseconds).
Exposed to the VM as a steal time.
This group of statistics also reports additional hypervisor-originating per-vCPU
@ -2912,7 +2930,7 @@ Success is always reported in this case.
You can limit the types of information that are returned by specifying one or
more flags. Available information types flags are *--user*, *--os*,
*--timezone*, *--hostname*, *--filesystem*, *--disk* and *--interface*.
*--timezone*, *--hostname*, *--filesystem*, *--disk*, *--interface* and *--load*.
If an explicitly requested information type is not supported by the guest agent
at that point, the processes will provide an exit code of 1.
@ -2981,6 +2999,7 @@ returned:
* ``disk.<num>.serial`` - optional disk serial number
* ``disk.<num>.alias`` - the device alias of the disk (e.g. sda)
* ``disk.<num>.guest_alias`` - optional alias assigned to the disk
* ``disk.<num>.guest_bus`` - bus type as reported by the guest
*--interface* returns:
* ``if.count`` - the number of interfaces defined on this domain
@ -2991,6 +3010,12 @@ returned:
* ``if.<num>.addr.<num1>.addr`` - the IP address of addr <num1>
* ``if.<num>.addr.<num1>.prefix`` - the prefix of IP address of addr <num1>
*--load* returns:
* ``load.1m`` - average load in guest for last 1 minute
* ``load.5m`` - average load in guest for last 5 minutes
* ``load.15m`` - average load in guest for last 15 minutes
guestvcpus
----------
@ -3401,6 +3426,7 @@ migrate
[--parallel [--parallel-connections connections]]
[--bandwidth bandwidth] [--tls-destination hostname]
[--disks-uri URI] [--copy-storage-synchronous-writes]
[--available-switchover-bandwidth bandwidth]
Migrate domain to another host. Add *--live* for live migration; <--p2p>
for peer-2-peer migration; *--direct* for direct migration; or *--tunnelled*
@ -3657,6 +3683,17 @@ the context of the existing socket because it is different from the file
representation of the socket and the context is chosen by its creator (usually
by using *setsockcreatecon{,_raw}()* functions).
Optional *--available-switchover-bandwidth* overrides the automatically
computed bandwidth (in MiB/s) available for the final phase of (pre-copy)
migration during which CPUs are stopped and all the remaining memory and device
state is transferred. Knowing this bandwidth is important for accurate
estimation of the domain downtime and deciding the right moment for switching
over. Normally this would be estimated based on the bandwidth used by
migration, but this could be lower than the actual available bandwidth. Using
this option may help with migration convergence when the migration would keep
iterating over and over thinking there's not enough bandwidth to comply with
the configured maximum downtime.
migrate-compcache
-----------------
@ -5514,15 +5551,16 @@ List all of the devices available on the node that are known by libvirt.
separated by comma, e.g. --cap pci,scsi. Valid capability types include
'system', 'pci', 'usb_device', 'usb', 'net', 'scsi_host', 'scsi_target',
'scsi', 'storage', 'fc_host', 'vports', 'scsi_generic', 'drm', 'mdev',
'mdev_types', 'ccw', 'css', 'ap_card', 'ap_queue', 'ap_matrix'. By default,
only active devices are listed. *--inactive* is used to list only inactive
devices, and *--all* is used to list both active and inactive devices.
*--persistent* is used to list only persistent devices, and *--transient* is
used to list only transient devices. Not providing *--persistent* or
*--transient* will list all devices unless filtered otherwise. *--transient*
is mutually exclusive with *--persistent* and *--inactive*.
If *--tree* is used, the output is formatted in a tree representing parents of
each node. *--tree* is mutually exclusive with all other options but *--all*.
'mdev_types', 'ccw', 'ccwgroup', 'ccwgroup_member', 'css', 'ap_card',
'ap_queue', 'ap_matrix'. By default, only active devices are listed.
*--inactive* is used to list only inactive devices, and *--all* is used to
list both active and inactive devices. *--persistent* is used to list only
persistent devices, and *--transient* is used to list only transient devices.
Not providing *--persistent* or *--transient* will list all devices unless
filtered otherwise. *--transient* is mutually exclusive with *--persistent*
and *--inactive*. If *--tree* is used, the output is formatted in a tree
representing parents of each node. *--tree* is mutually exclusive with all
other options but *--all*.
nodedev-reattach

File diff suppressed because it is too large Load Diff

View File

@ -90,6 +90,8 @@ typedef enum {
VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_QUEUE = 1 << 19, /* s390 AP Queue (Since: 7.0.0) */
VIR_CONNECT_LIST_NODE_DEVICES_CAP_AP_MATRIX = 1 << 20, /* s390 AP Matrix (Since: 7.0.0) */
VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPD = 1 << 21, /* Device with VPD (Since: 7.9.0) */
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCWGROUP_DEV = 1 << 22, /* s390 CCWGROUP device (Since: 11.1.0) */
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCWGROUP_MEMBER = 1 << 23, /* s390 CCW device member of CCWGROUP device (Since: 11.1.0) */
VIR_CONNECT_LIST_NODE_DEVICES_PERSISTENT = 1 << 28, /* Persisted devices (Since: 10.1.0) */
VIR_CONNECT_LIST_NODE_DEVICES_TRANSIENT = 1 << 29, /* Transient devices (Since: 10.1.0) */

View File

@ -29,12 +29,14 @@
%define arches_zfs %{arches_x86} %{power64} %{arm}
%define arches_numactl %{arches_x86} %{power64} aarch64 s390x
%define arches_numad %{arches_x86} %{power64} aarch64
%define arches_ch x86_64 aarch64
# The hypervisor drivers that run in libvirtd
%define with_qemu 0%{!?_without_qemu:1}
%define with_lxc 0%{!?_without_lxc:1}
%define with_libxl 0%{!?_without_libxl:1}
%define with_vbox 0%{!?_without_vbox:1}
%define with_ch 0%{!?_without_ch:1}
%ifarch %{arches_qemu_kvm}
%define with_qemu_kvm %{with_qemu}
@ -42,6 +44,12 @@
%define with_qemu_kvm 0
%endif
%if 0%{?fedora} >= 42
%define with_account_add 0
%else
%define with_account_add 1
%endif
%define with_qemu_tcg %{with_qemu}
# RHEL disables TCG on all architectures
@ -123,6 +131,9 @@
%ifnarch %{arches_ceph}
%define with_storage_rbd 0
%endif
%ifnarch %{arches_ch}
%define with_ch 0
%endif
# RHEL doesn't ship many hypervisor drivers
%if 0%{?rhel}
@ -132,6 +143,7 @@
%define with_libxl 0
%define with_hyperv 0
%define with_lxc 0
%define with_ch 0
%endif
%define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
@ -317,6 +329,9 @@ Obsoletes: libvirt-daemon-uml <= 5.0.0
%if %{with_vbox}
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
%endif
%if %{with_ch}
Requires: libvirt-daemon-driver-ch = %{version}-%{release}
%endif
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
@ -331,7 +346,7 @@ Requires: libvirt-libs = %{version}-%{release}
BuildRequires: python3-docutils
BuildRequires: meson >= 0.56.0
BuildRequires: ninja-build
BuildRequires: git
BuildRequires: git-core
BuildRequires: perl-interpreter
BuildRequires: python3
BuildRequires: python3-pytest
@ -348,7 +363,7 @@ BuildRequires: gcc
%if %{with_libxl}
BuildRequires: xen-devel
%endif
BuildRequires: glib2-devel >= 2.58
BuildRequires: glib2-devel >= 2.66
BuildRequires: libxml2-devel
BuildRequires: readline-devel
BuildRequires: pkgconfig(bash-completion) >= 2.0
@ -526,8 +541,10 @@ Requires(posttrans): /usr/bin/systemctl
Requires(preun): /usr/bin/systemctl
# libvirtd depends on 'messagebus' service
Requires: dbus
%if %{with_account_add}
# For uid creation during pre
Requires(pre): shadow-utils
%endif
# Needed by /usr/libexec/libvirt-guests.sh script.
%if 0%{?fedora}
Requires: gettext-runtime
@ -554,6 +571,7 @@ resources
%package daemon-plugin-lockd
Summary: lockd client plugin for virtlockd
Requires: libvirt-libs = %{version}-%{release}
Requires: libvirt-daemon-common = %{version}-%{release}
Requires: libvirt-daemon-lock = %{version}-%{release}
%description daemon-plugin-lockd
@ -1026,6 +1044,20 @@ Server side daemon and driver required to manage the virtualization
capabilities of VirtualBox
%endif
%if %{with_ch}
%package daemon-driver-ch
Summary: Cloud-Hypervisor driver plugin for libvirtd daemon
Requires: libvirt-daemon-common = %{version}-%{release}
Requires: libvirt-daemon-log = %{version}-%{release}
Requires: libvirt-libs = %{version}-%{release}
%description daemon-driver-ch
The ch driver plugin for the libvirtd daemon, providing
an implementation of the hypervisor driver APIs by
Cloud-Hypervisor
%endif
%package client
Summary: Client side utilities of the libvirt library
Requires: libvirt-libs = %{version}-%{release}
@ -1071,6 +1103,10 @@ Wireshark dissector plugin for better analysis of libvirt RPC traffic.
%package login-shell
Summary: Login shell for connecting users to an LXC container
Requires: libvirt-libs = %{version}-%{release}
%if %{with_account_add}
# For uid creation during pre
Requires(pre): shadow-utils
%endif
%description login-shell
Provides the set-uid virt-login-shell binary that is used to
@ -1093,6 +1129,7 @@ Requires: sanlock >= 2.4
#for virt-sanlock-cleanup require augeas
Requires: augeas
Requires: libvirt-libs = %{version}-%{release}
Requires: libvirt-daemon-common = %{version}-%{release}
Obsoletes: libvirt-lock-sanlock < 9.1.0
Provides: libvirt-lock-sanlock = %{version}-%{release}
@ -1188,9 +1225,15 @@ exit 1
%endif
%if %{with_esx}
%define arg_esx -Ddriver_esx=enabled -Dcurl=enabled
%define arg_esx -Ddriver_esx=enabled
%else
%define arg_esx -Ddriver_esx=disabled -Dcurl=disabled
%define arg_esx -Ddriver_esx=disabled
%endif
%if %{with_esx} || %{with_ch}
%define arg_curl -Dcurl=enabled
%else
%define arg_curl -Dcurl=disabled
%endif
%if %{with_hyperv}
@ -1205,6 +1248,12 @@ exit 1
%define arg_vmware -Ddriver_vmware=disabled
%endif
%if %{with_ch}
%define arg_ch -Ddriver_ch=enabled
%else
%define arg_ch -Ddriver_ch=disabled
%endif
%if %{with_storage_rbd}
%define arg_storage_rbd -Dstorage_rbd=enabled
%else
@ -1335,11 +1384,12 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
-Ddriver_remote=enabled \
-Ddriver_test=enabled \
%{?arg_esx} \
%{?arg_curl} \
%{?arg_hyperv} \
%{?arg_vmware} \
%{?arg_ch} \
-Ddriver_vz=disabled \
-Ddriver_bhyve=disabled \
-Ddriver_ch=disabled \
%{?arg_remote_mode} \
-Ddriver_interface=enabled \
-Ddriver_network=enabled \
@ -1419,6 +1469,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
-Dblkid=disabled \
-Dcapng=disabled \
-Ddriver_bhyve=disabled \
-Ddriver_ch=disabled \
-Ddriver_hyperv=disabled \
-Ddriver_interface=disabled \
-Ddriver_libvirtd=disabled \
@ -1541,6 +1592,10 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
%endif
%if ! %{with_ch}
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_ch.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_ch.aug
%endif
# Copied into libvirt-docs subpackage eventually
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
@ -1751,10 +1806,12 @@ export VIR_TEST_DEBUG=1
%pre daemon-common
%libvirt_sysconfig_pre libvirt-guests
%libvirt_systemd_oneshot_pre libvirt-guests
%if %{with_account_add}
# 'libvirt' group is just to allow password-less polkit access to libvirt
# daemons. The uid number is irrelevant, so we use dynamic allocation.
getent group libvirt >/dev/null || groupadd -r libvirt
exit 0
%endif
%posttrans daemon-common
%libvirt_sysconfig_posttrans libvirt-guests
@ -1877,6 +1934,7 @@ exit 0
%libvirt_sysconfig_pre virtqemud
%libvirt_systemd_unix_pre virtqemud
%if %{with_account_add}
# We want soft static allocation of well-known ids, as disk images
# are commonly shared across NFS mounts by id rather than name.
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/
@ -1892,6 +1950,7 @@ if ! getent passwd 'qemu' >/dev/null; then
fi
fi
exit 0
%endif
%posttrans daemon-driver-qemu
%libvirt_sysconfig_posttrans virtqemud
@ -1940,6 +1999,19 @@ exit 0
%libvirt_systemd_unix_preun virtxend
%endif
%if %{with_ch}
%pre daemon-driver-ch
%libvirt_sysconfig_pre virtchd
%libvirt_systemd_unix_pre virtchd
%posttrans daemon-driver-ch
%libvirt_sysconfig_posttrans virtchd
%libvirt_systemd_unix_posttrans virtchd
%preun daemon-driver-ch
%libvirt_systemd_unix_preun virtchd
%endif
%pre daemon-config-network
%libvirt_systemd_config_pre libvirtd
%libvirt_systemd_config_pre virtnetworkd
@ -2005,8 +2077,10 @@ done
%if %{with_lxc}
%pre login-shell
%if %{with_account_add}
getent group virtlogin >/dev/null || groupadd -r virtlogin
exit 0
%endif
%endif
%endif
@ -2027,7 +2101,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
%dir %{_datadir}/augeas/lenses
%{_datadir}/augeas/lenses/libvirtd.aug
%dir %{_datadir}/augeas/lenses/tests
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
%attr(0755, root, root) %{_sbindir}/libvirtd
%{_mandir}/man8/libvirtd.8*
@ -2048,9 +2124,11 @@ exit 0
%dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/
%dir %attr(0755, root, root) %{_libdir}/libvirt/storage-backend/
%dir %attr(0755, root, root) %{_libdir}/libvirt/storage-file/
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
%{_datadir}/polkit-1/rules.d/50-libvirt.rules
%{_sysusersdir}/libvirt.conf
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
%attr(0755, root, root) %{_bindir}/virt-ssh-helper
@ -2078,7 +2156,6 @@ exit 0
%{_mandir}/man8/virtlockd.8*
%files daemon-plugin-lockd
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
%files daemon-log
@ -2217,7 +2294,6 @@ exit 0
%ghost %dir %{_rundir}/libvirt/storage/
%{_libdir}/libvirt/connection-driver/libvirt_driver_storage.so
%{_libdir}/libvirt/storage-backend/libvirt_storage_backend_fs.so
%{_libdir}/libvirt/storage-file/libvirt_storage_file_fs.so
%{_mandir}/man8/virtstoraged.8*
%files daemon-driver-storage-disk
@ -2393,7 +2469,6 @@ exit 0
%if %{with_libxl}
%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
%endif
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
%{_datadir}/augeas/lenses/libvirt_sanlock.aug
%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
@ -2403,6 +2478,19 @@ exit 0
%attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
%endif
%if %{with_ch}
%files daemon-driver-ch
%attr(0755, root, root) %{_sbindir}/virtchd
%config(noreplace) %{_sysconfdir}/libvirt/virtchd.conf
%{_datadir}/augeas/lenses/virtchd.aug
%{_datadir}/augeas/lenses/tests/test_virtchd.aug
%{_unitdir}/virtchd-admin.socket
%{_unitdir}/virtchd-ro.socket
%{_unitdir}/virtchd.service
%{_unitdir}/virtchd.socket
%{_libdir}/libvirt/connection-driver/libvirt_driver_ch.so
%endif
%files client
%{_mandir}/man1/virsh.1*
%{_mandir}/man1/virt-xml-validate.1*
@ -2433,15 +2521,17 @@ exit 0
%{_libdir}/libvirt-lxc.so.*
%{_libdir}/libvirt-admin.so.*
%dir %{_datadir}/libvirt/
%{_datadir}/libvirt/test-screenshot.png
%dir %{_datadir}/libvirt/schemas/
%{_datadir}/libvirt/schemas/*.rng
%dir %{_datadir}/systemtap/tapset/
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
%{_datadir}/systemtap/tapset/libvirt_functions.stp
%if %{with_qemu}
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
%endif
%{_datadir}/libvirt/schemas/*.rng
%dir %{_datadir}/libvirt/cpu_map
%{_datadir}/libvirt/cpu_map/*.xml
%{_datadir}/libvirt/test-screenshot.png
%if %{with_wireshark}
%files wireshark
@ -2461,6 +2551,7 @@ exit 0
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
%{_libexecdir}/virt-login-shell-helper
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
%{_sysusersdir}/libvirt-login-shell.conf
%{_mandir}/man1/virt-login-shell.1*
%endif

View File

@ -1,6 +1,6 @@
project(
'libvirt', 'c',
version: '10.10.0',
version: '11.2.0',
license: 'LGPLv2+',
meson_version: '>= 0.56.0',
default_options: [
@ -15,6 +15,10 @@ if meson.version().version_compare('>=0.64.0')
fs = import('fs')
endif
i18n = import('i18n')
po_dir = meson.project_source_root() / 'po'
# figure out if we are building from git
git = run_command('test', '-e', '.git', check: false).returncode() == 0
@ -78,7 +82,7 @@ endif
runstatedir = get_option('runstatedir')
if runstatedir == ''
runstatedir = localstatedir / 'run'
runstatedir = '/run'
endif
initconfdir = get_option('initconfdir')
@ -114,6 +118,8 @@ localedir = prefix / get_option('localedir')
mandir = prefix / get_option('mandir')
sbindir = prefix / get_option('sbindir')
sharedstatedir = prefix / get_option('sharedstatedir')
polkitactionsdir = datadir / 'polkit-1' / 'actions'
polkitrulesdir = datadir / 'polkit-1' / 'rules.d'
docdir = get_option('docdir')
if docdir == ''
@ -128,6 +134,11 @@ if sshconfdir == ''
sshconfdir = sysconfdir / 'ssh' / 'ssh_config.d'
endif
connection_driver_install_dir = libdir / 'libvirt' / 'connection-driver'
storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
lock_driver_install_dir = libdir / 'libvirt' / 'lock-driver'
# generate configmake.h header
@ -998,7 +1009,7 @@ else
endif
endif
glib_version = '2.58.0'
glib_version = '2.66.0'
glib_dep = dependency('glib-2.0', version: '>=' + glib_version)
gobject_dep = dependency('gobject-2.0', version: '>=' + glib_version)
if host_machine.system() == 'windows'
@ -1576,8 +1587,15 @@ elif get_option('driver_lxc').enabled()
error('linux and remote_driver are required for LXC')
endif
if not get_option('driver_ch').disabled() and host_machine.system() == 'linux' and (host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64')
use_ch = true
if not get_option('driver_ch').disabled()
if host_machine.system() == 'linux' and (host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64')
use_ch = true
else
use_ch = false
if get_option('driver_ch').enabled()
error('linux on x86_64 or aarch64 is required to build Cloud-Hypervisor driver')
endif
endif
if not conf.has('WITH_LIBVIRTD')
use_ch = false
@ -1787,11 +1805,11 @@ if conf.has('WITH_LIBVIRTD')
conf.set('WITH_STORAGE_DIR', 1)
endif
if not get_option('storage_disk').disabled() and devmapper_dep.found() and libparted_dep.found()
if not get_option('storage_disk').disabled() and libparted_dep.found()
use_storage = true
conf.set('WITH_STORAGE_DISK', 1)
elif get_option('storage_disk').enabled()
error('You must install libparted and libdevmapper to compile libvirt with disk storage driver')
error('You must install libparted to compile libvirt with disk storage driver')
endif
if not get_option('storage_fs').disabled()

View File

@ -1,6 +1,7 @@
src/access/viraccessapicheck.c
src/access/viraccessapichecklxc.c
src/access/viraccessapicheckqemu.c
src/access/org.libvirt.api.policy.in
src/admin/admin_client.h
src/admin/admin_server_dispatch_stubs.h
src/remote/remote_client_bodies.h
@ -21,6 +22,7 @@ src/bhyve/bhyve_process.c
src/ch/ch_conf.c
src/ch/ch_domain.c
src/ch/ch_driver.c
src/ch/ch_events.c
src/ch/ch_hostdev.c
src/ch/ch_interface.c
src/ch/ch_monitor.c
@ -94,6 +96,7 @@ src/hyperv/hyperv_util.c
src/hyperv/hyperv_wmi.c
src/hypervisor/domain_cgroup.c
src/hypervisor/domain_driver.c
src/hypervisor/domain_logcontext.c
src/hypervisor/domain_interface.c
src/hypervisor/virhostdev.c
src/interface/interface_backend_netcf.c
@ -180,7 +183,6 @@ src/qemu/qemu_hostdev.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_interface.c
src/qemu/qemu_interop_config.c
src/qemu/qemu_logcontext.c
src/qemu/qemu_migration.c
src/qemu/qemu_migration_cookie.c
src/qemu/qemu_migration_params.c
@ -201,6 +203,7 @@ src/qemu/qemu_validate.c
src/qemu/qemu_vhost_user.c
src/qemu/qemu_vhost_user_gpu.c
src/qemu/qemu_virtiofs.c
src/remote/libvirtd.policy.in
src/remote/remote_daemon.c
src/remote/remote_daemon_config.c
src/remote/remote_daemon_dispatch.c
@ -293,6 +296,7 @@ src/util/virhostcpu.c
src/util/virhostmem.c
src/util/virhostuptime.c
src/util/viridentity.c
src/util/virinhibitor.c
src/util/virinitctl.c
src/util/viriscsi.c
src/util/virjson.c

1167
po/as.po

File diff suppressed because it is too large Load Diff

1086
po/bg.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1086
po/bs.po

File diff suppressed because it is too large Load Diff

1091
po/ca.po

File diff suppressed because it is too large Load Diff

1295
po/cs.po

File diff suppressed because it is too large Load Diff

1086
po/da.po

File diff suppressed because it is too large Load Diff

1172
po/de.po

File diff suppressed because it is too large Load Diff

1070
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

8792
po/es.po

File diff suppressed because it is too large Load Diff

1181
po/fi.po

File diff suppressed because it is too large Load Diff

1291
po/fr.po

File diff suppressed because it is too large Load Diff

1156
po/gu.po

File diff suppressed because it is too large Load Diff

1152
po/hi.po

File diff suppressed because it is too large Load Diff

1066
po/hr.po

File diff suppressed because it is too large Load Diff

1086
po/hu.po

File diff suppressed because it is too large Load Diff

1084
po/id.po

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More