]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Wed, 4 Sep 2024 19:57:12 +0000 (19:57 +0000)]
Translated using Weblate (Swedish)

Currently translated at 85.5% (9005 of 10521 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
7 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Wed, 4 Sep 2024 22:16:20 +0000 (22:16 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 48.9% (5147 of 10521 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agoqemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne'
Peter Krempa [Thu, 5 Sep 2024 12:55:59 +0000 (14:55 +0200)]
qemu: backup: Use 'async' monitor in 'qemuBackupDiskDataCleanupOne'

'qemuBackupDiskDataCleanupOne()' is entering the monitor while we're in
the async backup job inside 'qemuBackupBegin()' which is semantically
wrong and per upstream report causes crashes if some monitoring commands
are run in parallel.

Use qemuDomainObjEnterMonitorAsync() instead.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/668
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agovirshtest: Add test case for script friendly options
Peter Krempa [Thu, 5 Sep 2024 12:33:30 +0000 (14:33 +0200)]
virshtest: Add test case for script friendly options

Add a bunch of tests verifying that script-friendly options of certain
commands are not changed incompatibly thus potentially breaking user
scripts.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoNEWS: Mention breakage of scrip-friendly virsh output
Peter Krempa [Thu, 5 Sep 2024 12:26:14 +0000 (14:26 +0200)]
NEWS: Mention breakage of scrip-friendly virsh output

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agovirsh: cmdList: Revert to script-friendly output for 'virsh list --uuid'
Peter Krempa [Thu, 5 Sep 2024 12:17:38 +0000 (14:17 +0200)]
virsh: cmdList: Revert to script-friendly output for 'virsh list --uuid'

Commit 271940223c2914bf63cbec00930ce46d6eef30ba which strived to add
support to use '--uuid' in the table output of 'virsh list' went too far
and also allowed the default table view to be enabled when just '--uuid'
is specified.

This broke the script-friendly output which previously had this format:

 $ virsh list --uuid
 b6d03c07-86f8-4a57-8719-172a5d0359bb

to this script-unfriendly output:

 $ virsh list --uuid
  Id   Name   State     UUID
 -------------------------------------------------------------
  1    ha     running   b6d03c07-86f8-4a57-8719-172a5d0359bb

Using the human friendly output will still be possible by using:

 $ virsh list --table --uuid

Fixes: 271940223c2914bf63cbec00930ce46d6eef30ba
Closes: https://gitlab.com/libvirt/libvirt/-/issues/666
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agotests: qemucapabilitiesdata: Add caps for 'caps_9.1.0_riscv64' (captured on x86_64)
Peter Krempa [Wed, 4 Sep 2024 07:10:50 +0000 (09:10 +0200)]
tests: qemucapabilitiesdata: Add caps for 'caps_9.1.0_riscv64' (captured on x86_64)

Add a capability dump for 'riscv64' with 'qemu-9.1' release captured
on a x86_64 host as I don't have hardware.

The last dump for riscv64 was done with qemu-8.0 which didn't manifest
the newest features such as CPU type selection and ACPI support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agotests: qemucapabilities: Update 'caps_9.1.0_x86_64' for final release
Peter Krempa [Wed, 4 Sep 2024 07:06:31 +0000 (09:06 +0200)]
tests: qemucapabilities: Update 'caps_9.1.0_x86_64' for final release

QEMU-9.1 was released so update the capabilities to the final state.

Notable changes:

 - Machine types 'pc-q35-6.1' and 'pc-i440fx-6.1' were deprecated

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemuProcessSetupRawIO: Refactor return value and remove useless #ifdef
Peter Krempa [Tue, 3 Sep 2024 08:03:04 +0000 (10:03 +0200)]
qemuProcessSetupRawIO: Refactor return value and remove useless #ifdef

The function can return directly rather than setting 'ret' as there's no
cleanup.

It also doesn't make sense to conditionally compile out the 'break'
statement when checking whether a disk has rawio enabled if
'CAP_SYS_RAWIO' is _not_ defined as the function will still behave the
same.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agospec: Demote 'nfs-utils' as a weak dependency of 'daemon-driver-storage-core'
Peter Krempa [Mon, 2 Sep 2024 12:28:52 +0000 (14:28 +0200)]
spec: Demote 'nfs-utils' as a weak dependency of 'daemon-driver-storage-core'

The 'nfs-utils' package provides 'showmount' used to detect NFS-based
storage pool sources. As the lookup of storage pool sources can fail
gracefully and does so e.g. if the gluster backend is not installed we
can do the same for NFS.

Apart from allowing a tighter footprint when installing libvirt, this
also allows installation of the storage driver core in cases when a
security policy prohibits use of NFS.

Resolves: https://issues.redhat.com/browse/RHEL-56611
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
8 months agostorage: fs: Remove build-time detection of 'showmount' program
Peter Krempa [Mon, 2 Sep 2024 12:25:29 +0000 (14:25 +0200)]
storage: fs: Remove build-time detection of 'showmount' program

With the new virCommand infrastructure which can find the program in
path automatically we no longer need the build-time detection.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
8 months agospec: Fix dtrace BuildRequires on fedora 41+
Cole Robinson [Tue, 27 Aug 2024 18:15:45 +0000 (14:15 -0400)]
spec: Fix dtrace BuildRequires on fedora 41+

/usr/bin/dtrace has been split from `systemtap-sdt-devel` into
`systemtap-sdt-dtrace`

It's forward and backward compatible to require the dtrace binary
directly.

We still need the latter dep though, for sdt.h in generated
libvirt_probes.h

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
8 months agovirnetdevtap: Add better error message for a possible common user error
Martin Kletzander [Wed, 4 Sep 2024 08:18:41 +0000 (10:18 +0200)]
virnetdevtap: Add better error message for a possible common user error

When users pre-create a tap device to use with multiqueue interface that
has `managed="no"`, change the error so that it does not indicate we are
trying to create the device, and on top of that hint at the most
probable error cause.

Resolves: https://issues.redhat.com/browse/RHEL-55749
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agovirnetdevtap: Do (not) use NULLSTR consistently
Martin Kletzander [Wed, 4 Sep 2024 08:16:50 +0000 (10:16 +0200)]
virnetdevtap: Do (not) use NULLSTR consistently

The function generates *ifname from the get go and most functions do not
wrap the string in a NULLSTR as it is not necessary.  The few leftovers
are outliers that are changed to fit the theme better.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 2 Sep 2024 08:51:25 +0000 (08:51 +0000)]
Translated using Weblate (Swedish)

Currently translated at 85.3% (8978 of 10521 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoqemu: Use pvpanic by default on aarch64
Andrea Bolognani [Tue, 27 Aug 2024 14:19:53 +0000 (16:19 +0200)]
qemu: Use pvpanic by default on aarch64

pvpanic-pci is the only reasonable implementation of a panic
device for aarch64/virt guests. Right now we're asking users to
provide the model name manually, but we can be more helpful and
fill it in automatically instead.

With this change, the aarch64-panic-no-model test no longer
fails and so it's no longer useful to us. Instead, we can amend
the aarch64-virt-default-models test case to include panic
coverage, something that until now wasn't possible.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Sometimes the default panic model doesn't exist
Andrea Bolognani [Tue, 27 Aug 2024 14:44:31 +0000 (16:44 +0200)]
qemu: Sometimes the default panic model doesn't exist

Right now the fallback behavior is to use MODEL_ISA if we
haven't been able to find a better match, but that's not very
useful as we're still going to hit an error later, when
QEMU_CAPS_DEVICE_PANIC is not found at Validate time.

Instead of doing that, allow MODEL_DEFAULT to get all the
way to Validate and report an error upon encountering it.

The reported error changes slightly, but other than that the
set of configurations that are allowed and blocked remains
the same.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Refactor default panic model
Andrea Bolognani [Tue, 27 Aug 2024 13:03:31 +0000 (15:03 +0200)]
qemu: Refactor default panic model

Perform decisions based on the architecture and machine type
in a single place instead of duplicating them.

This technically adds new behavior for MODEL_ISA in
qemuDomainDefAddDefaultDevices(), but it doesn't make any
difference functionally since we don't set addPanicDevice
outside of ppc64(le) and s390(x). If we did, the lack of
handling for that value would be a latent bug.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agotests: Add coverage for panic on riscv64
Andrea Bolognani [Tue, 27 Aug 2024 14:13:22 +0000 (16:13 +0200)]
tests: Add coverage for panic on riscv64

It merely duplicates the existing aarch64 coverage right now,
but it will become actually useful with the upcoming changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu_driver: Fix indentation
Martin Kletzander [Mon, 2 Sep 2024 07:31:29 +0000 (09:31 +0200)]
qemu_driver: Fix indentation

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 months agoPost-release version bump to 10.8.0
Jiri Denemark [Mon, 2 Sep 2024 09:50:18 +0000 (11:50 +0200)]
Post-release version bump to 10.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoRelease of libvirt-10.7.0
Jiri Denemark [Mon, 2 Sep 2024 09:47:19 +0000 (11:47 +0200)]
Release of libvirt-10.7.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoNEWS: Mention fix for CVE-2024-8235
Peter Krempa [Thu, 29 Aug 2024 08:53:25 +0000 (10:53 +0200)]
NEWS: Mention fix for CVE-2024-8235

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Sat, 31 Aug 2024 21:09:17 +0000 (21:09 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 48.8% (5138 of 10521 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agoqemu: Fix a few comments
Kamil Szczęk [Thu, 29 Aug 2024 10:25:19 +0000 (10:25 +0000)]
qemu: Fix a few comments

Fixes: d292c5ba1775bd70488fc1646e986c1987844549
Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
8 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Wed, 28 Aug 2024 04:44:29 +0000 (04:44 +0000)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10521 of 10521 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
8 months agoTranslated using Weblate (Korean)
김인수 [Wed, 28 Aug 2024 16:47:05 +0000 (16:47 +0000)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10521 of 10521 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
8 months agoudevListInterfaces: Honour array length for zero-length NULL arrays (CVE-2024-8235)
Peter Krempa [Wed, 21 Aug 2024 13:18:31 +0000 (15:18 +0200)]
udevListInterfaces: Honour array length for zero-length NULL arrays (CVE-2024-8235)

The refactor of 'udevListInterfacesByStatus()' which attempted to make
it usable as backend for 'udevNumOfInterfacesByStatus()' neglected to
consider the corner case of 'g_new0(..., 0)' returning NULL if the user
actually requests 0 elements.

As the code was modified to report the full number of interfaces in the
system when the list of names is NULL, the RPC code would be asked to
serialize a NULL-list of interface names with declared lenth of 1+
causing a crash.

To fix this corner case we make callers pass '-1' as @names_len (it's
conveniently an 'int' due to RPC type usage) if they don't wish to fetch
the actual list and convert all decisions to be done on @names_len being
non-negative instead of @names being non-NULL.

CVE-2024-8235

Fixes: bc596f275129bc11b2c4bcf737d380c9e8aeb72d
Resolves: https://issues.redhat.com/browse/RHEL-55373
Reported-by: Yanqiu Zhang <yanqzhan@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agodocs: Document presence of PS/2 feature in domcaps
Andrea Bolognani [Wed, 28 Aug 2024 15:09:57 +0000 (17:09 +0200)]
docs: Document presence of PS/2 feature in domcaps

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Expose availability of PS/2 feature in domcaps
Andrea Bolognani [Wed, 28 Aug 2024 12:26:25 +0000 (14:26 +0200)]
qemu: Expose availability of PS/2 feature in domcaps

This advertises the feature only for the architectures and
machine types where it can actually be used.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Change signature for virQEMUCapsSupportsI8042Toggle()
Andrea Bolognani [Wed, 28 Aug 2024 12:43:49 +0000 (14:43 +0200)]
qemu: Change signature for virQEMUCapsSupportsI8042Toggle()

We will soon need to use it in a context where we don't have
a virDomainDef handy.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Export a few functions
Andrea Bolognani [Wed, 28 Aug 2024 12:40:51 +0000 (14:40 +0200)]
qemu: Export a few functions

We're going to need them in a minute.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: Add an entry for network support in ch driver.
Praveen K Paladugu [Mon, 26 Aug 2024 19:30:40 +0000 (14:30 -0500)]
NEWS: Add an entry for network support in ch driver.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: Enable bridge network mode
Praveen K Paladugu [Mon, 26 Aug 2024 19:30:39 +0000 (14:30 -0500)]
ch: Enable bridge network mode

Tested with following interface config:

 <interface type='bridge'>
    <mac address='52:54:00:71:b9:b6'/>
    <source bridge='clhbr0'/>
    <model type='virtio'/>
 </interface>

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: interface: correctly update nicindexes
Pavel Hrdina [Tue, 27 Aug 2024 17:51:35 +0000 (19:51 +0200)]
ch: interface: correctly update nicindexes

Originally nicindexes were updated only for VIR_DOMAIN_NET_TYPE_BRIDGE
and VIR_DOMAIN_NET_TYPE_DIRECT. The mentioned commit adds support for
NAT network mode and changes the code to update nicindexes for
VIR_DOMAIN_NET_TYPE_ETHERNET and VIR_DOMAIN_NET_TYPE_NETWORK as well.

It doesn't work as intended and after the change nicindexes are updated
only for VIR_DOMAIN_NET_TYPE_ETHERNET and VIR_DOMAIN_NET_TYPE_NETWORK.

Fixes: aa642090738eb276f7bd70dea97d3a4fd03d59e3
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agovirschematest: Replace g_lstat() with virFileIsLink()
Michal Privoznik [Tue, 27 Aug 2024 12:14:37 +0000 (14:14 +0200)]
virschematest: Replace g_lstat() with virFileIsLink()

Inside of virschematest.c there's testSchemaDir() which iterates
over dentries in given directory but skips some files: those
without ".xml" suffix, hidden files, symlinks, etc.

Now, symlinks are detected as g_lstat() + S_ISLNK() combo which
works, except it fails to compile on mingw where is no concept of
symlinks. Replace the combo with a call to virFileIsLink() which
at least allows us to compile cleanly on mingw.

Fixes: f997fcca71a16b102e6ee663a3fb86bed8de9d7d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoUpdate translation files
Weblate [Tue, 27 Aug 2024 08:34:01 +0000 (10:34 +0200)]
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>
8 months agoconf: check for migration job during domain start
Sergey Dyasli [Wed, 31 Jul 2024 11:46:48 +0000 (11:46 +0000)]
conf: check for migration job during domain start

It's possible to hit the following situation during qemu p2p live
migration:

1. qemu has live migrated and exited (making virDomainObjIsActive()
   return false)

2. the live migration job is still in progress, waiting for a
   confirmation from the remote libvirt daemon. This may last for
   a while with a presence of networking issues (up to keepalive
   timeout).

Any attempt to start the domain again would fail with "domain is already
being started" message which is misleading in this situation as it
doesn't reflect what's really happening.

Add a check for the migration job and report a different error message
if the migration job is still running.

Signed-off-by: Sergey Dyasli <sergey.dyasli@nutanix.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agopo: Refresh potfile for v10.7.0
Jiri Denemark [Tue, 27 Aug 2024 08:32:53 +0000 (10:32 +0200)]
po: Refresh potfile for v10.7.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Mon, 26 Aug 2024 12:43:05 +0000 (12:43 +0000)]
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.8% (10072 of 10508 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Sun, 25 Aug 2024 14:43:04 +0000 (14:43 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 48.8% (5132 of 10508 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agohypervisor: interface: Stub out virDomainCreateInBridgePortWithHelper using 'socketpa...
Peter Krempa [Tue, 27 Aug 2024 07:56:47 +0000 (09:56 +0200)]
hypervisor: interface: Stub out virDomainCreateInBridgePortWithHelper using 'socketpair' on win32

Mingw build failed after commit af87ee7927d3245582d82d36da25b4dc3b34465e
as 'socketpair()' is not available on that platform.

Stub out the function to return failure.

Fixes: af87ee7927d3245582d82d36da25b4dc3b34465e
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoremoteDispatchConnectOpen: Fix check for 'BHYVE' connection type
aokblast [Tue, 12 Mar 2024 23:00:26 +0000 (07:00 +0800)]
remoteDispatchConnectOpen: Fix check for 'BHYVE' connection type

'bhyveConnectGetType' (which is called from 'virConnectGetType') returns
'BHYVE' as the type, but the code in 'remoteDispatchConnectOpen'
responsible for selecting the sub-driver URIs in modular deployment
checks for 'bhyve' and thus would not properly fill the URIs to the
sub-daemons.

Signed-off-by: aokblast <aokblast@FreeBSD.org>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
8 months agoch: Enable NAT Network mode support
Praveen K Paladugu [Thu, 1 Aug 2024 22:25:14 +0000 (17:25 -0500)]
ch: Enable NAT Network mode support

From: Praveen K Paladugu <prapal@linux.microsoft.com>

enable VIR_DOMAIN_NET_TYPE_NETWORK network support for ch guests.
Tested with following config:

  <interface type='network'>
      <source network="default" bridge='virbr0'/>
      <model type='virtio'/>
      <driver queues="1"/>
  </interface>

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agohypervisor: Move domain interface mgmt methods
Praveen K Paladugu [Thu, 1 Aug 2024 22:25:13 +0000 (17:25 -0500)]
hypervisor: Move domain interface mgmt methods

From: Praveen K Paladugu <prapal@linux.microsoft.com>

Move methods to connect domain interfaces to host bridges to hypervisor.
This is to allow reuse between qemu and ch drivers.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agohyperv: Support hv-xmm-input enlightenment
Tim Wiederhake [Tue, 13 Aug 2024 17:18:01 +0000 (19:18 +0200)]
hyperv: Support hv-xmm-input enlightenment

qemu supports this enlightenment since version 7.10.

From the qemu commit:
    Hyper-V specification allows to pass parameters for certain hypercalls
    using XMM registers ("XMM Fast Hypercall Input"). When the feature is
    in use, it allows for faster hypercalls processing as KVM can avoid
    reading guest's memory.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agohyperv: Support hv-emsr-bitmap enlightenment
Tim Wiederhake [Tue, 13 Aug 2024 16:51:46 +0000 (18:51 +0200)]
hyperv: Support hv-emsr-bitmap enlightenment

qemu supports this enlightenment since version 7.10.

From the qemu commit:
    The newly introduced enlightenment allow L0 (KVM) and L1 (Hyper-V)
    hypervisors to collaborate to avoid unnecessary updates to L2
    MSR-Bitmap upon vmexits.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Thu, 22 Aug 2024 13:27:44 +0000 (13:27 +0000)]
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.8% (10072 of 10508 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agoqemu: Use virEventThreadStop() in qemuProcessStop()
Michal Privoznik [Thu, 25 Jul 2024 07:51:45 +0000 (09:51 +0200)]
qemu: Use virEventThreadStop() in qemuProcessStop()

Currently, qemuProcessStop() unlocks given domain object right in
the middle of cleanup process. This is dangerous because there
might be another thread which is executing virDomainObjListAdd().
And since the domain object is on the list of domain objects AND
by the time qemuProcessStop() unlocks it the object is also
marked as inactive, the other thread acquires the lock and
switches vm->def pointer.

The unlocking of domain object is needed though, to allow even
processing thread finish its queue. Well, the processing can be
done before any cleanup is attempted.

Therefore, use freshly introduced virEventThreadStop() to join
the event thread and drop lock/unlock from the middle of
qemuProcessStop().

Now, there's a comment being removed that mentions
qemuDomainObjStopWorker() and why it has to be called only after
the domain is marked as dead. This comment is no longed
applicable because call to qemuDomainObjStopWorker() is removed
also. Moreover, priv->beingDestroyed is set to true before
unlocking the domain object, thus any event processing callback
is going to see the domain being destroyed and can chose to
either exit early or finish processing event.

Fixes: 3865410e7f67ca4ec66e9a905e75f452762a97f0
Resolves: https://issues.redhat.com/browse/RHEL-49607
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agovireventthread: Introduce virEventThreadStop
Michal Privoznik [Thu, 25 Jul 2024 07:49:05 +0000 (09:49 +0200)]
vireventthread: Introduce virEventThreadStop

The aim is to move parts of vir_event_thread_finalize() that MAY
block into a separate function, so that unrefing the a
virEventThread no longer blocks (or require releasing and
subsequent re-acquiring of a mutex).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoNEWS: Mention the new 'ps2' feature
Kamil Szczęk [Mon, 19 Aug 2024 01:20:26 +0000 (01:20 +0000)]
NEWS: Mention the new 'ps2' feature

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemuxmlconftest: Add test cases for the new 'ps2' feature
Kamil Szczęk [Mon, 19 Aug 2024 01:19:55 +0000 (01:19 +0000)]
qemuxmlconftest: Add test cases for the new 'ps2' feature

Introduce tests to verify that the 'ps2' feature is correctly parsed
when given either 'dirty' XML from a user or 'clean' canonical XML,
as produced by libvirt. This also tests the transformation from libvirt's
internal state to the aforementioned canonical form and to a QEMU
command line.

As a bonus, we also test some known bad configurations:
- When user explicitly adds ps2 bus inputs, but also explicitly disables
the 'ps2' feature.
- When user explicitly enables the 'vmport' feature, but also explicitly
disables the 'ps2' feature. This is not supported by QEMU and will
result in vmport device not being created without emitting any warning
or error.

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Introduce the 'ps2' feature
Kamil Szczęk [Mon, 19 Aug 2024 01:19:21 +0000 (01:19 +0000)]
qemu: Introduce the 'ps2' feature

This introduces a new 'ps2' feature which, when disabled, results in
no implicit PS/2 bus input devices being automatically added to the
domain and addition of the 'i8042=off' machine option to the QEMU
command-line.

A notable side effect of disabling the i8042 controller in QEMU is that
the vmport device won't be created. For this reason we will not allow
setting the vmport feature if the ps2 feature is explicitly disabled.

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT
Kamil Szczęk [Mon, 19 Aug 2024 01:17:56 +0000 (01:17 +0000)]
qemu_capabilities: Introduce QEMU_CAPS_MACHINE_I8042_OPT

This capability tells us whether given QEMU binary supports the
'-machine xxx,i8042=on/off' toggle used to enable/disable PS/2
controller emulation.

A few facts:
- This option was introduced in QEMU 7.0 and defaults to 'on'
- QEMU versions before 7.0 enabled i8042 controller emulation implicitly
- This option (and i8042 controller emulation itself) is only supported
by descendants of the generic PC machine type (e.g. i440fx, q35, etc.)

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Improve PS/2 controller detection
Kamil Szczęk [Mon, 19 Aug 2024 01:17:11 +0000 (01:17 +0000)]
qemu: Improve PS/2 controller detection

Up until now, we've assumed that all x86 machines have a PS/2
controller built-in. This assumption was correct until QEMU v4.2
introduced a new x86-based machine type - microvm.

Due to this assumption, a pair of unnecessary PS/2 inputs are implicitly
added to all microvm domains. This patch fixes that by whitelisting
machine types which are known to include the i8042 PS/2 controller.

Signed-off-by: Kamil Szczęk <kamil@szczek.dev>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Tue, 20 Aug 2024 13:07:17 +0000 (13:07 +0000)]
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.8% (10072 of 10508 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Tue, 20 Aug 2024 23:12:06 +0000 (23:12 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 48.6% (5116 of 10508 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agoqemu: validate: Reject empty USB disks
Peter Krempa [Fri, 16 Aug 2024 14:34:49 +0000 (16:34 +0200)]
qemu: validate: Reject empty USB disks

Attempting to start qemu with or hotplug an empty 'usb-storage' based
disk results in the following error:

 qemu-system-x86_64: -device {"driver":"usb-storage","bus":"usb.0","port":"2","id":"usb-disk1","removable":true}: drive property not set

Reject such config at validation step and adjust tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agoqemu: block: Allow NULL 'data' in 'qemuBlockStorageSourceChainDetach'
Peter Krempa [Fri, 16 Aug 2024 14:08:53 +0000 (16:08 +0200)]
qemu: block: Allow NULL 'data' in 'qemuBlockStorageSourceChainDetach'

Some code paths, such as if hotplug of an empty cdrom fails can cause
that 'qemuBlockStorageSourceChainDetach' will be called with 'NULL'
@data as there is no backend for the disk.

The above case became possible once we allowed hotplug of cdroms and
subsequently fixed the case when users would hotplug an empty cdrom
which ultimately caused the possibility of having no backend in the
hotplug code path which was not possible before (see 'Fixes:' below and
also the commit linked from there).

Make 'qemuBlockStorageSourceChainDetach' tolerate NULL @data by simply
returning early.

Fixes: 894c6c5c1686cfbc1742493ed512a4795098b763
Resolves: https://issues.redhat.com/browse/RHEL-54550
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agosecurity: apparmor: Allow QEMU read /proc/sys/vm/max_map_count
Michal Privoznik [Tue, 20 Aug 2024 10:00:16 +0000 (12:00 +0200)]
security: apparmor: Allow QEMU read /proc/sys/vm/max_map_count

In its commit v9.0.0-rc0~1^2 QEMU started to read
/proc/sys/vm/max_map_count file to set up coroutine limits better
(something about VMAs, mmap(), see the commit for more info).
Allow the file in apparmor profile.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/660
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoconf: Validate QoS values
Michal Privoznik [Tue, 13 Aug 2024 11:39:16 +0000 (13:39 +0200)]
conf: Validate QoS values

Since we use 'tc' to set QoS, or we instruct OVS which then uses
'tc', we have to make sure values are within range acceptable to
'tc'.

Resolves: https://issues.redhat.com/browse/RHEL-45200
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoconf: Introduce virNetDevBandwidthValidate()
Michal Privoznik [Tue, 13 Aug 2024 11:15:50 +0000 (13:15 +0200)]
conf: Introduce virNetDevBandwidthValidate()

This function validates whether parsed limits are within range as
defined by 'tc' sources (since we use tc to set QoS; or OVS which
then uses tc too). The 'tc' program stores speeds in 64bit
integers (unit is bytes per second) and sizes in uints (unit is
bytes). We use different units: kilobytes per second and
kibibytes and therefore we can parse values larger than 'tc' can
handle and thus need a function to check if values still fit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agovirsh: Simplify vshTableRowAppend() calling in cmdList(), part two
Michal Privoznik [Mon, 19 Aug 2024 10:15:01 +0000 (12:15 +0200)]
virsh: Simplify vshTableRowAppend() calling in cmdList(), part two

Instead of having many if-else statements, each with its own
vshTableRowAppend() call, we can use a simple trick - have an
array of string pointers, set array members in the if bodies and
then call vshTableRowAppend() once.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agovirsh: Simplify vshTableRowAppend() calling in cmdList(), part one
Michal Privoznik [Mon, 19 Aug 2024 10:02:29 +0000 (12:02 +0200)]
virsh: Simplify vshTableRowAppend() calling in cmdList(), part one

All calls to vshTableRowAppend() inside of cmdList() share couple
of same arguments: domain ID, domain name and domain state. While
the first one is stored in a variable and then passed to all
vshTableRowAppend() calls, the others are passed as a function
call. Switch the latter to variables too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agolib: Use NULLSTR family of macros more
Michal Privoznik [Mon, 19 Aug 2024 10:26:27 +0000 (12:26 +0200)]
lib: Use NULLSTR family of macros more

There is a family of convenient macros: NULLSTR, NULLSTR_EMPTY,
NULLSTR_STAR, NULLSTR_MINUS which hides ternary operator.

Generated using the following spatch (and its obvious variants):

  @@
  expression s;
  @@
    <+...
  - s ? s : "<null>"
  + NULLSTR(s)
    ...+>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Sun, 18 Aug 2024 18:23:37 +0000 (18:23 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 48.6% (5110 of 10508 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Sat, 17 Aug 2024 11:59:08 +0000 (11:59 +0000)]
Translated using Weblate (English (United Kingdom))

Currently translated at 47.9% (5038 of 10508 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Fri, 16 Aug 2024 10:41:57 +0000 (10:41 +0000)]
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.8% (10072 of 10508 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agovirarptable: End parsing earlier in case of NLMSG_DONE
Martin Kletzander [Fri, 16 Aug 2024 12:02:48 +0000 (14:02 +0200)]
virarptable: End parsing earlier in case of NLMSG_DONE

Check for the last multipart message right as the first thing.  The
presumption probably was that the last message might still contain a
payload we want to parse.  However that cannot be true since that would
have to be a type RTM_NEWNEIGH.  This was not caught because older
kernels were note sending NLMSG_DONE and probably relied on the fact
that the parsing just stops after all the messages are walked through,
which the NLMSG_OK macro successfully did.

Resolves: https://issues.redhat.com/browse/RHEL-52449
Resolves: https://bugzilla.redhat.com/2302245
Fixes: a176d67cdfaf5b8237a7e3a80d8be0e6bdf2d8fd
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
8 months agovirarptable: Fix check for message length
Martin Kletzander [Fri, 16 Aug 2024 11:59:15 +0000 (13:59 +0200)]
virarptable: Fix check for message length

The previous check was all wrong since it calculated the how long would
the netlink message be if the netlink header was the payload and then
subtracted that from the whole message length, a variable that was not
used later in the code.  This check can fail if there are no additional
payloads, struct rtattr in particular, which we are parsing later,
however the RTA_OK macro would've caught that anyway.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
8 months agovirarptable: Properly calculate rtattr length
Martin Kletzander [Fri, 16 Aug 2024 11:56:51 +0000 (13:56 +0200)]
virarptable: Properly calculate rtattr length

Use convenience macro which does almost the same thing we were doing,
but also pads out the payload length to a multiple of NLMSG_ALIGNTO (4)
bytes.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
8 months agovirsh: allow both --table and --uuid at the same time
Nikolai Barybin via Devel [Wed, 14 Aug 2024 11:30:02 +0000 (14:30 +0300)]
virsh: allow both --table and --uuid at the same time

This will allow to print full domains info:

   Id   Name   State   UUID
  ---------------------------

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoci: update OpenSUSE Leap to 15.6
Ján Tomko [Wed, 14 Aug 2024 11:21:15 +0000 (13:21 +0200)]
ci: update OpenSUSE Leap to 15.6

It was released on June 12, 2024.

The update means we no longer have to care about json-c 0.13
present in Leap 15.5, which solves some whitespace issues in
tests.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agotests: json: relax some test cases
Ján Tomko [Thu, 8 Feb 2024 15:50:49 +0000 (16:50 +0100)]
tests: json: relax some test cases

Some JSON parsers do not like bare types outside of objects or arrays
or do validation of object key uniqueness.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Wed, 14 Aug 2024 14:12:16 +0000 (14:12 +0000)]
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.8% (10075 of 10508 strings)

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

Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 13 Aug 2024 07:39:28 +0000 (07:39 +0000)]
Translated using Weblate (Swedish)

Currently translated at 85.0% (8940 of 10508 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoformatstorage: Document qcow2 default version change
Peter Krempa [Tue, 12 Mar 2024 11:32:52 +0000 (12:32 +0100)]
formatstorage: Document qcow2 default version change

Based on discussion after commit f432114d9c was pushed it was pointed
out that the documentation still mentions the older version.

Fix the documentation to state the new version and introduce ambiguity
for future updates.

Fixes: f432114d9cf507a4047aa9dc1344b1c13356db08
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agocpu_map: Add GraniteRapids CPU model
Tim Wiederhake [Sat, 13 Jul 2024 16:36:34 +0000 (18:36 +0200)]
cpu_map: Add GraniteRapids CPU model

This was added in qemu commit 6d5e9694ef.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agosync_qemu_models_i386.py: Add missing features
Tim Wiederhake [Sat, 13 Jul 2024 16:35:21 +0000 (18:35 +0200)]
sync_qemu_models_i386.py: Add missing features

This brings the tool's list of features in sync with qemu
commit 37fbfda8f4145ba1700f63f0cb7be4c108d545de.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agocpu_map: Add libcpuinfo as optional data source
Tim Wiederhake [Mon, 5 Feb 2024 10:18:43 +0000 (11:18 +0100)]
cpu_map: Add libcpuinfo as optional data source

This adds an option to use libcpuinfo [1] as data source for
libvirt's list of x86 cpu features. This is purely optional and
does not change the script's behavior if libcpuinfo is not
installed.

libcpuinfo is a cross-vendor, cross-architecture source for CPU
related information that has the capability to replace libvirt's
dependence on qemu's cpu feature list.

[1] https://gitlab.com/twiederh/libcpuinfo

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: hotplug: Rollback FD passthrough for 'slirpfd' and 'vdpafd' on hotplug failure
Peter Krempa [Mon, 12 Aug 2024 14:04:20 +0000 (16:04 +0200)]
qemu: hotplug: Rollback FD passthrough for 'slirpfd' and 'vdpafd' on hotplug failure

On failure to plug the device the cleanup path didn't roll back the FD
passing to qemu thus qemu would hold the FDs indefinitely.

Resolves: https://issues.redhat.com/browse/RHEL-53964
Fixes: b79abf9c3cdab8bcecfa8769629a4cdf4bf0b6c3 (vdpafd)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agovirnetlibsshsession: Reflect API change in libssh
Michal Privoznik [Mon, 12 Aug 2024 10:41:13 +0000 (12:41 +0200)]
virnetlibsshsession: Reflect API change in libssh

As of libssh commit of libssh-0.11.0~70 [1] the
ssh_channel_get_exit_status() function is deprecated and a new
one is introduced instead: ssh_channel_get_exit_state().
It's not a drop-in replacement, but it's simple enough.
Adapt our libssh handling code to this change.

1: https://git.libssh.org/projects/libssh.git/commit/?id=04d86aeeae73c78af8b3dcdabb2e588cd31a8923

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 12 Aug 2024 09:03:59 +0000 (09:03 +0000)]
Translated using Weblate (Swedish)

Currently translated at 84.8% (8920 of 10508 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sun, 11 Aug 2024 08:03:09 +0000 (08:03 +0000)]
Translated using Weblate (Swedish)

Currently translated at 84.6% (8899 of 10508 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Weblate [Sat, 10 Aug 2024 07:02:51 +0000 (07:02 +0000)]
Translated using Weblate (Swedish)

Currently translated at 84.4% (8879 of 10508 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sat, 10 Aug 2024 07:07:39 +0000 (07:07 +0000)]
Translated using Weblate (Swedish)

Currently translated at 84.4% (8879 of 10508 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Thu, 8 Aug 2024 20:15:37 +0000 (20:15 +0000)]
Translated using Weblate (Swedish)

Currently translated at 84.3% (8859 of 10508 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoglibcompat: remove obsolete clang workaround
Daniel P. Berrangé [Mon, 12 Aug 2024 09:53:19 +0000 (10:53 +0100)]
glibcompat: remove obsolete clang workaround

This mostly reverts commit 65491a2dfe00bfcf9f09a8d6eab60234b56c8cc4.

There was a bug introduced in glib 2.67.0 which impacted libvirt with
clang causing -Wincompatible-pointer-types-discards-qualifiers warnings.

This was actually fixed quite quickly in 2.67.1 with

 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Our workaround was then broken with glib 2.81.1 due to commit
14b3d5da9019150d821f6178a075d85044b4c255 changing the signature of the
(private) macro we were overriding.

Since odd-number glib releases are development snapshots, and the
original problem was only present in 2.67.0 and no other releases,
just drop the workaround entirely.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agoqemuxmlconftest: Add test cases for broken and missing XML files
Peter Krempa [Thu, 8 Aug 2024 07:14:11 +0000 (09:14 +0200)]
qemuxmlconftest: Add test cases for broken and missing XML files

Add test cases for few edge cases which excercise the XML reporting from
libxml2 in anticipation of upcoming changes of behaviour.

'virschematest' must skip parsing of the broken file altogether so this
patch adds infrastructure to allow that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agotestQemuConfXMLCommon: Strip 'abs_srcdir' paths from '.err' files in qemuxmlconftest
Peter Krempa [Fri, 9 Aug 2024 12:21:23 +0000 (14:21 +0200)]
testQemuConfXMLCommon: Strip 'abs_srcdir' paths from '.err' files in qemuxmlconftest

Upcoming patch will result in having the build directory path in some of
the output files. Replace it by a constant 'ABS_SRCDIR' to avoild
breaking tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoglibcompat: "Backport" 'g_string_replace'
Peter Krempa [Fri, 9 Aug 2024 12:14:47 +0000 (14:14 +0200)]
glibcompat: "Backport" 'g_string_replace'

Backport the implementation of 'g_string_replace' until we require at
least glib-2.68

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: Mention restore with n/w devices support for ch
Purna Pavan Chandra [Mon, 5 Aug 2024 14:41:01 +0000 (14:41 +0000)]
NEWS: Mention restore with n/w devices support for ch

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: kill CH process if restore fails
Purna Pavan Chandra [Mon, 5 Aug 2024 14:41:00 +0000 (14:41 +0000)]
ch: kill CH process if restore fails

Invoke virCHProcessStop to kill CH process incase of any failures during
restore operation.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: support restore with net devices
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:59 +0000 (14:40 +0000)]
ch: support restore with net devices

Cloud-hypervisor now supports restoring with new net fds.
Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402
So, pass new tap fds via SCM_RIGHTS to CH's restore api.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: refactor virCHMonitorSaveVM
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:58 +0000 (14:40 +0000)]
ch: refactor virCHMonitorSaveVM

Remove the unwanted utility function and make api calls directly from
virCHMonitorSaveVM fn

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: use monitor socket fd to send restore request
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:57 +0000 (14:40 +0000)]
ch: use monitor socket fd to send restore request

Instead of curl, use low-level socket connections to make restore api
request to CH. This will enable passing new net FDs to CH while
restoring domains with network configuration.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: support poll with -1 in chSocketRecv
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:56 +0000 (14:40 +0000)]
ch: support poll with -1 in chSocketRecv

chSocketRecv fn can be used by operations such as restore, which cannot
have a specific poll timeout. The runtime of these operations at server
side (vmm) cannot be determined or capped as it depends on the guest
configuration. Hence, add a new parameter 'use_timeout' which when set
will pass -1 as timeout to poll, otherwise the default PKT_TIMEOUT_MS is
used.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: refactor chProcessAddNetworkDevices
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:55 +0000 (14:40 +0000)]
ch: refactor chProcessAddNetworkDevices

Move monitor socket connection, response handling and closing FDs code into
new functions in preparation for adding restore support for net devices.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: Pass net ids explicitly during vm creation
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:54 +0000 (14:40 +0000)]
ch: Pass net ids explicitly during vm creation

Pass "net_<index>" as net id to CH. This is to have better control over
the network configs. This id can be further used in performing
operations like restore etc.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoch: report response message instead of just code
Purna Pavan Chandra [Mon, 5 Aug 2024 14:40:53 +0000 (14:40 +0000)]
ch: report response message instead of just code

The response message from CH for vm.add-net api will be more helpful in
debugging. Hence, log the message instead of just response code.

Signed-off-by: Purna Pavan Chandra <paekkaladevi@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>