1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-19 14:50:25 +03:00

52192 Commits

Author SHA1 Message Date
Martin Kletzander
c5a73f75bc qemu_rdp: Fix a typo existance -> existence
Fixes: bd473480b443aa2561236dfd903535aa778d99a8
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:40 +02:00
Martin Kletzander
750eaf2243 python: Do not explicitly state variables are global when only read
If a variable is not modified in a scope there is no need for the use of
global in such scope.  Without this patch build fails with:

F824 `global ...` is unused: name is never assigned in scope

It is a bit difficult to find more information on that message and error
code, I found it here:

    https://docs.astral.sh/ruff/rules/global-variable-not-assigned/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:40 +02:00
Martin Kletzander
ab1218c610 nwfilter: Fix erroneous pointer passing to g_clear_pointer
Commit 5de27c32a18f wanted to fix a possible double free, but by mistake
did not pass a reference to the variable.  This made virtnwfilterd
coredump in our daily CI build.

Fixes: 5de27c32a18f1da4969a679a2385d45cf0279699
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 10:14:39 +02:00
Alexander Kuznetsov
8685923df0 virbitmap: Change return type of virBitmapToData to void
This function return value is invariant since e59b8f9, so change
its type and remove all dependent checks.

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-16 09:56:51 +02:00
Han Han
6387253c42 docs: formatdomain: Metion virtio model for currentAddress
As commit 50981052a5 mentioned, the currentAddress in live domain
XML, requires virtio model as well.

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 15:46:28 +02:00
Roman Bogorodskiy
da062b4d6c bhyve: use const virDomainDef pointer in bhyveBuildNetArgStr()
As virDomainNet* functions were converted to use const virDomainDef
pointers, update bhyveBuildNetArgStr() as well, like it was before it was
changed in e1e40b5035.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-15 15:30:32 +02:00
Roman Bogorodskiy
16a34cedf3 conf: use const virDomainDef pointers
Some virDomainNet* functions use virDomainDef pointers even though they
don't modify the domain config, so switch to const pointers there.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-15 15:30:32 +02:00
Alexander Kuznetsov
faa98ca6d3 nss: Fix memory leak in findLease()
path is allocated by asprintf() and must be freed later if realloc() fails.

Restructure the code to allocate path only after realloc() succeeds,
avoiding the need for an extra free().

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

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 14:26:59 +02:00
Alexander Kuznetsov
5de27c32a1 nwfilter: Avoid possible double free in virNWFilterInstReset()
virNWFilterInstReset() may be called multiple times, leading to a double g_free()
Replace plain g_free() with g_clear_pointer() to prevent this

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

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 12:57:07 +02:00
Alexander Kuznetsov
9ccd9676a8 virsh: prevent potential NULL dereference
virXPathString() can return NULL so we need to use STRNEQ_NULLABLE here

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

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 12:54:54 +02:00
Roman Bogorodskiy
6230eed02c bhyve: capabilities: advertise RNG device support
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-15 11:34:31 +02:00
Roman Bogorodskiy
9b152fcf6f docs: drvbhyve: document virtio-rnd support
- Document the virtio random number generator device support
 - While here, remove mention of the specific FreeBSD version such as
   10-STABLE, and just refer to the latest supported release.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 11:28:40 +02:00
Roman Bogorodskiy
21e3cf978b NEWS: bhyve: document new features
Document the virtio random number generator device support
and <interface type='network'> support.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-15 11:27:56 +02:00
Michal Privoznik
ac6519084c vsh: Turn _vshControl::progname into a const string
The aim of the progname member of the _vshControl struct is to
point to argv[0] which is then used in vshOutputLogFile() to
create a prefix for a log message. But the member is never
modified (nor it should be) and thus can be a const char *.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-14 12:00:55 +02:00
Michal Privoznik
9e89ef3f2f vsh: Free commands in vshDeinit()
Whether virsh/virt-admin is running in interactive or
non-interactive mode, vshControl::cmd contains the batch of last
executed commands as a linked list. Just look into
vshCommandParse(). Free the linked list in vshDeinit() to avoid
memleak.

  3,312 bytes in 3 blocks are still reachable in loss record 572 of 577
     at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
     by 0x506AB29: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8200.5)
     by 0x1B74B8: vshCmdNew (vsh.c:1466)
     by 0x1B7A80: vshCommandParse (vsh.c:1615)
     by 0x1B8458: vshCommandStringParse (vsh.c:1874)
     by 0x1419C1: virshParseArgv (virsh.c:773)
     by 0x141D11: main (virsh.c:879)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-14 12:00:48 +02:00
