Commit Graph

51467 Commits

Author SHA1 Message Date
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: d79542eec6
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2024-12-11 20:10:43 +01:00
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: a3b8753db9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-12-04 16:27:00 +01:00
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
Jiri Denemark
7e5641bbc0 Release of libvirt-10.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-12-02 13:16:51 +01:00
Göran Uddeborg
94338f1375 Translated using Weblate (Swedish)
Currently translated at 98.3% (10383 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>

Translated using Weblate (Swedish)

Currently translated at 98.1% (10364 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-30 23:38:37 +01:00
Ján Tomko
b0a782f708 docs: document external swtpm
When external swtpm support was added back in 9.0.0, I omitted
the update of the XML docs.

Add it now, especially since the 'emulator' backend can now
also use the <source> element.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-11-28 14:40:50 +01:00
Göran Uddeborg
984f6bb43f Translated using Weblate (Swedish)
Currently translated at 97.9% (10343 of 10555 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-11-28 12:22:58 +01:00
김인수
349ea8669c Translated using Weblate (Korean)
Currently translated at 100.0% (10555 of 10555 strings)

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

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

Translated using Weblate (Korean)

Currently translated at 99.7% (10526 of 10555 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2024-11-28 12:22:57 +01:00
Michal Privoznik
304b93dbb5 NEWS: Document features/improvements/bug fixes I've participated in
There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 12:18:52 +01:00
Peter Krempa
f850c2a569 virschematest: Don't skip all "directory" tests
Due to a bug in the optimization to avoid testing symlinked tests
multiple times all tests were skipped.

In commit f997fcca71 I made an attempt to optimize the
tests by avoiding testing symlinks. This optimization was buggy as I've
passed the 'd_name' field of 'struct dirent' which is just the filename
to 'g_lstat()'. 'g_lstat()' obviously always failed with ENOENT. As the
logic checked only for successful return of 'g_lstat()' the optimizatio
was a dud.

Now in 4d8ebbfee8 the 'g_lstat()' call was replaced by
'virFileIsLink()' checking all non-zero values. This meant that if
'virFileIsLink()' failed the test was skipped. Now since a bad argument
was passed this failed always and thus was always skipped making
'virschematest' useless.

Fix it by passing the full path of the test and also explicitly check
for '1' return value instead of any non-zero.

Fixes: f997fcca71
Fixes: 4d8ebbfee8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
Peter Krempa
99dadf9e08 schemas: domaincaps: Add schema for CPU 'blockers'
Due to broken 'virschematest' commit f4dc248a95
forgot to introduce schema for the new element.

Fixes: f4dc248a95
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
Peter Krempa
fcd9b78863 schemas: domaincaps: Add schema for 'canonical' cpu model name
Due to 'virschematest' being broken commit fff2bbee7f
forgot to add schema for the new attribute.

Fixes: fff2bbee7f
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
Peter Krempa
5e514c6733 schemas: domaincaps: Add schema for 'panic' device
Due to 'virschematest' being broken commit a52cd504b3
introduced a new element to the domain caps but didn't add schema for
it.

Fixes: a52cd504b3
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
Peter Krempa
2704648936 schemas: domain: Make <identity> subelement of NFS disk source optional
Both the 'user' and 'group' attribute are optional so <identity> can
be empty. Allow it to be omitted completely. The parser and qemu code
can handle that.

The schema was introduced in 943871f971
and in d018c8dc9e an offending test was
added.

Fixes: 943871f971
Fixes: d018c8dc9e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-11-28 10:28:49 +01:00
Peter Krempa
0bd01ef765 NEWS: Mention qcow2 'data-file', block NVRAM, and internal snapshot reversion
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:28:44 +01:00
Peter Krempa
976300fdf4 qemuDomainGetStorageSourceByDevstr: Lookup also '<dataStore>'
The <dataStore> volumes have their own 'id' so we need to be able to
look them up for the given image chain.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
Peter Krempa
515ed143ec qemuDomainVirStorageSourceFindByNodeName: Match also '<dataStore>' sources
As the source for the data file is a completely separate
virStorageSource including it's own index we need to match it
explicitly, so that code such as storage threshold events work properly
and separately for the data file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
Peter Krempa
71935d4972 qemuDomainVirStorageSourceFindByNodeName: Extract nodename matching
Extract the matching of the node name of a single virStorage source so
that the logic can be reused in the upcoming patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
Peter Krempa
2a9349c8e8 qemu: snapshot: Change 'data-file' to read-only after snapshot
For the reason outlined in previous commit qemu doesn't do this
automatically. Handle it manually after the snapshot.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
Peter Krempa
754ca45c45 qemu: block: Ensure that <dataStore> is in appropriate state
In contrast to normal backing chain members where qemu does honour the
'auto-read-only' property the 'data-file' nodes are not automatically
reopened by qemu. Libvirt now has the infrastructure to reopen them
explicitly so use it for all transitions of the 'commit' block job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:56 +01:00
Peter Krempa
ed656f4c8f qemuBlockReopenAccess: Don't require backing chain terminator for non-chained images
Add an exception for image formats not supporting backing images so that
they can be reopened RW/RO without the need for adding a terminating
virStorageSource as they simply can't have a backing image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
Peter Krempa
b83e87ca78 qemuBlockReopenAccess: Fix update of 'readonly' state
Refactors done in 24b667eeed (and also 9ec0e28e87)
broke the expected handling of the update of 'readonly' flag of a
virStorage. The source is actually set to the proper state but rolled
back to the previous state as the 'cleanup' label should have been
'error' and thus not reached on success.

Additionally some of the code paths violate the statement in the comment
after updating 'readonly' that only 'goto error' must be used.

Fixes: 24b667eeed
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
Peter Krempa
b510f8ca8a qemuBlockReopenAccess: Add debug log entry about state of the image
Log the node name and current and expected state to simplify debugging.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-28 10:27:55 +01:00
Michal Privoznik
c4d6bd3bf5 qemu: Validate QoS values in qemuDomainSetInterfaceParameters()
This is similar to one of my previous commits (v10.7.0-rc1~22)
which introduced a check that <bandwidth/> values fit into
certain limits. My original commit validated values when parsing
<bandwidth/> XML, but completely missed the case when values are
set over virDomainSetInterfaceParameters() API.

Solution is simple - just perform validation after bandwidth
structure is reconstructed from arguments passed to the API.

Resolves: https://issues.redhat.com/browse/RHEL-65372
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-27 15:11:13 +01:00
Jiri Denemark
9b55a130b7 NEWS: Document support for versioned CPU models
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-11-27 14:51:05 +01:00