]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
3 months agoTranslated using Weblate (Korean) v11.5.0-rc2
김인수 [Fri, 27 Jun 2025 10:18:40 +0000 (10:18 +0000)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10937 of 10937 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
3 months agoTranslated using Weblate (Korean)
김인수 [Fri, 27 Jun 2025 09:23:40 +0000 (09:23 +0000)] 
Translated using Weblate (Korean)

Currently translated at 99.9% (10930 of 10937 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
Translated using Weblate (Korean)

Currently translated at 99.7% (10915 of 10937 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
3 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Fri, 27 Jun 2025 09:23:40 +0000 (09:23 +0000)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10937 of 10937 strings)

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

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

Currently translated at 99.9% (10932 of 10937 strings)

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

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

Currently translated at 99.8% (10920 of 10937 strings)

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

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

Currently translated at 99.6% (10902 of 10937 strings)

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

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

Currently translated at 99.6% (10901 of 10937 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
3 months agoTranslated using Weblate (Spanish)
Nicolás Gal [Fri, 27 Jun 2025 09:23:39 +0000 (09:23 +0000)] 
Translated using Weblate (Spanish)

Currently translated at 53.6% (5867 of 10937 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
3 months agoUpdate translation files
Weblate [Tue, 24 Jun 2025 15:02:51 +0000 (15:02 +0000)] 
Update translation files

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

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

Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
3 months agopo: Refresh potfile for v11.5.0 v11.5.0-rc1
Jiri Denemark [Tue, 24 Jun 2025 14:55:43 +0000 (16:55 +0200)] 
po: Refresh potfile for v11.5.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Add 'disk-usb-device-model' case
Peter Krempa [Tue, 24 Jun 2025 13:48:47 +0000 (15:48 +0200)] 
qemuxmlconftest: Add 'disk-usb-device-model' case

Add a test case for explicitly selected USB disk models.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemu: Replace usb-storage with usb-bot
Akihiko Odaki [Sat, 8 Mar 2025 05:57:41 +0000 (14:57 +0900)] 
qemu: Replace usb-storage with usb-bot

usb-storage is a compound device that automatically creates a USB mass
storage device and a SCSI device as its backend. Unfortunately it lacks
some configuration options that are usually present with a SCSI device,
and cannot represent CD-ROM in particular.

Replace usb-storage with usb-bot, which can be combined with a manually
created SCSI device. libvirt will configure the SCSI device in a way
identical with how QEMU does for usb-storage except that now it respects
a configuration option to represent CD-ROM.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/368
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Prepare for proper testing in 'disk-cdrom-usb-empty'
Peter Krempa [Mon, 23 Jun 2025 14:14:05 +0000 (16:14 +0200)] 
qemuxmlconftest: Prepare for proper testing in 'disk-cdrom-usb-empty'

Modify the validation of empty cdroms to trigger only for
VIR_DOMAIN_DISK_MODEL_USB_STORAGE as with 'usb-bot' we can properly
emulate a cdrom.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemu: monitor: Introduce 'qemuMonitorSetUSBDiskAttached'
Peter Krempa [Thu, 19 Jun 2025 13:58:44 +0000 (15:58 +0200)] 
qemu: monitor: Introduce 'qemuMonitorSetUSBDiskAttached'

The helper sets the 'attached' property of the 'usb-bot' device to true,
which will be used on the hotplug code path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuBuildDeviceAddresDriveProps: Prepare for 'drive' address for usb-bot disks
Peter Krempa [Thu, 19 Jun 2025 07:46:38 +0000 (09:46 +0200)] 
qemuBuildDeviceAddresDriveProps: Prepare for 'drive' address for usb-bot disks

While the 'usb-storage' based disks use the USB address directly, with
'usb-bot' the USB address is on the "controller" part of the device and
the 'scsi-hd/cd' device will use a 'drive' address from qemu's PoV.

Since we do not want to expose the 'usb-bot' as explicit controller
to preserve compatibility with existing configs we plan to upgrade
implement the formatter for 'drive' address when the "diskbus" property
is VIR_DOMAIN_DISK_BUS_USB.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemu: Fill in model of 'usb' disks to preserve ABI compatibility
Peter Krempa [Mon, 23 Jun 2025 15:51:16 +0000 (17:51 +0200)] 
qemu: Fill in model of 'usb' disks to preserve ABI compatibility

While 'usb-bot' and 'usb-storage' are ABI and migration compatible for
disks it's not the case for cdroms. When migrating from a new config
using 'usb-bot' to an older daemon which would use 'usb-storage' the
guest os will get I/O errors.

Thus we must properly fill in models for 'usb' disks so that cdroms can
be handled properly.

When parsing XML fill in the models and drop the appropriate models when
formatting migratable XML.

The logic is explained in comments in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoconf: introduce usb disk models 'usb-storage' and 'usb-bot'
Peter Krempa [Thu, 19 Jun 2025 13:46:46 +0000 (15:46 +0200)] 
conf: introduce usb disk models 'usb-storage' and 'usb-bot'

Historically libvirt specified 'usb-storage' as driver for USB disks.
This though combined with '-blockdev' doesn't properly configure the
device to look like CDROM for <disk type='cdrom'>.

'usb-bot' acts like a controler and allows explicitly connecting a
-device to it.

In qemu the devices share implementation so they are effectively
identical and can be used interchangably. There is a difference in how
the storage device itself (the SCSI part) looks when configured properly
as CDROM which is unfortunately not compatible/interchangable.

As this is effectively a bugfix we'll be fixing the behaviour for the
default configuration. The possibility to explicitly set the model is
added as a possibility for working around possible problems if they'd
appear.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Invoke "disk-usb-device" case also without QEMU_CAPS_DEVICE_USB_BOT...
Peter Krempa [Thu, 19 Jun 2025 13:31:46 +0000 (15:31 +0200)] 
qemuxmlconftest: Invoke "disk-usb-device" case also without QEMU_CAPS_DEVICE_USB_BOT and with ABI_UPDATE

The QEMU_CAPS_DEVICE_USB_BOT device can be compiled out but
realistically it makes no sense to do it thus also makes no sense to
have another variant of input data for it.

Add another invocation of "disk-usb-device" clearing QEMU_CAPS_DEVICE_USB_BOT
to show the fallback code paths.

Also add "ABI_UPDATE" version for the two cases above as the ABI of
usb-bot cdrom is not migration-compatible and we'll be wanting to update
to the fixed configuration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemu_capabilities: Introduce QEMU_CAPS_DEVICE_USB_BOT
Akihiko Odaki [Sat, 8 Mar 2025 05:57:40 +0000 (14:57 +0900)] 
qemu_capabilities: Introduce QEMU_CAPS_DEVICE_USB_BOT

usb-bot is supported by all supported QEMU versions; it is present since
1.4.0 and libvirt supports 4.2.0 or later.

Add a capability just in case USB_STORAGE_BOT is disabled when building
QEMU.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Distribute testing of 'removable' disk property
Peter Krempa [Thu, 19 Jun 2025 08:07:35 +0000 (10:07 +0200)] 
qemuxmlconftest: Distribute testing of 'removable' disk property

The 'removable' property is tested for 'usb' and 'scsi' disks. The test
case for 'usb' disks already has another test case for this, so add
testing of 'removable' SCSI disks into the 'disk-scsi' case and remove
the 'disk-device-removable' case completely.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Drop 'disk-cdrom-bus-other'
Peter Krempa [Thu, 19 Jun 2025 08:03:34 +0000 (10:03 +0200)] 
qemuxmlconftest: Drop 'disk-cdrom-bus-other'

The test case is now redundant since 'disk-usb-device' case also tests
all cdrom configurations. Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemusecuritytest: Use 'disk-usb-device' case instead of 'disk-cdrom-bus-other'
Peter Krempa [Thu, 19 Jun 2025 12:27:26 +0000 (14:27 +0200)] 
qemusecuritytest: Use 'disk-usb-device' case instead of 'disk-cdrom-bus-other'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuxmlconftest: Test various combinations of config
Peter Krempa [Thu, 19 Jun 2025 07:58:10 +0000 (09:58 +0200)] 
qemuxmlconftest: Test various combinations of config

Add multiple USB disks to the definition testing a matrix of 'disk' and
'cdrom' <disk> elements with user-aliases, 'serial' and 'removable'
properties configured.

This patch also removes the 'ide' disk which is not related to what
we're testing here.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoqemuhotplugtest: Use VIR_DOMAIN_DEF_PARSE_ABI_UPDATE for virDomainDeviceDefParse
Peter Krempa [Mon, 23 Jun 2025 16:26:19 +0000 (18:26 +0200)] 
qemuhotplugtest: Use VIR_DOMAIN_DEF_PARSE_ABI_UPDATE for virDomainDeviceDefParse

The qemu hotplug code parses the device with ABI updates enabled so
qemuhotplugtest ought to do the same.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
3 months agoTranslated using Weblate (Spanish)
Nicolás Gal [Mon, 23 Jun 2025 15:48:32 +0000 (15:48 +0000)] 
Translated using Weblate (Spanish)

Currently translated at 53.6% (5862 of 10925 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
3 months agoutil: workaround libxml2 lack of thread safe initialization
Daniel P. Berrangé [Mon, 23 Jun 2025 10:50:47 +0000 (11:50 +0100)] 
util: workaround libxml2 lack of thread safe initialization

The main XML parser code global initializer historically had a mutex
protecting it, and more recently uses a pthread_once. The RelaxNG
code, however, relies on two other global initializers that are
not thread safe, just relying on setting an integer "initialized"
flag.

Calling the relevant initializers from libvirt in a protected global
initializer will protect libvirt's own concurrent usage, however, it
cannot protect against other libraries loaded in process that might
be using libxml2's schema code. Fortunately:

 * The chances of other loaded non-libvirt code using libxml is
   relatively low
 * The chances of other loaded non-libvirt code using the schema
   validation / catalog functionality inside libxml is even
   lower
 * The chances of both libvirt and the non-libvirt usage having
   their *1st* usage of libxml2 be concurrent is tiny

IOW, in practice, although our solution doesn't fully fix the thread
safety, it is good enough.

libxml2 should none the less still be fixed to make its global
initializers be thread safe without special actions by its API
consumers[1].

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/788
[1] https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/326
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoconf: add passthrough and xtsup attributes for IOMMU
Ján Tomko [Fri, 14 Mar 2025 16:13:31 +0000 (17:13 +0100)] 
conf: add passthrough and xtsup attributes for IOMMU

For the newly supported AMD device.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agoqemu: add IOMMU model amd
Ján Tomko [Fri, 14 Mar 2025 16:13:09 +0000 (17:13 +0100)] 
qemu: add IOMMU model amd

Introduce a new IOMMU device model 'amd', both the parser
and the formatter for QEMU because of our enum warnings.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agodocs: formatdomain: document intel-only IOMMU attributes
Ján Tomko [Wed, 19 Mar 2025 00:55:02 +0000 (01:55 +0100)] 
docs: formatdomain: document intel-only IOMMU attributes

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agoqemu: introduce QEMU_CAPS_PCI_ID
Ján Tomko [Wed, 12 Mar 2025 15:22:25 +0000 (16:22 +0100)] 
qemu: introduce QEMU_CAPS_PCI_ID

Introduced by QEMU commit f864a3235ea1d1d714b3cde2d9a810ea6344a7b5
the presence of this attribute allows libvirt to specify the alias
of the AMDVI-PCI device explicitly.

(It was implicit before the introduction of this attribute)

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agoqemu: introduce QEMU_CAPS_AMD_IOMMU
Ján Tomko [Wed, 12 Mar 2025 15:10:31 +0000 (16:10 +0100)] 
qemu: introduce QEMU_CAPS_AMD_IOMMU

Check for the presence of the amd-iommu device, so we can conditionalize
probing for its properties.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agoNEWS: mention console type in domain capabilities
Roman Bogorodskiy [Thu, 19 Jun 2025 18:15:40 +0000 (20:15 +0200)] 
NEWS: mention console type in domain capabilities

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirSocketAddrPrefixToNetmask: Prevent undefined behaviour on bitshifts on signed...
Peter Krempa [Wed, 18 Jun 2025 06:29:01 +0000 (08:29 +0200)] 
virSocketAddrPrefixToNetmask: Prevent undefined behaviour on bitshifts on signed integer

Shifting bits into the sign bit is undefined behaviour in C although
both gcc and clang handle it as expected.

Since the value is used as unsigned convert it to unsigned int. For code
readability use 'if' statement instead of a ternary.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/785
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
3 months agotlscert: Don't force 'keyEncipherment' for ECDSA and ECDH
Peter Krempa [Tue, 17 Jun 2025 13:01:26 +0000 (15:01 +0200)] 
tlscert: Don't force 'keyEncipherment' for ECDSA and ECDH

Per RFC8813 [1] which amends RFC5580 [2] ECDSA, ECDH, and ECMQV
algorithms must not have 'keyEncipherment' present, but our code did
check it. Add exemption for known algorithms which don't use it.

[1] https://datatracker.ietf.org/doc/rfc8813/
[2] https://datatracker.ietf.org/doc/rfc5480

Closes: https://gitlab.com/libvirt/libvirt/-/issues/691
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agostorage: disk: Properly handle partition numbers separated by 'p'
Peter Krempa [Tue, 17 Jun 2025 08:42:52 +0000 (10:42 +0200)] 
storage: disk: Properly handle partition numbers separated by 'p'

The 'p' separator for partitions is now common also for NVMe devices.
Fix the algorithm to extract the partition number to always consider it.

The fix is based on suggestion in the issue mentioned below.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/239
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agostorage: parthelper: Use if/else instead of ternary operator
Peter Krempa [Tue, 17 Jun 2025 08:29:05 +0000 (10:29 +0200)] 
storage: parthelper: Use if/else instead of ternary operator

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirshPrintJobProgress: Don't rewrite migration status line on non-terminals
Peter Krempa [Tue, 17 Jun 2025 08:00:20 +0000 (10:00 +0200)] 
virshPrintJobProgress: Don't rewrite migration status line on non-terminals

On non-terminals print each progress report on a new line. Fix based on
suggestion in the issue report.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/756
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirQEMUCapsFindBinary: Refactor local variables
Peter Krempa [Fri, 6 Jun 2025 10:32:37 +0000 (12:32 +0200)] 
virQEMUCapsFindBinary: Refactor local variables

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agostorage_file_probe: Use named initializer for 'struct FileTypeInfo'
Peter Krempa [Thu, 23 Nov 2023 16:28:16 +0000 (17:28 +0100)] 
storage_file_probe: Use named initializer for 'struct FileTypeInfo'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agosecurity_manager: Don't leak seclabel in virSecurityManagerGenLabel()
Michal Privoznik [Mon, 16 Jun 2025 10:05:24 +0000 (12:05 +0200)] 
security_manager: Don't leak seclabel in virSecurityManagerGenLabel()

When a domain is being started, seclabels are generated for it.
This is handled in virSecurityManagerGenLabel() which can either
find pre-existing seclabel in domain def or generate a new one.
At any rate, domainGenSecurityLabel() callback is called and if
it fails then the seclabel is removed from domain definition
using VIR_DELETE_ELEMENT(). While this shrinks down the seclabels
array, it does not free individual item. It has to be freed
manually.

80 bytes in 2 blocks are definitely lost in loss record 1,359 of 1,876
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F19B29: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8200.5)
   by 0x49E4953: virSecurityLabelDefNew (virseclabel.c:59)
   by 0x4BDE0A4: virSecurityManagerGenLabel (security_manager.c:638)
   by 0xBA029B7: qemuProcessPrepareDomain (qemu_process.c:6760)
   by 0xBA07DF2: qemuProcessStart (qemu_process.c:8369)
   by 0xB93DAC0: qemuDomainObjStart (qemu_driver.c:6371)
   by 0xB93DE08: qemuDomainCreateWithFlags (qemu_driver.c:6420)
   by 0xB93DE86: qemuDomainCreate (qemu_driver.c:6438)
   by 0x4CECEA8: virDomainCreate (libvirt-domain.c:7142)

Now, you might think this may lead to a double free, because
@seclabel is freed under the 'cleanup' label (if @generated is
true). But if @generated is true, then just before calling the
callback there's VIR_APPEND_ELEMENT() which clears @seclabel out
turning the free under 'cleanup' label into a NOP.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoTranslated using Weblate (Italian)
Salvatore Cocuzza [Mon, 16 Jun 2025 17:43:02 +0000 (17:43 +0000)] 
Translated using Weblate (Italian)

Currently translated at 22.4% (2448 of 10925 strings)

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

Signed-off-by: Salvatore Cocuzza <info@salvatorecocuzza.it>
3 months agoTranslated using Weblate (Greek)
Jim Spentzos [Mon, 16 Jun 2025 17:43:02 +0000 (17:43 +0000)] 
Translated using Weblate (Greek)

Currently translated at 1.2% (138 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translated using Weblate (Greek)

Currently translated at 1.2% (137 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translated using Weblate (Greek)

Currently translated at 1.2% (136 of 10925 strings)

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

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
3 months agoTranslated using Weblate (Croatian)
Edmon Begoli [Mon, 16 Jun 2025 17:43:01 +0000 (17:43 +0000)] 
Translated using Weblate (Croatian)

Currently translated at 0.1% (3 of 10925 strings)

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

Signed-off-by: Edmon Begoli <ebegoli@gmail.com>
3 months agoTranslated using Weblate (Korean)
김인수 [Mon, 16 Jun 2025 17:43:01 +0000 (17:43 +0000)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10925 of 10925 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
Translated using Weblate (Korean)

Currently translated at 99.9% (10922 of 10925 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
3 months agoTranslated using Weblate (Italian)
Andrea Morelli [Mon, 16 Jun 2025 17:43:00 +0000 (17:43 +0000)] 
Translated using Weblate (Italian)

Currently translated at 22.3% (2440 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
Translated using Weblate (Italian)

Currently translated at 22.2% (2436 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
Translated using Weblate (Italian)

Currently translated at 22.0% (2413 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
Translated using Weblate (Italian)

Currently translated at 21.9% (2398 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
Translated using Weblate (Italian)

Currently translated at 21.5% (2350 of 10925 strings)

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

Signed-off-by: Andrea Morelli <morelliandrea973@gmail.com>
3 months agoqemu: Be more forgiving when acquiring QUERY job when formatting domain XML
Michal Privoznik [Mon, 16 Jun 2025 08:28:37 +0000 (10:28 +0200)] 
qemu: Be more forgiving when acquiring QUERY job when formatting domain XML

In my previous commit of v11.0.0-rc1~115 I've made QEMU driver
implementation for virDomainGetXMLDesc() (qemuDomainGetXMLDesc())
acquire QERY job. See its commit message for more info. But this
unfortunately broke apps witch fetch domain XML for incoming
migration (like virt-manager). The reason is that for incoming
migration the VIR_ASYNC_JOB_MIGRATION_IN async job is set, but
the mask of allowed synchronous jobs is empty (because QEMU can't
talk on monitor really). This makes virDomainObjBeginJob() fail
which in turn makes qemuDomainGetXMLDesc() fail too.

It makes sense for qemuDomainGetXMLDesc() to acquire the job
(e.g. so that it's coherent with another thread that might be in
the middle of a MODIFY job). But failure to dump XML may be
treated as broken daemon (e.g. virt-manager does so).

Therefore, still try to acquire the QUERY job (if job mask
permits it) but, do not treat failure as an error.

Fixes: 6cc93bf28842526be2fd596a607ebca796b7fb2e
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2369243
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
3 months agoNEWS: Mention cacert parameter in esx driver
Martin Kletzander [Mon, 9 Jun 2025 14:22:59 +0000 (16:22 +0200)] 
NEWS: Mention cacert parameter in esx driver

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoesx: Allow specifying different CA bundle for remote connections
Martin Kletzander [Mon, 9 Jun 2025 13:40:12 +0000 (15:40 +0200)] 
esx: Allow specifying different CA bundle for remote connections

Add new URI parameter which allows for using non-system CA certificates
to verify remote peers.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirsh: await: Introduce 'guest-agent-available' condition
Peter Krempa [Wed, 4 Jun 2025 07:48:40 +0000 (09:48 +0200)] 
virsh: await: Introduce 'guest-agent-available' condition

The new condition allows waiting for the guest agent to show up, which
usually means that the guest has booted enough to respond to external
stimuli.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirsh: Introduce 'await' command for waiting until target domain state is reached
Peter Krempa [Thu, 27 Jan 2022 13:12:49 +0000 (14:12 +0100)] 
virsh: Introduce 'await' command for waiting until target domain state is reached

The new command is meant as syntax sugar for event handling which blocks
virsh until the requested state condition is reached.

The initial implementation adds a condition 'domain-inactive' returning
if the domain is/becomes inactive for whatever reason.

This command is useful for simple scripts e.g. for debugging libvirt
when it allows responding to target state in shell without the need to
fuss too much with polling or writing handlers around 'virsh event'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovsh: Add support for commands with more return values
Peter Krempa [Tue, 3 Jun 2025 15:25:36 +0000 (17:25 +0200)] 
vsh: Add support for commands with more return values

Add a new handler callback for command handlers which will want to
return more than just EXIT_SUCCESS/EXIT_FAILURE.

The new handler allows returning integers. Any negative values are
converted to EXIT_FAILURE, other values are returned as reported in
cases where we forward the command state (non-interactive usage) as
return value of the virt shell program.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovshCommandRun: Convert to directly return the exit code
Peter Krempa [Tue, 3 Jun 2025 15:18:02 +0000 (17:18 +0200)] 
vshCommandRun: Convert to directly return the exit code

Currently the handler functions in the virt shells return only a boolean
signalling if the command was successful or not. In preparation for a
command which will want to return another value (timeout) convert
vshCommand run to actually return the requested exit code instead and
document the conversion from boolean.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirsh: cmdEvent: Ensure that event callbacks are unregistered before returning
Peter Krempa [Thu, 5 Jun 2025 05:52:03 +0000 (07:52 +0200)] 
virsh: cmdEvent: Ensure that event callbacks are unregistered before returning

Successful return from 'virConnectDomainEventDeregisterAny' does not
guarantee that there aren't still in-progress events being handled by
the callbacks. Since 'cmdEvent' passes in a slice from an array as the
private data of the callbacks, we must ensure that the array stays in
scope (it's auto-freed) for the whole time there are possible callbacks
being executed.

While in practice this doesn't happen as the callbacks are usually quick
enough to finish while unregistering stuff, placing a 'sleep(1)' into
e.g. 'virshEventLifecyclePrint' and starting a domain results in crash
of virsh with the following backtrace:

 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x00005557b5cfd343 in virshEventPrintf (data=data@entry=0x5557db9619b0, fmt=fmt@entry=0x5557b5d5e527 "%s") at ../../../libvirt/tools/virsh-domain-event.c:252

 Thread 2 (Thread 0x7f59a54b7d00 (LWP 2097121)):
 #0  0x00007f59a6cadbf9 in __futex_abstimed_wait_common () at /lib64/libc.so.6
 #1  0x00007f59a6cb2cf3 in __pthread_clockjoin_ex () at /lib64/libc.so.6
 #2  0x00005557b5cd57f6 in virshDeinit (ctl=0x7ffc7b615140) at ../../../libvirt/tools/virsh.c:408
 #3  0x00005557b5cd5391 in main (argc=<optimized out>, argv=<optimized out>) at ../../../libvirt/tools/virsh.c:932

 Thread 1 (Thread 0x7f59a51a66c0 (LWP 2097122)):
 #0  0x00005557b5cfd343 in virshEventPrintf (data=data@entry=0x5557db9619b0, fmt=fmt@entry=0x5557b5d5e527 "%s") at ../../../libvirt/tools/virsh-domain-event.c:252
 #1  0x00005557b5cffa10 in virshEventPrint (data=0x5557db9619b0, buf=0x7f59a51a55c0) at ../../../libvirt/tools/virsh-domain-event.c:290
 #2  virshEventLifecyclePrint (conn=<optimized out>, dom=<optimized out>, event=<optimized out>, detail=<optimized out>, opaque=0x5557db9619b0) at ../../../libvirt/
 [snipped]

From the backtrace you can see that the 'main()' thread is already
shutting down virsh, which means that 'cmdEvent' terminated and the
private data was freed. The event loop thread is still execing the
callback which accesses the data.

To fix this add a condition and wait on all of the callbacks to be
unregistered first (their private data freeing function will be called).

This bug was observed when I've copied the event code for a new virsh
command which had a bit more involved callbacks.

Fixes: 99fa96c3907
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirthread: Add infrastructure for static virCond definitions
Peter Krempa [Wed, 4 Jun 2025 19:59:12 +0000 (21:59 +0200)] 
virthread: Add infrastructure for static virCond definitions

Add the automatic cleanup handler as well as static initializer to allow
simple stack allocated conditions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovirthread: Register auto cleanup function for virMutex
Peter Krempa [Wed, 4 Jun 2025 19:56:25 +0000 (21:56 +0200)] 
virthread: Register auto cleanup function for virMutex

This makes it very convenient to declare a mutex on stack along with the
VIR_MUTEX_INITIALIZE macro without the need to have complex cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agodocs: Note that zero detection on migration sparsifies image only when discard='unmap...
Peter Krempa [Thu, 5 Jun 2025 13:12:40 +0000 (15:12 +0200)] 
docs: Note that zero detection on migration sparsifies image only when discard='unmap' is set

The mirroring job clears the destination to ensure that the guest
visible disk contents are identical to the state on the source. The
image itself is kept sparse only when the disk 'discard' option is set
to 'unmap' (Also the disks would eventually desparsify itself anyways
with disabled discards). Note it in the docs for the user.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
3 months agoRevert "docs: Add warning about using a cleared image with VIR_MIGRATE_PARAM_MIGRATE_...
Peter Krempa [Thu, 5 Jun 2025 12:42:46 +0000 (14:42 +0200)] 
Revert "docs: Add warning about using a cleared image with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES_ZEROES"

QEMU clears the images even when sparse mode is required so asking the
users to do so is not needed. Remove the docs.

This reverts commit 332ee4931a84ec23e7f6fcb963083318c1307dc7

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
3 months agoqemu.conf: Improve docs for 'dynamic_ownership' option
Peter Krempa [Fri, 6 Jun 2025 08:02:23 +0000 (10:02 +0200)] 
qemu.conf: Improve docs for 'dynamic_ownership' option

Add a note that the user/group can be overriden or relabelling disabled
using per-vm/disk <seclabel> elements instead of disabling it globally.

Add a note that read-only image labels are not restored.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/512
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 months agostorage: Implement a simple 'checkPool' method for 'rbd' type pools
Krisstoffe [Wed, 11 Jun 2025 21:57:15 +0000 (21:57 +0000)] 
storage: Implement a simple 'checkPool' method for 'rbd' type pools

Same approach is used by the gluster pool driver.

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

Signed-off-by: Krisstoffe <krisstoffe@free.fr>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 months agodocs: outline bug expectations wrt automated tools / AI agents
Daniel P. Berrangé [Fri, 6 Jun 2025 08:28:14 +0000 (09:28 +0100)] 
docs: outline bug expectations wrt automated tools / AI agents

Bug reports from automated tools and AI agents are time consuming to
triage and have poor signal/noise ratio. Set strong expectations for
any reporters using such tools, in a (likely doomed) attempt to stem
the flow of poor quality reports.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agodocs: fix list term highlighting in URI docs
Daniel P. Berrangé [Mon, 9 Jun 2025 15:16:47 +0000 (16:16 +0100)] 
docs: fix list term highlighting in URI docs

Having a blank line between the term and its definition prevents the RST
to HTML convertor highlighting 'pkipath' correctly.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoci: Drop unnecessary build dependencies
Andrea Bolognani [Thu, 5 Jun 2025 16:10:42 +0000 (18:10 +0200)] 
ci: Drop unnecessary build dependencies

We no longer check for the presence of the commands included
in these packages at build time.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 months agorpm: Drop unnecessary BuildRequires
Andrea Bolognani [Thu, 5 Jun 2025 15:58:30 +0000 (17:58 +0200)] 
rpm: Drop unnecessary BuildRequires

We've recently stopped checking for the presence of various
commands at build time, which means that we no longer need
to have the corresponding packages installed in the build
environment.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 months agorpm: Fix/clarify Requires
Andrea Bolognani [Thu, 5 Jun 2025 15:58:12 +0000 (17:58 +0200)] 
rpm: Fix/clarify Requires

daemon-common should have always depended on kmod, since
there are various situations in which a module (un)load might
be triggered by a driver.

For the util-linux dependency, we're simply adjusting the
comment to match reality.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 months agonvme: Fix more missing enum switches for VIR_DOMAIN_DISK_BUS_NVME
Martin Kletzander [Mon, 9 Jun 2025 13:58:08 +0000 (15:58 +0200)] 
nvme: Fix more missing enum switches for VIR_DOMAIN_DISK_BUS_NVME

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
3 months agobhyve: Fix build after introduction of emulated NVMe disks
Martin Kletzander [Mon, 9 Jun 2025 13:41:06 +0000 (15:41 +0200)] 
bhyve: Fix build after introduction of emulated NVMe disks

Somehow I missed one switch over disk bus enum.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
3 months agoNEWS: qemu support for emulated NVMe disks
Martin Kletzander [Tue, 27 May 2025 12:00:25 +0000 (14:00 +0200)] 
NEWS: qemu support for emulated NVMe disks

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoNEWS: vmx support for NVMe disks
Martin Kletzander [Tue, 27 May 2025 11:56:32 +0000 (13:56 +0200)] 
NEWS: vmx support for NVMe disks

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoqemu: Add support for emulated NVMe disks
Martin Kletzander [Mon, 2 Jun 2025 09:43:31 +0000 (11:43 +0200)] 
qemu: Add support for emulated NVMe disks

Without any hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoqemu: Add support for NVMe controllers
Martin Kletzander [Mon, 2 Jun 2025 09:37:43 +0000 (11:37 +0200)] 
qemu: Add support for NVMe controllers

Without any hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoqemu_capabilities: Add emulated NVMe disk support to domain capabilities
Martin Kletzander [Tue, 27 May 2025 10:44:56 +0000 (12:44 +0200)] 
qemu_capabilities: Add emulated NVMe disk support to domain capabilities

This is a separate commit for review ease, but who's really going to use
a libvirt with this patch in and the actual functionality missing, that
ain't gonna happen, right?

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoqemu_capabilities: Add NVMe controller and disk capabilities
Martin Kletzander [Tue, 27 May 2025 10:44:41 +0000 (12:44 +0200)] 
qemu_capabilities: Add NVMe controller and disk capabilities

The "nvme" device is the controller and "nvme-ns" are the
namespaces (individual disks) plugged into it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agovmx: Add support for NVMe disks
Martin Kletzander [Mon, 26 May 2025 13:21:35 +0000 (15:21 +0200)] 
vmx: Add support for NVMe disks

Resolves: https://issues.redhat.com/browse/RHEL-7390
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agodocs, conf, schemas: Add support for NVMe disks
Martin Kletzander [Thu, 22 May 2025 13:47:27 +0000 (15:47 +0200)] 
docs, conf, schemas: Add support for NVMe disks

NVMe disks are essentially a namespace of an NVMe controller, but to
make it easier for the users to just add a disk, the necessary details
like adding the proper controller, setting the serial number for the
controller based on the disk, are done automatically.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoconf: Add virDomainDeviceFindNvmeController
Martin Kletzander [Mon, 26 May 2025 11:11:32 +0000 (13:11 +0200)] 
conf: Add virDomainDeviceFindNvmeController

Same as for the SCSI controller, but this time for NVMe, will be used
later to do some post parse modifications.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agoutil: Add support for parsing nvmeXnY(pZ) strings
Martin Kletzander [Thu, 22 May 2025 09:26:47 +0000 (11:26 +0200)] 
util: Add support for parsing nvmeXnY(pZ) strings

We do not guarantee that the disk names will be the same in guest as
they are in the XML, but that should not stop us from trying to be
consistent with the naming.  And since we use the same naming as the
linux kernel does, let's stick with it with nvme drives too.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agodocs, conf, schemas: Add support for NVMe controller
Martin Kletzander [Tue, 20 May 2025 09:07:45 +0000 (11:07 +0200)] 
docs, conf, schemas: Add support for NVMe controller

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Honglei Wang <honglei.wang@smartx.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 months agonodedev: add nodedev name to mdevctl unsupport msg
Boris Fiuczynski [Fri, 6 Jun 2025 09:16:06 +0000 (11:16 +0200)] 
nodedev: add nodedev name to mdevctl unsupport msg

Let's add the nodedev name to improve the error message for the user.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 months agoci: refresh with 'lcitool manifest'
Michal Privoznik [Mon, 2 Jun 2025 07:36:12 +0000 (09:36 +0200)] 
ci: refresh with 'lcitool manifest'

- Replace Alpine 3.21 with 3.22

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 months agovirDomainDriverAutoShutdown: Fix printf conversion specifier for 'waitShutdownSecs'
Peter Krempa [Mon, 9 Jun 2025 06:19:04 +0000 (08:19 +0200)] 
virDomainDriverAutoShutdown: Fix printf conversion specifier for 'waitShutdownSecs'

The variable is declared as unsigned int but two places used '%d'.

Reported-in: https://issues.redhat.com/browse/RHEL-95721
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
4 months agoqemu: capabilities: Check if cpuModels is not NULL before trying to dereference it
anonymix007 [Wed, 4 Jun 2025 09:05:23 +0000 (12:05 +0300)] 
qemu: capabilities: Check if cpuModels is not NULL before trying to dereference it

accel->cpuModels field might be NULL if QEMU does not return CPU models.
The following backtrace is observed in such cases:
0  virQEMUCapsProbeQMPCPUDefinitions (qemuCaps=qemuCaps@entry=0x7f1890003ae0, accel=accel@entry=0x7f1890003c10, mon=mon@entry=0x7f1890005270)
   at ../src/qemu/qemu_capabilities.c:3091
1  0x00007f18b42fa7b1 in virQEMUCapsInitQMPMonitor (qemuCaps=qemuCaps@entry=0x7f1890003ae0, mon=0x7f1890005270) at ../src/qemu/qemu_capabilities.c:5746
2  0x00007f18b42fafaf in virQEMUCapsInitQMPSingle (qemuCaps=qemuCaps@entry=0x7f1890003ae0, libDir=libDir@entry=0x7f186c1e70f0 "/var/lib/libvirt/qemu",
   runUid=runUid@entry=955, runGid=runGid@entry=955, onlyTCG=onlyTCG@entry=false) at ../src/qemu/qemu_capabilities.c:5832
3  0x00007f18b42fb1a5 in virQEMUCapsInitQMP (qemuCaps=0x7f1890003ae0, libDir=0x7f186c1e70f0 "/var/lib/libvirt/qemu", runUid=955, runGid=955)
   at ../src/qemu/qemu_capabilities.c:5848
4  virQEMUCapsNewForBinaryInternal (hostArch=VIR_ARCH_X86_64, binary=binary@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha",
   libDir=0x7f186c1e70f0 "/var/lib/libvirt/qemu", runUid=955, runGid=955,
   hostCPUSignature=0x7f186c1e9f20 "AuthenticAMD, AMD Ryzen 9 7950X 16-Core Processor, family: 25, model: 97, stepping: 2", microcodeVersion=174068233,
   kernelVersion=0x7f186c194200 "6.14.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:15 +0000", cpuData=0x7f186c1ea490)
   at ../src/qemu/qemu_capabilities.c:5907
5  0x00007f18b42fb4c9 in virQEMUCapsNewData (binary=0x7f1868002fc0 "/usr/bin/qemu-system-alpha", privData=0x7f186c194280)
   at ../src/qemu/qemu_capabilities.c:5942
6  0x00007f18bd42d302 in virFileCacheNewData (cache=0x7f186c193730, name=0x7f1868002fc0 "/usr/bin/qemu-system-alpha") at ../src/util/virfilecache.c:206
7  virFileCacheValidate (cache=cache@entry=0x7f186c193730, name=name@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha", data=data@entry=0x7f18b67c37c0)
   at ../src/util/virfilecache.c:269
8  0x00007f18bd42d5b8 in virFileCacheLookup (cache=cache@entry=0x7f186c193730, name=name@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha")
   at ../src/util/virfilecache.c:301
9  0x00007f18b42fb679 in virQEMUCapsCacheLookup (cache=cache@entry=0x7f186c193730, binary=binary@entry=0x7f1868002fc0 "/usr/bin/qemu-system-alpha")
   at ../src/qemu/qemu_capabilities.c:6036
10 0x00007f18b42fb785 in virQEMUCapsInitGuest (caps=<optimized out>, cache=<optimized out>, hostarch=VIR_ARCH_X86_64, guestarch=VIR_ARCH_ALPHA)
   at ../src/qemu/qemu_capabilities.c:1037
11 virQEMUCapsInit (cache=0x7f186c193730) at ../src/qemu/qemu_capabilities.c:1229
12 0x00007f18b431d311 in virQEMUDriverCreateCapabilities (driver=driver@entry=0x7f186c01f410) at ../src/qemu/qemu_conf.c:1553
13 0x00007f18b431d663 in virQEMUDriverGetCapabilities (driver=0x7f186c01f410, refresh=<optimized out>) at ../src/qemu/qemu_conf.c:1623
14 0x00007f18b435e3e4 in qemuConnectGetVersion (conn=<optimized out>, version=0x7f18b67c39b0) at ../src/qemu/qemu_driver.c:1492
15 0x00007f18bd69c5e8 in virConnectGetVersion (conn=0x55bc5f4cda20, hvVer=hvVer@entry=0x7f18b67c39b0) at ../src/libvirt-host.c:201
16 0x000055bc34ef3627 in remoteDispatchConnectGetVersion (server=0x55bc5f4b93f0, msg=0x55bc5f4cdf60, client=0x55bc5f4c66d0, rerr=0x7f18b67c3a80,
   ret=0x55bc5f4b8670) at src/remote/remote_daemon_dispatch_stubs.h:1265
17 remoteDispatchConnectGetVersionHelper (server=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60, rerr=0x7f18b67c3a80, args=0x0, ret=0x55bc5f4b8670)
   at src/remote/remote_daemon_dispatch_stubs.h:1247
18 0x00007f18bd5506da in virNetServerProgramDispatchCall (prog=0x55bc5f4cae90, server=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60)
   at ../src/rpc/virnetserverprogram.c:423
19 virNetServerProgramDispatch (prog=0x55bc5f4cae90, server=server@entry=0x55bc5f4b93f0, client=0x55bc5f4c66d0, msg=0x55bc5f4cdf60)
   at ../src/rpc/virnetserverprogram.c:299
20 0x00007f18bd556c32 in virNetServerProcessMsg (srv=srv@entry=0x55bc5f4b93f0, client=<optimized out>, prog=<optimized out>, msg=<optimized out>)
   at ../src/rpc/virnetserver.c:135
21 0x00007f18bd556f77 in virNetServerHandleJob (jobOpaque=0x55bc5f4d2bb0, opaque=0x55bc5f4b93f0) at ../src/rpc/virnetserver.c:155
22 0x00007f18bd47dd19 in virThreadPoolWorker (opaque=<optimized out>) at ../src/util/virthreadpool.c:164
23 0x00007f18bd47d253 in virThreadHelper (data=0x55bc5f4b7810) at ../src/util/virthread.c:256
24 0x00007f18bce117eb in start_thread (arg=<optimized out>) at pthread_create.c:448
25 0x00007f18bce9518c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Signed-off-by: anonymix007 <anonymix007@users.noreply.github.com>
4 months agodocs: Drop mention of read-only git mirrors
Andrea Bolognani [Thu, 5 Jun 2025 13:27:27 +0000 (15:27 +0200)] 
docs: Drop mention of read-only git mirrors

These mirrors no longer exist, they're just straight up
redirects to GitLab now.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 months agodocs: Unify clone instructions
Andrea Bolognani [Thu, 5 Jun 2025 13:30:24 +0000 (15:30 +0200)] 
docs: Unify clone instructions

We use the same format for GitLab and libvirt.org, but not
for GitHub.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 months agolibxl_capabilities: Make some functions return void
Michal Privoznik [Mon, 26 May 2025 08:41:00 +0000 (10:41 +0200)] 
libxl_capabilities: Make some functions return void

Inside of libxlMakeDomainCapabilities() there are some functions
called and basically all of them never return anything but zero
(indicating success). Yet, they are called in a fashion that
suggests otherwise. Turn those functions into void and drop
checks for their retvals.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agolibxl: capabilities: report supported console types
Roman Bogorodskiy [Sat, 24 May 2025 14:00:04 +0000 (16:00 +0200)] 
libxl: capabilities: report supported console types

Extend domain capabilities with information about the supported console
device types.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 months agoqemu: capabilities: report supported console types
Roman Bogorodskiy [Wed, 14 May 2025 16:28:47 +0000 (18:28 +0200)] 
qemu: capabilities: report supported console types

Extend domain capabilities with information about the supported console
device types.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 months agobhyve: capabilities: report NMDM console
Roman Bogorodskiy [Sun, 11 May 2025 16:20:33 +0000 (18:20 +0200)] 
bhyve: capabilities: report NMDM console

Extend domain capabilities to report the NMDM console support.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 months agodomain_capabilities: add console capabilities
Roman Bogorodskiy [Sun, 11 May 2025 16:20:20 +0000 (18:20 +0200)] 
domain_capabilities: add console capabilities

Currently, domain capabilities do not include information about the
supported console device types. While most of the drivers support
'pty' console type, it's not the case for bhyve. Without this
information, management software cannot always generate compatible
domain configuration.

To address that, extend domain capabilities like that:

   <devices>
    ...
    <console supported='yes'>
      <enum name='type'>
        <value>pty</value>
        <value>type2</value>
        ...
      </enum>
    </console>
    ...
   </devices>

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 months agoconf: desktop graphics remove unused option
Kirill Shchetiniuk [Wed, 4 Jun 2025 12:24:15 +0000 (14:24 +0200)] 
conf: desktop graphics remove unused option

Previously, the 'desktop' graphics configuration contained the
'fullscreen' option which was never used, removed the unused option.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agoconf: RDP graphics parse refactor
Kirill Shchetiniuk [Wed, 4 Jun 2025 12:24:14 +0000 (14:24 +0200)] 
conf: RDP graphics parse refactor

Previously, the RDP graphics definition parsing were implemented by
string parsing, the virDomainGraphicsDefParseXMLRDP function is
refactored to use the appropriate virXMLProp* utility functions.
Overall parsing logic was not changed and results the same output as
before.

Moreover, 'replaceUser' and 'mutliUser' params type was changed from
bool to tristate type, to avoid unnecessary type convertions.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agoconf: SDL fullscreen option refactor
Kirill Shchetiniuk [Wed, 4 Jun 2025 12:24:13 +0000 (14:24 +0200)] 
conf: SDL fullscreen option refactor

Previously, the fullscreen option were parsed as a tristate but stored
as a bool type, changed the fullscreen option type to tristate bool to
avoid unnecessary type convertions.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agoconf: VNC graphics parse refactor
Kirill Shchetiniuk [Wed, 4 Jun 2025 12:24:12 +0000 (14:24 +0200)] 
conf: VNC graphics parse refactor

Previously, the VNC graphics definition parsing were implemented by
string parsing, the virDomainGraphicsDefParseXMLVNC was refactored
to use the appropriate virXMLProp* utility functions. Overall
parsing logic was not changed and results the same output as before.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agoNEWS: Document removal of support of VIR_DUMP_LIVE flag from QEMU driver
Michal Privoznik [Tue, 3 Jun 2025 07:26:17 +0000 (09:26 +0200)] 
NEWS: Document removal of support of VIR_DUMP_LIVE flag from QEMU driver

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
4 months agoqemu: Don't accept VIR_DUMP_LIVE flag in qemuDomainCoreDumpWithFormat()
Michal Privoznik [Tue, 3 Jun 2025 06:27:31 +0000 (08:27 +0200)] 
qemu: Don't accept VIR_DUMP_LIVE flag in qemuDomainCoreDumpWithFormat()

QEMU can't really do live dumps of guest memory. It's because
inside of dump_init() the vm_stop() is called basically
unconditionally (the only condition is whether vCPUs are
running). Hence, there is no way for us to do live dumps and thus
honor VIR_DUMP_LIVE flag. Instead of silently pretending the flag
works, reject it with appropriate error message.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/646
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
4 months agoqemu: command: Don't attempt to set backend MTU for networks which don't use host...
Peter Krempa [Mon, 2 Jun 2025 14:55:16 +0000 (16:55 +0200)] 
qemu: command: Don't attempt to set backend MTU for networks which don't use host backend directly

Attempting to set MTU for network types which don't actually use the
network device on the host results in a failure. The 'mtu' property is
also used e.g. for the 'host_mtu' property of e.g. 'virtio-net-pci'
which is applied even in vhost-user mode.

Use the existing switch which selects devices without a network device
backend on the host side and skip setting the MTU.

Tested by running 'passt' in vhost-user mode manually:

 passt -f --vhost-user -s /tmp/vh.sock

and the following XML:

 <interface type="vhostuser">
   <mac address="52:54:00:3d:91:97"/>
   <source type="unix" path="/tmp/vh.sock" mode="client"/>
   <model type="virtio"/>
   <mtu size="9999"/>
   <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
 </interface>

The OS in the guest reports MTU 9999.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/717
Closes: https://gitlab.com/libvirt/libvirt/-/issues/192
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agoesx: Avoid corner case where esxUtil_ParseDatastorePath could be called with NULL...
Peter Krempa [Mon, 2 Jun 2025 08:26:38 +0000 (10:26 +0200)] 
esx: Avoid corner case where esxUtil_ParseDatastorePath could be called with NULL 'datastorePath'

The generated code which parses the data from XML in
esxVI_LookupDatastoreContentByDatastoreName can fill the 'folderPath'
property with NULL if it were missing from the input XML. While this is
not likely when talking to esx it is a possible outcome. Skipp NULL
results.

All other code paths already ensure that the function is not called with
NULL.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/776
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
4 months agodocs: Change units to 'kiB' from 'kB'/'kilobytes'/'kb'
Peter Krempa [Mon, 2 Jun 2025 08:56:32 +0000 (10:56 +0200)] 
docs: Change units to 'kiB' from 'kB'/'kilobytes'/'kb'

Use the short unit for kibibytes instead of the confusing or plainly
wrong units.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/594
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
4 months agovirConnectAuthCallbackDefault: Return failure if 'virGetPassword' returns NULL
Peter Krempa [Thu, 29 May 2025 20:00:49 +0000 (22:00 +0200)] 
virConnectAuthCallbackDefault: Return failure if 'virGetPassword' returns NULL

virGetPassword can return NULL on linux or BSD if it fails. The caller
in virConnectAuthCallbackDefault does dereference it unconditionally.

Return failure if virGetPassword returns NULL.

Fixes: db72866310d1e520efa8ed2d4589bdb5e76a1c95
Closes: https://gitlab.com/libvirt/libvirt/-/issues/777
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 months agostorage_file_probe: Remove unused image probing callbacks
Peter Krempa [Wed, 28 May 2025 16:18:38 +0000 (18:18 +0200)] 
storage_file_probe: Remove unused image probing callbacks

Remove the old now-unused infrastructure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agostorage_file_probe: Move setting of 'compat' attribute to qcow2GetFeatures
Peter Krempa [Wed, 28 May 2025 16:13:39 +0000 (18:13 +0200)] 
storage_file_probe: Move setting of 'compat' attribute to qcow2GetFeatures

Since the 'compat' field is set based on qcow2 features it belongs to
the qcow2 code rather than to the main metadata probing function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agostorage_file_probe: Parse all qcow2 extensions at once
Peter Krempa [Wed, 28 May 2025 15:49:20 +0000 (17:49 +0200)] 
storage_file_probe: Parse all qcow2 extensions at once

Refactor qcow2GetExtensions to parse everything at once and directly
assign it into fields in the parsed virStorageSource.

This removes the need for qcow2GetDataFile as it will be parsed
directly.

The patch also simplifies the juggling of variables which was needed to
parse the backing file format, when it was passed via pointer in
argument.

qcow2GetExtensions is now invoked on qcow2 images so we can remove the
version check for qcow(v1) images.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agostorage_file_probe: Call qcow2GetFeatures from qcow2GetImageSpecific
Peter Krempa [Wed, 28 May 2025 15:36:13 +0000 (17:36 +0200)] 
storage_file_probe: Call qcow2GetFeatures from qcow2GetImageSpecific

Parse qcow2 feature flags from qcow2GetImageSpecific. To achieve that
qcow2GetFeatures is refactored to take virStorageSource directly and
fill the data. To avoid the need to pass 'format' the parsing of the
qcow2 version is changed to access the offset directly (same as in
qcow2GetExtensions)

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agostorage_file_probe: Move qcow2GetFeatures(ProcessGroup) functions
Peter Krempa [Thu, 29 May 2025 08:12:05 +0000 (10:12 +0200)] 
storage_file_probe: Move qcow2GetFeatures(ProcessGroup) functions

Move the two functions to where they will be used. Subsequent patches
will refactor the control flow so that they will no longer be declared
ahead of time. Moving them in a separate patch will make the changes in
the refactor more clear to see.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 months agostorage_file_probe: Move logic from qcow2GetClusterSize to qcow2GetImageSpecific
Peter Krempa [Wed, 28 May 2025 15:26:13 +0000 (17:26 +0200)] 
storage_file_probe: Move logic from qcow2GetClusterSize to qcow2GetImageSpecific

Move the cluster size parser into the image specific code for qcow2,
which will later allow us to remove the callback for cluster size which
is not used by any other format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>