Peter Krempa
32fb9af277 NEWS: Mention fix of crash on disk hotplug failure
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Peter Krempa
ba4de5e09e qemuDomainAttachDiskGeneric: Report errors from 'qemuBuildThrottleFiltersAttachPrepareBlockdev'
'qemuBuildThrottleFiltersAttachPrepareBlockdev' can fail when
constructing JSON props, but otherwise always retruns a pointer even if
there's nothing to do.

The code in 'qemuDomainAttachDiskGeneric' didn't handle this properly as
it considered NULL as "nothing to do". Return the failure instead and
check if tere's something to do by looking at 'nfilterdata'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Peter Krempa
727f42a8cd qemu: block: Don't crash if qemuBlockThrottleFiltersDetach gets NULL @data
'qemuBlockThrottleFiltersDetach' crashes if @data is NULL. That can
happen in 'qemuDomainAttachDiskGeneric' as it's used as a rollback path
in cases when we didn't yet initialize the filter struct.

Fix it by tolerating NULL @data.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/765
Fixes: 9a6560f066d1e65502d901f32ff2e91ffed3b209
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-11 16:24:59 +02:00
Laine Stump
44abaa0128 qemu: make passt+vhostuser reconnect behave identically to passt+user
When "original passt" support was added, we decided that we always
wanted to reconnect (i.e. restart the passt process) if it was somehow
terminated. Generic vhost-user, on the other hand, only turns on
reconnect if specified by the user in the config. But there is no
reason to require the user to specify this if the other end of the
vhost-user socket is a passt process - we know what has happened and
what we want to do; no reason to do the *wrong* thing by default, and
force the user to make an arbitrary decision about what to add to the
config in order to make it do the *right* thing; instead we just
hardcode it to always do the right thing.

