Commit Graph

49683 Commits

Author SHA1 Message Date
김인수
9fc140c72d Translated using Weblate (Korean)
Currently translated at 100.0% (10414 of 10414 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2023-12-20 15:16:36 +00:00
Göran Uddeborg
83a2a73421 Translated using Weblate (Swedish)
Currently translated at 58.0% (6047 of 10417 strings)

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

Translated using Weblate (Swedish)

Currently translated at 57.6% (6006 of 10417 strings)

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

Translated using Weblate (Swedish)

Currently translated at 57.4% (5985 of 10417 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2023-12-20 15:16:36 +00:00
Egor Makrushin
c3a8d04980 conf: fix integer overflow in virDomainControllerDefParseXML
Multiplication results in integer overflow.
Thus, replace it with ULLONG_MAX and change
def->opts.pciopts.pcihole64size type to ULL.
Update variable usage according to new type.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Egor Makrushin <emakrushin@astralinux.ru>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-20 15:57:07 +01:00
Ján Tomko
49f1406de8 remote: DeserializeDomainDiskErrors: remove dead code
As of commit b2d079c113 which converted this function to use g_strdup,
the error label is only reached when i = 0, rendering it useless.

Remove it.

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/572
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-19 17:07:29 +01:00
Jim Fehlig
405f479d0e apparmor: Add capabilities for PCI passthrough to virtxend profile
When splitting out the apparmor modular daemon profiles from the
libvirtd profile, the net_admin and sys_admin capabilities were
dropped from the virtxend profile. It was not known at the time
that these capabilities were needed for PCI passthrough. Without
the capabilities, the following messages are emitted from the audit
subsystem

audit: type=1400 audit(1702939277.946:63): apparmor="DENIED" \
operation="capable" class="cap" profile="virtxend" pid=3611 \
comm="rpc-virtxend" capability=21  capname="sys_admin"
audit: type=1400 audit(1702940304.818:63): apparmor="DENIED" \
operation="capable" class="cap" profile="virtxend" pid=3731 \
comm="rpc-virtxend" capability=12  capname="net_admin"

It appears sys_admin is needed to simply read from the PCI dev's
sysfs config file. The net_admin capability is needed when setting
the MAC address of an SR-IOV virtual function.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-19 08:53:32 -07:00
Peter Krempa
19ce02c773 qemuDomainBlockPeek: Fix format checking logic
Recent refactor which changed the format check to use
qemuBlockStorageSourceIsRaw accidentaly inverted the condition.

Caught by the CI test suite.

Fixes: b600b69f82
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2023-12-16 09:20:41 +01:00
Ján Tomko
0d03ca17b1 docs: virtiofs: add section about ID remapping
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
1a4412f568 qemu: virtiofs: auto-fill idmap for unprivileged use
If the user did not specify any uid mapping, map its own
user ID to ID 0 inside the container and the rest of the IDs
to the first found user's authorized range in /etc/sub[ug]id

https://issues.redhat.com/browse/RHEL-7386
https://gitlab.com/libvirt/libvirt/-/issues/535

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
2ef4be0a3e util: add virGetSubUIDs
A function for parsing /etc/sub[ug]id

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
42edb10f17 qemu: allow running virtiofsd in session mode
https://gitlab.com/libvirt/libvirt/-/issues/535

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
d27b6e5f49 qemu: virtiofs: do not force UID 0
Remove the explicit setting of uid 0 when running virtiofsd.

It is not required for privileged mode, where virtiofsd will be run
as root anyway. And for unprivileged mode, virtiofsd no longer requires
to be run as root.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
bdf96a0f72 qemu: format uid/gid map for virtiofs
Pass the ID map to virtiofsd, which will run the suid `newuidmap`
binary for us.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
6de2068dd6 conf: add idmap element to filesystem
Allow the user to manually tweak the ID mapping that will allow
virtiofsd to run unprivileged.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
d8904561d9 conf: move idmap parsing earlier
It will be reused for <filesystem> as well.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Ján Tomko
ec475e39dc conf: move idmap definition earlier
It will be reused for <filesystem> as well.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-14 17:10:22 +01:00
Peter Krempa
641ed83e3d qemuDomainBlockResize: Properly resize disks with storage slice
Until now resizing a disk with a storage slice would break in one of the
following ways:

1) for a non-raw format, the virtual size would change, but the slice
would still remain in place
2) for raw disks qemu would refuse to change the size

The only reasonable scenario we want to support is a 'raw' image with 0
offset (inside a block device), where we can just drop the slice.