(NB: when the backend is passt, <interface type='vhostuser'> has
always ignored the reconnect setting in <source> when parsing and
formatting, just as it has always ignored the socket path (since that
also is not user configurable for the passt backend)

Resolves: https://issues.redhat.com/browse/RHEL-80169

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:48:46 -04:00
Laine Stump
95ff77f289 qemu: put vhost-user code that's special for passt in a helper function
Rather than duplicating these two lines of chr device object setup for
hotplug and domain start, put them in a helper function that's called
from both places. That way when we need to setup *more* stuff specific
to passt+vhostuser, we can just add it in that one place.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:34 -04:00
Laine Stump
dedf1ada95 qemu: respond to NETDEV_VHOST_USER_DISCONNECTED event
This response to this event is identical to NETDEV_STREAM_DISCONNECTED
(start a new passt process to replace the one that just disappeared -
see commitf62ce81b8a5), except that the new passt process will have
"--vhost-user" appended to the commandline. Fortunately that
difference is already handled based on the virDomainNetDef contents,
so we can, in fact, respond to the new event in exactly the same
manner.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:25 -04:00
Laine Stump
03a6bc7752 qemu: make processNetDevStreamDisconnectedEvent() reusable
We will be adding a new event whose response will be *exactly* the
same as the response to NETDEV_STREAM_DISCONNECTED. Rather than doing
a copy-paste of the complete function that does the processing, turn
that function into something more generic that takes the name of the
event as an arg (the event name is only used in log messages).

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:21 -04:00
Laine Stump
51a54dc1c4 qemu: remove nonsensical sanity check in processNetdevStreamDisconnectedEvent()
By definition QEMU will never send a NETDEV_STREAM_DISCONNECTED event
if it doesn't support the reconnect option for a stream netdev. And
even if, by some comedy of errors, it did send
NETDEV_STREAM_DISCONNECTED in that case, our response to the event
doesn't request anything at all of QEMU (much less something that
would fail if QEMU didn't understand NETDEV_STREAM_DISCONNECTED) - it
just starts a new passt process to replace the one that has been
terminated, so we don't need to check the QEMU capabilities for
QEMU_CAPS_NETDEV_STREAM_RECONNECT.

Signed-off-by: Laine Stump <laine@redhat.com>
Tested-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 23:47:16 -04:00
Peter Krempa
68a83cac64 qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure
If the copy job fails to start up when calling the 'blockdev-mirror'
command the code would call qemuDomainStorageSourceChainAccessRevoke()
twice; once right after the monitor call and the second time in the
'endjob' section.

Remove the one directly after the monitor call and let the common
cleanup handle it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Peter Krempa
63c348e88a qemuDomainBlockCopyCommon: Reorder setup of 'mirror' data
While exploring an idea that modified the setup of the mirror I've
noticed that the code setting up the 'discard' field in the block copy
job happens after setup of the storage source, while normally e.g. in
qemuDomainPrepareStorageSource() it happens before.

Reorder it despite not having an effect currently.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Peter Krempa
93307c7a50 qemu: domain: Unexport 'qemuDomainPrepareStorageSourceBlockdevNodename'
The function is referenced only from within qemu_domain.c

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 17:00:27 +02:00
Ján Tomko
a55f1930d5 ch: fix double space in error message
Make it match the errors in bhyve and QEMU drivers, where it was copied
from.

Fixes: 9d6e2d127e673642b0fb135b6d58539a8e332e08
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 16:44:42 +02:00
Roman Bogorodskiy
e1e40b5035 bhyve: support interface type 'network'
Add support for interface type 'network'. While bridge remains the only
supported options for networks in bhyve, supporting interface type
'network' allows easier configuration and makes domain XMLs more
compatible with the other drivers.

While here, update the error message for the unsupported interface type
to print the requested network type string instead of an integer to make
it more user-friendly.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:14:54 +02:00
Roman Bogorodskiy
1ec1b765d6 bhyve: extend RNG device validation
Add a bunch of device def validation to catch unsupported RNG device
configurations early.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:06:18 +02:00
Roman Bogorodskiy
0464a9462c bhyve: argv2xml: support virtio-rnd devices
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:06:09 +02:00
Roman Bogorodskiy
03fac384c5 bhyve: support random number generator device
Bhyve supports the Virtio RNG interface. It's always using the
/dev/random device and doesn't have any configuration options.

Thus, in XML it's represented as:

  <rng model='virtio'>
    <backend model='random'/>
  </rng>

So extend the bhyve driver to support that and add a set of tests for
this feature.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-10 15:05:22 +02:00
Jiri Denemark
97ed7f22b0 qemu: Properly propagate migration state to TPM cleanup code
When migrating a domain with TPM state on a shared disk, we need to skip
TPM cleanup on both ends. So far the code only handled successful
migration and skipped the cleanup on the source host. But if the
migration failed for some reason, the cleanup would be incorrectly
called on the destination host removing the TPM files even though the
domain was still running on the source host.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 14:15:13 +02:00
Jiri Denemark
a5e4ca6f02 qemu: Rename outgoingMigration parameter in various TPM functions
The parameter is used to skip TPM state cleanup on outgoing migration
with shared storage. But we also need to skip the cleanup after a failed
incoming migration. Let's call the parameter "migration" to reflect its
usage on both sides of migration.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-10 14:15:13 +02:00
Michal Privoznik
ac5874ba87 network: Suppress reporting an error when D-Bus is unavailable in networkStateInitialize()
When the network driver initializes itself, it tries to subscribe
to signals from Firewalld sent over system D-Bus. Well, the code
is written in best effort mode, i.e. lack of D-Bus is not
considered an error. Problem is, virGDBusGetSystemBus() which is
used to obtain system D-Bus prints out an error in case of
lacking system D-Bus. This pollutes the logs (which may mislead
users) and goes against the best-effort nature of aforementioned
code. Check for the system D-Bus presence via
virGDBusHasSystemBus() first.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-10 13:22:43 +02:00
Michal Privoznik
4f502feebf virinhibitor: Suppress reporting an error when D-Bus is unavailable in virInhibitorAcquire()
At the beginning of virInhibitorAcquire() the system D-Bus
connection is obtained by calling virGDBusGetSystemBus(). If
there's no D-Bus available then an debug message is printed out
and function returns early. Problem is, in case of no D-Bus an
error message was reported by virGDBusGetSystemBus() and thus
logs were polluted which may mislead users.

Just check whether D-Bus is available first (by calling
virGDBusHasSystemBus()). If it is then virGDBusGetSystemBus()
should return a valid connection. Nevertheless, respect previous
logic and don't propagate error to the caller, just return 0.

Resolves: https://issues.redhat.com/browse/RHEL-79088
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-10 12:40:38 +02:00
Peter Krempa
4940e27321 NEWS: Mention fix for 'qemu-rdp' error being logged
Add the news entry stating that it's safe to ignore the error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-04-09 18:06:56 +02:00
Peter Krempa
bd473480b4 qemu: rdp: Fix 'qemuRdpAvailable()'
qemuRdpAvailable() is called from the capability filing code, thus:
- it must not report spurious errors
- it should not call any extra processes

We can solve the above by just checking existance of 'qemu-rdp' in the
path as:
- at the time of adding of qemuRdpAvailable() there was only one 'qemu-rdp' release
- it supported all the features
- the check can't change as we'd drop the capability

Add comments and gut the check to only check existance of the file.

Fixes: f5e5a9bec9ec3e6c762f5000e3b8a0ba6a3a8c8d
Closes: https://gitlab.com/libvirt/libvirt/-/issues/763
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2025-04-09 18:05:26 +02:00
Peter Krempa
59f40ba67c esx: Accept empty "path" URI component same way as "/"
When connecting to "esx://" URI there's code which prints a warning that
the path is not "empty". The check validates that "uri->path" is "/".

In case when the user uses URI such as:

 esx://hostname

the warning is printed as well. Since there is no effective difference
betweeen the two allow empty strings as well.

Resolves: https://issues.redhat.com/browse/RHEL-86459
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:04:11 +02:00
Peter Krempa
617e2dc319 manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh nodeinfo'
Adapt the disclarimer about the data not being accurate in many cases
from the API docs to the virsh command using the aforementioned API.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
6654cf472c virNodeGetInfo: Improve description of the case when fake data is reported
virNodeGetInfo due to the rigid desing of the filled struct can't
faithfully represent all topologies. Improve the description when that
happens and outline the fallback topology.

The function docs already state that users ought to use
virConnectGetCapabilities() instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
e54cc1500c libvirt-host: Clarify/fix description of the CPU frequency field
The 'virNodeInfo' field for CPU frequency is named 'mhz'. The docs were
mentioning 'mHZ', which is neither the field name nor proper spelling of
the unit.

Reword the paragraph to mention "CPU frequency" instead and explicitly
name the field in virNodeInfo struct.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
be29dbe187 virHostCPUGetInfoPopulateLinux: Remove 'cleanup'
As the cleanup section is empty; the code can now return directly on
errors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
f883dab020 virHostCPUGetInfoPopulateLinux: Use automatic memory freeing
Use 'g_autfree' for the two temporary strings.

'sysfs_cpudir' was used in two places, one of which is in a loop. Add
another helper variable for it and declare the other one in the loop.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 18:03:29 +02:00
Peter Krempa
9a747afe6c qemu: capabilities: Retire QEMU_CAPS_NBD_BITMAP
The capability wasn't used since it's inception. It now refers to a
deprecated QMP command. Drop it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
4675e7d3a8 qemu: capabilities: Retire QEMU_CAPS_BLOCK_EXPORT_ADD
The 'block-export-add' command was added in qemu-5.2 so we now use it
unconditionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
57b9b969fb qemu: monitor: Drop wrappers for 'nbd-server-add'
The code is no longer used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
cb332d616a qemu: block: Always assume support for 'block-export-add'
'block-export-add' QMP command which replaces 'nbd-server-add' was
introduced in qemu-5.2. We can thus drop the old code now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:56 +02:00
Peter Krempa
fe88f3f151 docs: drvqemu: Fix required minimum qemu version to 6.2.0
Commit 8824af826d3 (and also commit 073bf167843 before it) which bumped
minimu, qemu version forgot to update the qemu driver documentation page

Fixes: 8824af826d3
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-09 18:01:08 +02:00
Kirill Shchetiniuk via Devel
cdf599cfb6 NEWS: mention vol-create bug fix
Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 14:31:35 +02:00
Kirill Shchetiniuk via Devel
b8c3d847a9 storage: virStorageVolDefParse and storageVolCreateXML flags fix
When the new storage was created using virsh with --validate option
following errors occurred:

 # virsh vol-create default --file vol-def.xml --validate
error: Failed to create vol from vol-def.xml
error: unsupported flags (0x4) in function virStorageVolDefParseXML

and after virStorageVolDefParse fix:

 # virsh vol-create default --file vol-def.xml --validate
error: Failed to create vol from vol-def.xml
error: unsupported flags (0x4) in function storageBackendCreateQemuImg

Clear the VIR_VOL_XML_PARSE_VALIDATE flag before
virStorageVolDefParseXML() and the VIR_STORAGE_VOL_CREATE_VALIDATE before
backend->buildVol() (traces down to storageBackendCreateQemuImg) calls,
as the XML schema validation is already complete within previous steps
and there is no validation later.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-09 14:27:15 +02:00