Anything else comes from a non-standard storage setup that we don't want
to touch.

To facilitate the resize, we first remove the 'size' parameter in qemu
thus dropping the slice and then instructing qemu to resize the disk.

Resolves: https://issues.redhat.com/browse/RHEL-18782
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:12:04 +01:00
Peter Krempa
d552d02265 virStorageSourceSliceFree: Export function
The function will be used in the code for resizing block devices with a
slice.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:11:07 +01:00
Peter Krempa
48704d4605 qemu: block: Format storage slice properties optionally
Prepare the blockdev props formatter to skip formatting the slice props
in case they are not applicable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:11:07 +01:00
Peter Krempa
a2cc772031 qemu: block: Make 'slice' layer effective for 'raw' storage source
Rather than pulling the configuration of the storage slice into the
'format' layer make the 'slice' layer effective for raw disks with a
storage slice. This was made possible by the recent refactors which made
the 'format' layer optional if not needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:11:07 +01:00
Peter Krempa
d09f46a9fb qemuDomainBlockResize: Implement VIR_DOMAIN_BLOCK_RESIZE_CAPACITY
Resizing of block-backed storage requires the user to pass the exact
capacity of the device. Implement code which will query it instead so
the user doesn't need to do that.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/449
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:11:07 +01:00
Peter Krempa
04adeac76e virDomainBlockResize: Introduce VIR_DOMAIN_BLOCK_RESIZE_CAPACITY
Allow users to easily resize 'raw' images on block devices to the full
capacity of the block device. Obviously this won't work on file-backed
storage (filling the remaining capacity is most likely wrong) or for
formats with metadata due to the overhead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:09:05 +01:00
Peter Krempa
a7b357fd5c vsh: Introduce simple version of VSH_ALTERNATIVE_OPTIONS_EXPR
VSH_ALTERNATIVE_OPTIONS takes just the name of the options instead of
requiring also the getter functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:06:23 +01:00
Peter Krempa
59ec4c6619 qemuDomainBlockResize: Agregate all checks at the beginning
Move the check for readonly and empty disks to the top where all other
checks will be done.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:06:23 +01:00
Peter Krempa
b600b69f82 qemu: Use qemuBlockStorageSourceIsLUKS/qemuBlockStorageSourceIsRaw
Refactor code checking whether image is raw. This fixes multiple places
where a LUKS encrypted disk could be mistreated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:04:27 +01:00
Peter Krempa
04b94593d1 qemu: block: Introduce helpers for properly testing for 'raw' and 'luks' images
Unfortunately a LUKS image to be decrypted by qemu has
VIR_STORAGE_FILE_RAW as format, but has encryption properties populated.

Many places in the code don't check it properly and also don't check
properly whether the image is indeed LUKS to be decrypted by qemu.

Introduce helpers which will simplify this task.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
2023-12-14 16:03:40 +01:00
Peter Krempa
aded3c622f qemu: migration: Automatically fix non-shared-storage migration to bigger block devices
QEMU's blockdev-mirror job doesn't allow copy into a destination which
isn't exactly the same size as source. This is a problem for
non-shared-storage migration when migrating into a raw block device, as
there it's very hard to ensure that the destination size will match the
source size.

Rather than failing the migration, we can add a storage slice in such
case automatically and thus make the migration pass.

To do this we need to probe the size of the block device on the
destination and if it differs form the size detected on the source we'll
install the 'slice'.

An additional handling is required when persisting the VM as we want to
propagate the slice even there to ensure that the device sizes won't
change.

Resolves: https://issues.redhat.com/browse/RHEL-4607
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:50 +01:00
Peter Krempa
814069bd56 qemu: Move and export qemuDomainStorageUpdatePhysical and dependencies
Move qemuDomainStorageUpdatePhysical, qemuDomainStorageOpenStat,
qemuDomainStorageCloseStat to qemu_domain.c and export them. They'll be
reused in the migration code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
426eeb0d3c qemu: migration: Rename qemuMigrationDstPrecreateStorage to qemuMigrationDstPrepareStorage
The function will be used to setup storage for non-shared-storage
migration, not just precreate images.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
f0fe94605c qemuDomainStorageOpenStat: Remove unused 'driver' argument and untangle callers
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
6a38559092 qemu: migration: Improve handling of VIR_MIGRATE_PARAM_DEST_XML with VIR_MIGRATE_PERSIST_DEST
When a user provides a migration XML via the VIR_MIGRATE_PARAM_DEST_XML
it's expected that they want to change ABI-compatible aspects of the XML
such as the disk paths or similar.

If the user requests persisting of the VM but does not provide an
explicit persistent XML libvirt would take the persistent XML from the
source of the migration as the persistent config. This usually involves
the old paths to images.

Doing this would result into failure to start the VM.

It makes more sense to take the XML used for migration and use that as
the base for persisting the config.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
7c1244f3a5 qemuMigrationDstPrecreateStorage: Fix and clarify logic
While it's intended that qemuMigrationDstPrecreateDisk is called with
any kind of the disk, the logic in qemuMigrationDstPrecreateStorage
which checks the existence of the image wouldn't properly handle e.g.
network backed disks, where it would attempt to use virFileExists() on
the disk's 'src->path'.

Fix the logic by first skipping disks not meant for migration, then do
the existence check only when 'disk->src' is local storage.

Since qemuMigrationDstPrecreateDisk has a debug statement there's no
need to have an extra one right before calling into it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
9864486966 qemuMigrationDstPrecreateStorage: Refactor cleanup
Use automatic pointer freeing for 'conn' and remove the 'cleanup' label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Peter Krempa
16832e0dd2 qemuMigrationDstPrecreateStorage: Improve error messages
Change the error messages so that they can be used to identify the
problematic disk or image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-13 20:15:49 +01:00
Göran Uddeborg
cecbaa87d5 Translated using Weblate (Swedish)
Currently translated at 57.1% (5954 of 10417 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2023-12-11 12:44:02 +01:00
Göran Uddeborg
ff8c5c523f Translated using Weblate (Swedish)
Currently translated at 56.9% (5933 of 10417 strings)

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

Translated using Weblate (Swedish)

Currently translated at 56.7% (5912 of 10417 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2023-12-10 11:44:00 +01:00
Jim Fehlig
1a2f33cb59 remote: Fix cached hypervisor type
Commit 501825011c switched the remote driver to using g_auto, but missed
one case of needing to steal a pointer holding the hypervisor type.
Without it, memory is freed and the output of 'virsh version' has random
output

Compiled against library: libvirt 10.0.0
Using library: libvirt 10.0.0
Using API: ��%�U 10.0.0
Running hypervisor: ��U 8.1.3

Ths change also fixes random SIGABRT from perl processes running
libvirt-tck tests.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-12-08 08:18:39 -07:00
Göran Uddeborg
fba411a805 Translated using Weblate (Swedish)
Currently translated at 56.3% (5871 of 10417 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2023-12-07 22:43:57 +01:00
Peter Krempa
06e344f762 virNodeDeviceCapStorageDefFormatBlocksize: Report sector size and count together
Report both block count and size together when either one of them is
present equivalently to what the schema type 'blockData' in
'schemas/nodedev.rng' defines.

Resolves: https://issues.redhat.com/browse/RHEL-18165
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-07 16:42:32 +01:00
Peter Krempa
9f855b149a virNodeDeviceCapStorageDefFormat: Extract formatting of block size data
Unfortunately the XML is designed in a weird way, where based on whether
media in the device is removable the sizing is either part of a
subelement or placed directly on top level. The logic itself is
identical so it can be extracted into a function to simplify the
formatter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-07 16:42:32 +01:00
Peter Krempa
73c1e87e6a virNodeDeviceCapStorageDefFormat: Don't check argument for virBufferEscapeString
virBufferEscapeString is specifically designed for formatting XMLs and
thus skips the whole formatting if the singular string argument is NULL.

Remove redundant conditions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-07 16:42:32 +01:00
Peter Krempa
a2f98b6b8c virsh: migrate: Fix logic bug in interlock of --copy-storage-synchronous-writes flag
As the error message states we want to check that one of
'--copy-storage-all' or '--copy-storage-inc' is used, but the condition
mentioned VIR_MIGRATE_NON_SHARED_DISK twice.

Fixes: 1c2bd205ed
Resolves: https://issues.redhat.com/browse/RHEL-17596
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-07 16:42:32 +01:00
Peter Krempa
831c55ae3e virsh: migrate: Interlock '--copy-storage-all' and '--copy-storage-inc'
The API treats them as mutually exclusive and interlocks them at the
library handler. Provide better error in virsh.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-07 16:42:32 +01:00
Peter Krempa
b99c709d8d qemu: migration: Validate migration XML
There's no point in skiping the validation step:
- on the source, the VM is parsed for ABI stability checking, thus the
  equivalent config was validated when the VM was started

- on the destination, the XML will be validated inside qemuProcessInit
  very soon after it is parsed

This fixes problems such as if the user uses a relative path in the disk
source or omits the source, as the disk migration code reasonably
expects that all checks were performed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-07 16:42:32 +01:00
Anastasia Belova
d96858b0e8 security_util: fix log in virSecurityMoveRememberedLabel
Fix incorrect log message for timestamp value.
Probably this line was copied from the check for attr.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 7cfb7aab57 ("security_util: Remove stale XATTRs")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-12-07 11:31:30 +01:00
Anastasia Belova
d17474a5f1 network: convert virFileLinkPointsTo to return bool
Convert prototype of virFileLinkPointsTo to return bool.
Remove dead checks in virDomainObjListLoadConfig and
virNetworkLoadConfig.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-12-07 11:31:29 +01:00
Jonathon Jongsma
a949a53e13 test: remove redundant cpuTestGuestCPUID test
DO_TEST_CPUID(arch, host, json) is a multipart test. It consists of the
following tests:
 - cpuTestHostCPUID()
 - cpuTestGuestCPUID(with JSON_* flag)
 - cpuTestCPUIDSignature()
 - DO_TEST_JSON():
   - if json==JSON_MODELS:
     - cpuTestGuestCPUID(without JSON_* flag)
   - cpuTestJSONCPUID()
   - cputestJSONSignature()

Notice that for tests with json==JSON_MODELS, cpuTestGuestCPUID() is
actually called twice but with different arguments. The first one passes
JSON_MODELS to the test function, while the second one passes 0.

The main difference in behavior when calling cpuTestGuestCPUID() with or
without the flag is that in the first case, it parses the captured qemu
output from $ARCH-cpuid-$CPU.json. It extracts the cpu model list from
that JSON, and uses that to filter out possible cpu models to match.
In other words, it tries to match the cpu to a model that was supported
by the qemu version that was used to generate this JSON file. When it
finds a match, it generates a cpu definition and compares the xml form
of that definition with the file $ARCH-cpuid-$CPU-guest.xml.

When called without the JSON_MODELS flag, it simply attempts to match it
against the full libvirt cpu map and doesn't attempt to filter out any
matches based on the JSON qemu cpu model list. After it finds a match,
it generates an xml definition for the cpu and compares it to the same
file listed above. So if these two invocations disagree on the cpu match
(e.g. because libvirt has added a cpu model to its cpu map that matches
better than one that was supported by the version of qemu that generated
the JSON file) the test will fail.

This duplicate call to cpuTestGuestCPUID() was originally added in
commit 49c945a6f5. The original
justification for that commit was to fix test failures when the Qemu
driver was disabled. But since DO_TEST_JSON() is #defined empty when
qemu is disabled, this particular invocation would not even be executed
in this scenario, so it doesn't seem relevant.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-12-06 14:57:46 -06:00
Daniel P. Berrangé
3b45fcd6b6 rpc: don't try to spawn non-existant daemon
If libvirt is built in client only mode, the libvirtd/virtqemud/etc
daemons won't exist. If the client is told to connect to a local
hypervisor, it'll see the socket doesn't exist, try to spawn the
daemon and then re-try connecting to the socket for a few seconds.
Ultimately this will fail because the daemon doesn't exist and the
user gets an error message

  error: Failed to connect socket to '/run/user/1000/libvirt/virtqemud-sock': No such file or directory

technically this is accurate, but it doesn't help identify the root
cause. With this change it will now report

  error: binary 'virtqemud' does not exist in $PATH: No such file or directory

and will skip all the socket connect retries

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-12-06 16:45:46 +00:00
Göran Uddeborg
da1057c8eb Translated using Weblate (Swedish)
Currently translated at 56.1% (5850 of 10417 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2023-12-06 12:44:05 +01:00
Michal Privoznik
a3129ae6df qemuDomainChangeNet: Reflect trustGuestRxFilters change
On device-update, when user requests change of
trustGuestRxFilters we currently do nothing. Nor error out, nor
act on the request. While we can just throw an error,
implementing this is pretty trivial.

Resolves: https://issues.redhat.com/browse/RHEL-735
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-06 12:36:03 +01:00
Michal Privoznik
d6169ad739 qemuMonitorJSONQueryRxFilter: Allow @filter to be NULL
Sometimes it may be handy to just issue the query-rx-filter
monitor command without actually parsing the output. Adapt
qemuMonitorJSONQueryRxFilter() to this behavior.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-12-06 12:30:10 +01:00