1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-10 06:50:28 +03:00

Compare commits

...

67 Commits

Author SHA1 Message Date
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
Peter Krempa
7f07cf5a72 docs: Render API and XML sections one per line in HTML
Finding the correct link to a XML description or API reference section
in a big blob of links concatenated in a paragraph is unpleasand and
especially for 'capabilities' and 'domain capabilities' following each
other.

Turn the API and XML reference sections into a list in RST and add CSS
to fromat it a bit more compact.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-07 15:26:32 +02:00
Peter Krempa
d8d7d970c3 docs: Re-order XML schema after API documentation on 'docs' page
Swap the order of links to XML schema docs and to the other language
docs. The XML schema is usually accessed more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-07 15:26:32 +02:00
Jiri Denemark
4ba5b659dc NEWS: Document ARM CPU map bug fix
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:43 +02:00
Jiri Denemark
701b2c0fca cpu_map: Install Ampere-1 ARM CPU models
Fixes: 282f38ad3d3960b24aa97d75cae95c8c3d08a218
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/762
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:42 +02:00
Jiri Denemark
b72270fafd tests: Add a basic CPU test for aarch64
The purpose of this test is to enforce loading and parsing of ARM CPU
map so that possible issues are found earlier.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-07 13:45:42 +02:00
Michal Privoznik
73d8cbaae5 meson: Drop workaround for -Wframe-larger-than and clang
After previous cleanups, all functions have their stack smaller
than 2048 bytes and thus the workaround is no longer needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:23 +02:00
Michal Privoznik
01a098ebc7 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotCreateFakeDiffStorage()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:19 +02:00
Michal Privoznik
61e1e61f81 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotAddRWDisks()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:15 +02:00
Michal Privoznik
cccdb33ced vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotAddDisksToMediaRegistry()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:11 +02:00
Michal Privoznik
de3ea81270 vbox: Move parts of vboxSnapshotRedefine() into a separate function
There's too much happening inside of vboxSnapshotRedefine(). Not
only it makes the function hard to read, but it also increases
stack size of the function. Move one part into a separate
function: vboxSnapshotReplaceRWDisks()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:07 +02:00
Michal Privoznik
f9c4f20d8f doRemoteOpen: Drop needless typecast of @transport
The @transport variable is already pass into the function with
proper type. There's no need to typecast it to its very same type
inside the function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:43:03 +02:00
Michal Privoznik
62ba268cd7 doRemoteOpen: Move RPC talk to a separate function
When opening a connection, the client does some RPC talk
(most notably REMOTE_PROC_CONNECT_OPEN, and in some cases
REMOTE_PROC_CONNECT_GET_URI even).

Now, calling RPC means that local variables must be created.
Having them in doRemoteOpen() increases its stack size which goes
against our effort in bringing the size down (see one of previous
commits).

Move that part of the code into a separate function.

This brings the stack size of doRemoteOpen() even further: from
1320 bytes to 1272.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:42:54 +02:00
Michal Privoznik
063222801a remote_driver: Move URI arg extraction into a separate function
There's a problem with glib: what we might consider functions are
in fact macros and to make things worse - they do declare local
variables. For instance here's the declaration of
g_clear_pointer() macro:

#define g_clear_pointer(pp, destroy)                     \
  G_STMT_START                                           \
  {                                                      \
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
    glib_typeof ((pp)) _pp = (pp);                       \
    glib_typeof (*(pp)) _ptr = *_pp;                     \
    *_pp = NULL;                                         \
    if (_ptr)                                            \
      (destroy) (_ptr);                                  \
  }                                                      \
  G_STMT_END                                             \

Now, as of v6.2.0-rc1~267 our VIR_FREE() macro is in fact a
redeclaration of g_clear_pointer(). Thus, calling VIR_FREE()
increases stack size!

Ideally, this wouldn't be a problem, because those variables
(_pp, _ptr) live in their own block. And clever compiler can just
reuse space created for one block.

But then there's clang where we are hitting this exact problem in
functions like doRemoteOpen() where either g_clear_pointer() is
called directly, or there are macros like EXTRACT_URI_ARG_STR()
which hide the call away.

That's why despite our previous efforts decreasing stack size we
still needed v9.8.0-rc1~208.

Well, moving URI argument extraction (those calls to
EXTRACT_URI_ARG_* macros) into a separate function helps us
decrease stack size from 2296 bytes to 1320.

Even after this there are still more possibilities for
improvements, but those will be addressed in future commits.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2025-04-07 08:42:20 +02:00
Michal Privoznik
008ccd3518 ch: Fix printf format strings wrt size_t argument
In a few places, when a size_t typed argument is passed to a
printf-like function the corresponding specifier is %ld instead
of %zu. Fix those places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:26 +02:00
Michal Privoznik
b065df3d04 ch: Drop pid from monitor
The domain object already has a member that allows storing
hypervisor's PID (vm->pid). There's no need to duplicate it in
_virCHMonitor struct. Switch CH code to use the former.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:23 +02:00
Michal Privoznik
3dae81c8d7 ch: Use CH_DOMAIN_PRIVATE() more
There are two instances where vm->privateData is typecasted only
so that it can be dereferenced further. Well, that's exactly what
CH_DOMAIN_PRIVATE() macro is for. Use that instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-04 15:30:13 +02:00
Will
6e147f6eac Add NEWS item for <hyperv/> flags with Xen
Signed-off-by: Will <tcosprojects@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-04-03 15:48:01 -06:00
Will
410dfde9bb libxl_conf: Implement hyperv domain flags for Xen
Adds support for configuring <hyperv/> flags for domains
running under Xen.

The following flags, making use of QEMU's existing flags, are now
configurable for Xen: vapic, synic, stimer, frequencies, tlbflush and
ipi.

Tests have been added validating translation to libxl's viridian flags

Updated docs section on <hyperv/> flags to note support and to specify
which flags work with Xen.

Signed-off-by: Will <tcosprojects@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2025-04-03 15:47:52 -06:00
Ján Tomko
312088d9b6 tools: virsh: metadata: do not report error on missing metadata
Similarly to `desc` and `net-desc`, return an empty string if
there is no metadata to be returned.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-03 14:08:30 +02:00
Yuri Chornoivan
d7492f5225 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10917 of 10917 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2025-04-03 13:20:43 +02:00
Laine Stump
60b37479f8 docs: add table showing guest IP/DNS/gateway settings when using SLIRP
When using the default SLIRP backend for <interface type='user'>, the
<ip address='blah' prefix='blur'/> setting doesn't behave as might be
expected (i.e. it doesn't set the guest interface IP/prefix to exactly
the provided values). This *should* have created questions when users
originally encountered it, but instead it has become more apparent as
people are contemplating switching from using the SLIRP backend to
using passt instead (with passt, the <ip> settings do behave "as
expected").

In order to make this difference in behavior less mysterious, Yalan
Zhang kindly took the time to test and document the effect of various
representative <ip> settings on guest interface config when SLIRP is
used (see https://issues.redhat.com/browse/RHEL-46601); this patch
adds that same table to libvirt's documentation.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:33:10 -04:00
Kirill Shchetiniuk via Devel
4c5e3b1ca0 ch: virCHProcessEvent() vm shutdown event handler fix
When the domain shutdown was executed from virsh, only the VM
process (a child of the CH monitor) was terminated. Since we assume
only one VM per monitor, the monitor process should also be
terminated.

Modified the VM shutdown event handler to match the VMM shutdown
behavior, ensuring the VM monitor stops along with the VM. Also
updated the virCHEventStopProcess job type, as it only destroys the
domain rather than modifying anything.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:35:28 +02:00
Kirill Shchetiniuk via Devel
ad22460a75 ch: virCHProcessEvent() update domain info after reboot
When the domain was rebooted, some of its properties were changed but
not updated in the transient domain definition. This led to the
inability to connect to the serial console as its path had changed
during the reboot but was not updated in the domain definition.

Added VIR_CH_EVENT_VM_REBOOTED event handling to update the
information in transient domain definition after domain's reboot is
completed to maintain it in consistent state.

Signed-off-by: Kirill Shchetiniuk <kshcheti@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-04-02 17:35:28 +02:00
Kirill Shchetiniuk via Devel
9d6e2d127e ch: virCHMonitorNew() run new CH monitor daemonized
When the new CH monitor was started, it ran as a non-daemonized
process and was a child of the CH driver process. This led to a
situation where if the CH driver died, the monitor process were
killed too, terminating the running VM under the monitor. This
led to termination of all VM started under the libvirt.

Make new monitor running daemonized to avoid VMs shutdown when
driver dies. Also added a pidfile its preparetion to be able
to aquire daemon's PID.

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-02 17:35:28 +02:00
Peter Krempa
e677faa11e qemu: capabilities: Retire QEMU_CAPS_SNAPSHOT_INTERNAL_QMP
The code now always assumes support for the QMP internal snapshot
commands so the capability is no longer needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
38d47345e2 qemu: monitor: Remove HMP monitor code
Now that we've replaced the final two HMP commands used by libvirt we
can fully drop the 'text' monitor support.

The only thing we keep is the HMP passtrhough with
'virsh qemu-monitor-command'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
edc541129f qemu: Always revert internal snapshots via QMP rather than '-loadvm'
As all supported qemu versions now support the QMP internal snapshot
commands (QEMU_CAPS_SNAPSHOT_INTERNAL_QMP is always present) we can
remove the code for loading snapshots during startup via '-loadvm'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
31896db4d5 qemu: snapshot: Always assume support for QEMU_CAPS_SNAPSHOT_INTERNAL_QMP
The 'snapshot-save' QMP command was introduced in 'qemu-6.0' and libvirt
now requires at least 'qemu-6.2'. Thus we can assume that the QMP
command can be used always.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:41 +02:00
Peter Krempa
4d548a2458 qemuSnapshotCreateActiveInternal: Fix error logic
The 'ret' variable is set to 0 before a call which can theoretically
fail. Not in practice really as the failure scenarion includes only
object initialization.

Since the code already has another variable for checking monitor returns
use that one properly so that the code makes sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:40 +02:00
Peter Krempa
62d6794827 qemu: domain: Don't check return value of 'virCPUDefCopy'
As 'virCPUDefCopy' can't fail any more (without aborting) remove the
last two return value checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-02 16:51:40 +02:00
Peter Krempa
8c2872d72c qemu: monitor: Improve field annotations in QEMU_CHECK_MONITOR
The macro checking monitor object state also logs information such as
the monitor object pointer and the number of the monitor FD.

Name the field 'monfd' instead of 'fd' as it's confusing when debugging
FD pasing via monitor.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
e2c6f436dc tests: domainbackupxml2xml: Add test case for pull-mode backup with NBD transport='fd'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
eb768a556d backup: Add support for passing server socket file descriptor to backup NBD server
In deployments where libvirt is containerized together with the VM it
may be hard for the management application to access listening sockets
inside the container from the outside.

This patch implements "transport='fd'" for the NBD server definition for
backups which allows to use the existing "virDomainFDAssociate()" to
pass FD to a pre-opened server socket to qemu instead of trying to
create it by qemu.

Add schema, enable the parser, add formatter and implement the actual
passing for the qemu backup code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:30 +02:00
Peter Krempa
2e014dfae6 qemu: monitor: Support FD passing of sockets to 'qemuMonitorJSONNBDServerStart'
Upcoming patches will extend the FD passing infrastructure to the backup
job so that users can pass an opened socket instead of qemu opening it
themself to bypass difficulities caused by containerizing libvirt.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
5da6b62419 virStorageNetHostDefClear: Move into virStorageNetHostDefFree
There are no other callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
ee49106dbf conf: Introduce VIR_STORAGE_NET_HOST_TRANS_FD
Prepare the parser code and anything using 'virStorageNetHostTransport'
to support passing a FD instead of opening the connection by qemu
itself.

For now this just prepares the parser and data structures, but the code
is dormant.

Only code paths which will actually support FD passing will then enable
it in the future.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Spellchecked-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
081f3ec3dd virDomainStorageNetworkParseHost: Refactor cleanup
Use a 'switch' statement instead of a bunch of if statements to do
validation and selection what to parse.

Remove the pre-clearing of the struct as we always allocate cleared
memory for it and we can reorder assignments to avoid the need for
cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
aa3c1de260 virDomainStorageNetworkParseHost: Remove unpopulated 'transport' variable
Since the refactor to use proper enum type for the network transport the
'transport' variable is no longer filled. Remove it and fix the error
message which references it without using NULLSTR.

Fixes: 452695926dc
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:18:29 +02:00
Peter Krempa
93ecaec845 virDomainDiskDefValidateSourceChainOne: Fix validation of 'data-file' nesting
As the 'dataStore' is internally represented as a virStorageSource
object it has provisions for nesting which is not supported.

When I've reviewed and modified the commit adding data file parsing
support I've added code that was supposed to reject any 'backingStore'
and 'dataStore' structures nested in a source of a 'dataStore'.

Unfortunately the check was broken as one of the terms checked the
presence of parent's 'backingStore' instead of the nesting.

Fix it and add tests.

Fixes: b3171cf8da3
Resolves: https://issues.redhat.com/browse/RHEL-85320
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 16:16:05 +02:00
Peter Krempa
7d4de62cfa esxConnectListAllDomains: Don't propagate failure to lookup a single domain
In esxConnectListAllDomains if the lookup of the VM name and UUID fails
for a single VM (possible e.g. with broken storage) the whole API would
return failure even when there are working VMs.

Rework the lookup so that if a subset fails we ignore the failure on
those. We report an error only if lookup of all of the objects failed.
Failure is reported from the last one.

Resolves: https://issues.redhat.com/browse/RHEL-80606
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-04-01 16:15:24 +02:00
Daniel P. Berrangé
904b5e9d06 news: document dropping apparmor < 3.0.0
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 13:38:01 +01:00
Daniel P. Berrangé
5ed5673ebf meson: drop remaining checks for apparmor version
Now that we mandate version 3, any remaining conditional checks
in meson/source code can be removed.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:29 +01:00
Daniel P. Berrangé
2c46d5c216 Revert "apparmor: Allow version-specific bits in profiles"
This reverts commit 19eb8abc9a4d15190852d644b773a2348f11c9da.

There is no longer any need to dynamically generate version specific
rules. This revert can be reverted, if the need ever arises again
in the future.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:27 +01:00
Daniel P. Berrangé
b8b60c4bee Revert "apparmor: Allow version-specific bits in abstractions too"
This reverts commit 63a312fa2d3be0e34a8989deddd39792fc9badf6.

There is no longer any need to dynamically generate version specific
rules. This revert can be reverted, if the need ever arises again
in the future.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:24 +01:00
Daniel P. Berrangé
933494237a apparmor: assume at least apparmor >= 3
By assuming version 3, we can drop all the conditional version
substitutions from the profiles.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:28:20 +01:00
Daniel P. Berrangé
21b7b02b72 meson: mandate apparmor >= 3.0.0
We can now assume at least version three:

 * Debian 12: 3.0.8
 * openSUSE Leap 15.5: 3.0.4
 * openSUSE Leap 15.6: 3.1.7
 * Ubuntu 22.04: 3.0.4
 * Ubuntu 24.04: 4.0.0

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-01 12:27:13 +01:00
Jiri Denemark
52638fb16a Post-release version bump to 11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 12:03:39 +02:00
Jiri Denemark
73329aa737 Release of libvirt-11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-04-01 11:59:33 +02:00
김인수
803671de80 Translated using Weblate (Korean)
Currently translated at 98.6% (10775 of 10917 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2025-03-31 10:55:57 +02:00
Andi Chandler
60d3a62c35 Translated using Weblate (English (United Kingdom))
Currently translated at 48.2% (5270 of 10917 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
2025-03-31 10:55:57 +02:00
Harikumar Rajkumar
40f5082683 NEWS: qemu: support block disk along with throttle filters
Signed-off-by: Harikumar Rajkumar <harirajkumar230@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-31 10:52:39 +02:00
Michal Privoznik
0123456789 NEWS: Document features/improvements/bug fixes I've participated in
There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-31 09:06:24 +02:00
108 changed files with 2070 additions and 1263 deletions

View File

@ -8,11 +8,52 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v11.2.0 (unreleased)
v11.3.0 (unreleased)
====================
* **Security**
* **Removed features**
* Support for AppArmor versions prior to 3.0.0 has been dropped.
* **New features**
* xen: Support configuration of ``<hyperv/>`` flags for Xen domains.
The following flags are now configurable for Xen: ``vapic``, ``synic``,
``stimer``, ``frequencies``, ``tlbflush`` and ``ipi``.
* **Improvements**
* **Bug fixes**
* cpu_map: Install Ampere-1 ARM CPU models
The Ampere-1 CPU models added in the previous release were not properly
installed and thus every attempt to start an ARM domain with custom
CPU definition would fail.
* storage: Fix new volume creation
No more errors occur when new storage volume is being created using ``virsh
vol-create`` with ``--validate`` option and/or ``virStorageVolCreateXML()``
with ``VIR_VOL_XML_PARSE_VALIDATE`` flag.
* Don't spam logs with error about ``qemu-rdp`` when starting a qemu VM
On hosts where the ``qemu-rdp`` binary is not installed a start of a VM
would cause an error such as ::
error : qemuRdpNewForHelper:103 : 'qemu-rdp' is not a suitable qemu-rdp helper name: No such file or directory
to be logged in the system log. It is safe to ignore the error. The code
was fixed to avoid the message when probing for support.
v11.2.0 (2025-04-01)
====================
* **Removed features**
* Remove support for qemu-6.1 and older
@ -80,6 +121,26 @@ v11.2.0 (unreleased)
system are printed. A user may specify ``--all`` to also print models which
are not supported on the host.
* qemu: Introduce os/shim element
For secure boot environments where ``<loader/>`` is signed, it may be
unfeasible to keep the binary up to date (esp. when revoking certificates
contained within). To address that, new ``<shim/>`` element is introduced
which allows hypervisor to side load another UEFI binary, which can then
contain new certification authorities and/or list of revocations.
* ch: Enable SEV SNP support
Cloud Hypervisor guests can be now started with SEV SNP enabled.
* qemu: Support for Block Disk Along with Throttle Filters
Introduce support for multiple throttle groups per block disk in QEMU,
enhancing I/O control and performance optimization. This update builds
on the existing throttling functionality by allowing more granular control
with the ability to assign different throttle groups to multiple block
devices, improving shared throttling across devices.
* **Improvements**
* qemu: Improved guest agent corner case error reporting
@ -106,6 +167,14 @@ v11.2.0 (unreleased)
``virConnectGetAllDomainStats``, ``virDomainListGetStats``, and
``virDomainGetGuestInfo``.
* qemu: Reflect MAC address change in live domain XML
When a guest changes MAC address on one of its vNICs the new MAC address is
now visible in the live XML under ``currentAddress`` attribute of
``<mac/>`` element. At the same time,
``VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE`` event is emitted so that management
applications can update their internal state.
* **Bug fixes**
* qemu: attach virtio-mem with CCW address
@ -114,6 +183,11 @@ v11.2.0 (unreleased)
default type CCW address assigned. A specified CCW address is now used for
the virtio-mem device instead of getting overwritten by a PCI address.
* ch: Various memory leak fixes
There were some memory leaks identified in the Cloud Hypervisor driver.
They are fixed now.
v11.1.0 (2025-03-03)
====================

View File

@ -123,6 +123,17 @@ img.diagram {
margin-bottom: 1em;
}
#documentation #application-development ul li p {
padding-bottom: 0px;
padding-top: 0px;
}
#documentation #application-development ul {
margin-left: 2em;
padding-top: 0px;
padding-bottom: 0px;
}
.removedhv {
color: darkred;
}

View File

@ -60,24 +60,46 @@ Application development
-----------------------
`API reference <html/index.html>`__
Reference manual for the C public API, split in
`common <html/libvirt-libvirt-common.html>`__,
`domain <html/libvirt-libvirt-domain.html>`__,
`domain checkpoint <html/libvirt-libvirt-domain-checkpoint.html>`__,
`domain snapshot <html/libvirt-libvirt-domain-snapshot.html>`__,
`error <html/libvirt-virterror.html>`__,
`event <html/libvirt-libvirt-event.html>`__,
`host <html/libvirt-libvirt-host.html>`__,
`interface <html/libvirt-libvirt-interface.html>`__,
`network <html/libvirt-libvirt-network.html>`__,
`node device <html/libvirt-libvirt-nodedev.html>`__,
`network filter <html/libvirt-libvirt-nwfilter.html>`__,
`secret <html/libvirt-libvirt-secret.html>`__,
`storage <html/libvirt-libvirt-storage.html>`__,
`stream <html/libvirt-libvirt-stream.html>`__ and
`admin <html/libvirt-libvirt-admin.html>`__,
`QEMU <html/libvirt-libvirt-qemu.html>`__,
`LXC <html/libvirt-libvirt-lxc.html>`__ libs
Reference manual for the C public API, split in:
* `common <html/libvirt-libvirt-common.html>`__
* `domain <html/libvirt-libvirt-domain.html>`__
* `domain checkpoint <html/libvirt-libvirt-domain-checkpoint.html>`__
* `domain snapshot <html/libvirt-libvirt-domain-snapshot.html>`__
* `error <html/libvirt-virterror.html>`__
* `event <html/libvirt-libvirt-event.html>`__
* `host <html/libvirt-libvirt-host.html>`__
* `interface <html/libvirt-libvirt-interface.html>`__
* `network <html/libvirt-libvirt-network.html>`__
* `node device <html/libvirt-libvirt-nodedev.html>`__
* `network filter <html/libvirt-libvirt-nwfilter.html>`__
* `secret <html/libvirt-libvirt-secret.html>`__
* `storage <html/libvirt-libvirt-storage.html>`__
* `stream <html/libvirt-libvirt-stream.html>`__
and the documentation for the API of the additional libs:
* `admin <html/libvirt-libvirt-admin.html>`__
* `QEMU <html/libvirt-libvirt-qemu.html>`__
* `LXC <html/libvirt-libvirt-lxc.html>`__
`XML schemas <format.html>`__
Description of the XML schemas for
* `domains <formatdomain.html>`__
* `networks <formatnetwork.html>`__
* `network ports <formatnetworkport.html>`__
* `network filtering <formatnwfilter.html>`__
* `storage <formatstorage.html>`__
* `storage encryption <formatstorageencryption.html>`__
* `capabilities <formatcaps.html>`__
* `domain capabilities <formatdomaincaps.html>`__
* `storage pool capabilities <formatstoragecaps.html>`__
* `node devices <formatnode.html>`__
* `secrets <formatsecret.html>`__
* `snapshots <formatsnapshot.html>`__
* `checkpoints <formatcheckpoint.html>`__
* `backup jobs <formatbackup.html>`__
`Language bindings and API modules <bindings.html>`__
Bindings of the libvirt API for
@ -92,23 +114,6 @@ Application development
and integration API modules for
`D-Bus <dbus.html>`__
`XML schemas <format.html>`__
Description of the XML schemas for
`domains <formatdomain.html>`__,
`networks <formatnetwork.html>`__,
`network ports <formatnetworkport.html>`__,
`network filtering <formatnwfilter.html>`__,
`storage <formatstorage.html>`__,
`storage encryption <formatstorageencryption.html>`__,
`capabilities <formatcaps.html>`__,
`domain capabilities <formatdomaincaps.html>`__,
`storage pool capabilities <formatstoragecaps.html>`__,
`node devices <formatnode.html>`__,
`secrets <formatsecret.html>`__,
`snapshots <formatsnapshot.html>`__,
`checkpoints <formatcheckpoint.html>`__,
`backup jobs <formatbackup.html>`__
`URI format <uri.html>`__
The URI formats used for connecting to libvirt

View File

@ -5,7 +5,7 @@
QEMU/KVM/HVF hypervisor driver
==============================
The libvirt KVM/QEMU driver can manage any QEMU emulator from version 4.2.0 or
The libvirt KVM/QEMU driver can manage any QEMU emulator from version 6.2.0 or
later.
It supports multiple QEMU accelerators: software

View File

@ -1,3 +1,5 @@
.. role:: since
Backup XML format
=================
@ -42,6 +44,25 @@ were supplied). The following child elements and attributes are supported:
necessary to set up an NBD server that exposes the content of each disk at
the time the backup is started.
In addition to the above the NBD server used for backups allows using
``transport='fd' fdgroup='NAME'`` where ``NAME`` is the name used with
``virDomainFDAssociate()`` to pass a pre-opened server socket file descriptor
to qemu. :since:`Since 11.3.0`
Example code to pass a socket with libvirt-python bindings::
import socket
import libvirt
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.bind("/path/to/socket")
fdlist = [ s.fileno() ]
conn = libvirt.open()
dom = conn.lookupByName("VMNAME")
dom.FDAssociate("NAME", fdlist)
Note that for the QEMU hypervisor the TLS environment in controlled using
``backup_tls_x509_cert_dir``, ``backup_tls_x509_verify``, and
``backup_tls_x509_secret_uuid`` properties in ``/etc/libvirt/qemu.conf``.

View File

@ -2132,32 +2132,34 @@ are:
based virtualization drivers, such as LXC.
``hyperv``
Enable various features improving behavior of guests running Microsoft
Windows.
Windows. :since:`Since 11.3.0` some of these flags are also available for
Xen domains running Microsoft Windows.
=============== ====================================================================== ============================================ ========================================================================
Feature Description Value Since
=============== ====================================================================== ============================================ ========================================================================
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0)`
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0)`
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0), 11.3.0 (Xen, always on)`
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0), 11.3.0 (Xen)`
spinlocks Enable spinlock support on, off; retries - at least 4095 :since:`1.1.0 (QEMU 2.0)`
vpindex Virtual processor index on, off :since:`1.3.3 (QEMU 2.5)`
vpindex Virtual processor index on, off :since:`1.3.3 (QEMU 2.5), 11.3.0 (Xen, always on)`
runtime Processor time spent on running guest code and on behalf of guest code on, off :since:`1.3.3 (QEMU 2.5)`
synic Enable Synthetic Interrupt Controller (SynIC) on, off :since:`1.3.3 (QEMU 2.6)`
stimer Enable SynIC timers, optionally with Direct Mode support on, off; direct - on,off :since:`1.3.3 (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1)`
synic Enable Synthetic Interrupt Controller (SynIC) on, off :since:`1.3.3 (QEMU 2.6), 11.3.0 (Xen)`
stimer Enable SynIC timers, optionally with Direct Mode support on, off; direct - on,off :since:`1.3.3 (QEMU 2.6), direct mode 5.7.0 (QEMU 4.1), 11.3.0 (Xen, on/off only)`
reset Enable hypervisor reset on, off :since:`1.3.3 (QEMU 2.5)`
vendor_id Set hypervisor vendor id on, off; value - string, up to 12 characters :since:`1.3.3 (QEMU 2.5)`
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12)`
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12), 11.3.0 (Xen)`
reenlightenment Enable re-enlightenment notification on migration on, off :since:`4.7.0 (QEMU 3.0)`
tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0)`
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1)`
tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0), 11.3.0 (Xen, on/off only)`
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1), 11.3.0 (Xen)`
evmcs Enable Enlightened VMCS on, off :since:`4.10.0 (QEMU 3.1)`
avic Enable use Hyper-V SynIC with hardware APICv/AVIC on, off :since:`8.10.0 (QEMU 6.2)`
emsr_bitmap Avoid unnecessary updates to L2 MSR Bitmap upon vmexits. on, off :since:`10.7.0 (QEMU 7.1)`
xmm_input Enable XMM Fast Hypercall Input on, off :since:`10.7.0 (QEMU 7.1)`
=============== ====================================================================== ============================================ ========================================================================
:since:`Since 8.0.0`, the hypervisor can be configured further by setting
the ``mode`` attribute to one of the following values:
:since:`Since 8.0.0 (QEMU) Since 11.3.0 (Xen)`, the hypervisor can be
configured further by setting the ``mode`` attribute to one of the following
values:
``custom``
Set exactly the specified features.
@ -5244,15 +5246,7 @@ network address by including an ``ip`` element specifying an IPv4
address in its one mandatory attribute, ``address``. Optionally, a
second ``ip`` element with a ``family`` attribute set to "ipv6" can be
specified to add an IPv6 address to the interface. ``address``.
Optionally, an address ``prefix`` can be specified. These settings are
surprisingly **not** used by SLIRP to set the exact IP address;
instead they are used to determine what network/subnet the guest's IP
address should be on, and the guest will be given an address in that
subnet, but the host portion of the address will still be "2.15". In
the example below, for example, the guest will be given the IP address
172.17.2.15 (**note that the '1.1' in the host portion of the address
has been ignored**), default route of 172.17.2.2, and DNS server
172.17.2.3.
Optionally, an address ``prefix`` can be specified.
::
@ -5268,6 +5262,59 @@ has been ignored**), default route of 172.17.2.2, and DNS server
</devices>
...
These settings are surprisingly **not** used by SLIRP to set the exact
IP address; instead they are used to determine what **network/subnet**
the guest's IP address should be on, and the guest will be given an
address in that subnet, but the host portion of the address will still
be the host portion of "10.0.2.15" (based on the configured prefix (or
a prefix of 24 if no prefix is specified). The DNS and default gateway
addresses given to the guest will be similarly based on the network
portion of the configuration-provided <ip> combined with the host
portion of SLIRPs default settings for DNS/gateway
(10.0.2.3/10.0.2.2). To help resolve the confusion of the previous
sentences, the table below shows examples of the settings that will be
provided to the guest (via a DHCP response) to use for its interface
config (ip/prefix, DNS, default gateway) for various settings of <ip>
element address and prefix in libvirt's <interface type='user'>
config:
.. list-table::
:header-rows: 1
* - libvirt <ip> element
- guest ip/prefix
- guest DNS
- guest default gateway
* - (unspecified)
- 10.0.2.15/24
- 10.0.2.3
- 10.0.2.2
* - address='172.17.1.1'
prefix='16'
- 172.17.2.15/16
- 172.17.2.3
- 172.17.2.2
* - address='172.17.1.1'
prefix='24'
- 172.17.1.15/24
- 172.17.1.3
- 172.17.1.2
* - address='172.17.1.1'
prefix='8'
- 172.0.2.15/16
- 172.0.2.3
- 172.0.2.2
* - address='172.17.1.1'
prefix='23'
- 172.17.0.15/23
- 172.17.0.3
- 172.17.0.2
Userspace connection using passt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -5309,8 +5356,10 @@ any conflict).
Also different from SLIRP's behavior: if you do specify IP
address(es), the exact address and netmask/prefix you specify will be
provided to the guest (i.e. passt doesn't interpret the <ip> settings
as a network address like SLIRP does, but as a host address). In
example given above, the guest IP would be set to exactly 172.17.1.1.
as a network address like SLIRP does, but as a host address). In the
table of examples given above, the guest IP would be set to exactly
172.17.1.1 in all cases (the DNS and default gateway will be set
the same as they are on the host).
Just as with SLIRP, though, once traffic from the guest leaves the
host towards the rest of the network, it will always appear as if it

View File

@ -427,10 +427,25 @@ nodeinfo
nodeinfo
Returns basic information about the node, like number and type of CPU,
and size of the physical memory. The output corresponds to virNodeInfo
structure. Specifically, the "CPU socket(s)" field means number of CPU
sockets per NUMA cell. The information libvirt displays is dependent
upon what each architecture may provide.
and size of the physical memory.
Use of this command is strongly discouraged as the information provided
is not guaranteed to be accurate on all hardware platforms.
The *CPU frequency* value merely reflects the speed that the first CPU in the
machine is currently running at. This speed may vary across CPUs and changes
continually as the host OS throttles.
The data structure used to fetch the data is not extensible thus only supports
global nodes/sockets/cores/threads (sockets/cores/threads is per NUMA node)
topology information. If the host CPU has any further groupings (e.g.
dies, clusters, etc) or the NUMA topology is non-symmetrical the data structure
can't faithfully represent the system. In such cases a fake topology
(nodes = 1, sockets = 1, cores = number of host cpus, threads = 1) which
only correctly represents the total host CPU count is reported.
Recommended replacement is to use the *capabilities* command which reports
the data (except frequency) under ``/capabilities/host/topology`` XPath.
nodecpumap

View File

@ -1,6 +1,6 @@
project(
'libvirt', 'c',
version: '11.2.0',
version: '11.3.0',
license: 'LGPLv2+',
meson_version: '>= 0.56.0',
default_options: [
@ -258,11 +258,6 @@ alloc_max = run_command(
stack_frame_size = 2048
# clang without optimization enlarges stack frames in certain corner cases
if cc.get_id() == 'clang' and get_option('optimization') == '0'
stack_frame_size = 4096
endif
# sanitizer instrumentation may enlarge stack frames
if get_option('b_sanitize') != 'none'
stack_frame_size = 32768
@ -926,12 +921,11 @@ if acl_dep.found()
conf.set('WITH_LIBACL', 1)
endif
apparmor_dep = dependency('libapparmor', required: get_option('apparmor'))
apparmor_version = '3.0.0'
apparmor_dep = dependency('libapparmor', version: '>=' + apparmor_version,
required: get_option('apparmor'))
if apparmor_dep.found()
conf.set('WITH_APPARMOR', 1)
if apparmor_dep.version().version_compare('>=3.0.0')
conf.set('WITH_APPARMOR_3', 1)
endif
conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d')
conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
endif

View File

@ -188,7 +188,6 @@ src/qemu/qemu_migration_cookie.c
src/qemu/qemu_migration_params.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c
src/qemu/qemu_namespace.c
src/qemu/qemu_nbdkit.c
src/qemu/qemu_passt.c

View File

@ -13,7 +13,7 @@ msgstr ""
"Project-Id-Version: libvirt 6.0.0\n"
"Report-Msgid-Bugs-To: https://libvirt.org/bugs.html\n"
"POT-Creation-Date: 2025-03-25 10:52+0000\n"
"PO-Revision-Date: 2025-03-17 18:31+0000\n"
"PO-Revision-Date: 2025-03-29 02:07+0000\n"
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
"Language-Team: English (United Kingdom) <https://translate.fedoraproject.org/"
"projects/libvirt/libvirt/en_GB/>\n"
@ -22,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.2\n"
"X-Generator: Weblate 5.10.4\n"
msgid ""
"\n"
@ -1255,7 +1255,7 @@ msgstr "'%1$s' is not a suitable pr helper"
#, c-format
msgid "'%1$s' is not a suitable qemu-rdp helper name"
msgstr ""
msgstr "'%1$s' is not a suitable qemu-rdp helper name"
#, c-format
msgid "'%1$s' is not supported in this QEMU binary"
@ -1283,7 +1283,7 @@ msgstr "'%1$s' starting from %2$llu has only %3$zd bytes available"
#, c-format
msgid "'%1$s' vanished unexpectedly"
msgstr ""
msgstr "'%1$s' vanished unexpectedly"
msgid ""
"'--copy-storage-synchronous-writes' requires one of '--copy-storage-all', '--"
@ -1508,7 +1508,7 @@ msgid "'return' member missing"
msgstr "'return' member missing"
msgid "'sheepdog' protocol is no longer supported by any hypervisor driver"
msgstr ""
msgstr "'sheepdog' protocol is no longer supported by any hypervisor driver"
#, c-format
msgid ""
@ -1914,11 +1914,11 @@ msgstr "ACPI requires UEFI on this architecture"
#, c-format
msgid "ACPI table type '%1$s' is not supported"
msgstr ""
msgstr "ACPI table type '%1$s' is not supported"
#, c-format
msgid "ACPI table type '%1$s' may only appear once"
msgstr ""
msgstr "ACPI table type '%1$s' may only appear once"
#, c-format
msgid "AES256CBC encryption invalid keylen=%1$zu"
@ -2035,10 +2035,10 @@ msgid "Add or remove vcpus"
msgstr "Add or remove vCPUs"
msgid "Add or update a throttling group."
msgstr ""
msgstr "Add or update a throttling group."
msgid "Add or updte a throttling group."
msgstr ""
msgstr "Add or update a throttling group."
msgid "Added"
msgstr "Added"
@ -2251,7 +2251,7 @@ msgid "Autostart"
msgstr "Autostart"
msgid "Autostart Once:"
msgstr ""
msgstr "Autostart Once:"
msgid "Autostart:"
msgstr "Autostart:"
@ -2767,7 +2767,7 @@ msgid "Can't create initial configuration"
msgstr "Can't create initial configuration"
msgid "Can't define NWFilter bindings in session mode"
msgstr ""
msgstr "Can't define NWFilter bindings in session mode"
msgid "Can't define NWFilters in session mode"
msgstr ""

View File

@ -18,7 +18,7 @@ msgstr ""
"Project-Id-Version: libvirt 6.0.0\n"
"Report-Msgid-Bugs-To: https://libvirt.org/bugs.html\n"
"POT-Creation-Date: 2025-03-25 10:52+0000\n"
"PO-Revision-Date: 2025-03-01 03:12+0000\n"
"PO-Revision-Date: 2025-03-30 07:26+0000\n"
"Last-Translator: 김인수 <simmon@nplob.com>\n"
"Language-Team: Korean <https://translate.fedoraproject.org/projects/libvirt/"
"libvirt/ko/>\n"
@ -27,7 +27,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 5.10.2\n"
"X-Generator: Weblate 5.10.4\n"
msgid ""
"\n"
@ -1253,7 +1253,7 @@ msgstr "'%1$s' 는 알맞는 도우미가 아닙니다"
#, c-format
msgid "'%1$s' is not a suitable qemu-rdp helper name"
msgstr ""
msgstr "'%1$s' 는 적합한 qemu-rdp helper 이름이 없습니다"
#, c-format
msgid "'%1$s' is not supported in this QEMU binary"
@ -1281,7 +1281,7 @@ msgstr "'%1$s' 시작은(%2$llu에서) 사용 가능한 %3$zd 바이트만을
#, c-format
msgid "'%1$s' vanished unexpectedly"
msgstr ""
msgstr "'%1$s' 가 예상치 못하게 사라졌습니다"
msgid ""
"'--copy-storage-synchronous-writes' requires one of '--copy-storage-all', '--"
@ -1485,6 +1485,8 @@ msgid ""
"'reconnect' attribute is not supported when source mode='server' for "
"<interface type='vhostuser'>"
msgstr ""
"'reconnect' 속성은 <interface type='vhostuser'> 를 위한 source mode='server' "
"일 때에 지원되지 않습니다"
msgid ""
"'restrictive' mode is required in memnode element when mode is 'restrictive' "
@ -1501,10 +1503,11 @@ msgstr ""
"니다"
msgid "'return' member missing"
msgstr ""
msgstr "'return' 구성이 누락됨"
msgid "'sheepdog' protocol is no longer supported by any hypervisor driver"
msgstr ""
msgstr "'sheepdog' 통신규약은 모든 하이퍼바이저 드라이버에서 더 이상 지원되지 "
"않습니다"
#, c-format
msgid ""
@ -1922,11 +1925,11 @@ msgstr "ACPI는 이 구조(아키텍쳐)에서 UEFI가 필요합니다"
#, c-format
msgid "ACPI table type '%1$s' is not supported"
msgstr ""
msgstr "ACPI 테이블 유형 '%1$s'는 지원되지 않습니다"
#, c-format
msgid "ACPI table type '%1$s' may only appear once"
msgstr ""
msgstr "ACPI 테이블 유형 '%1$s' 는 한 번만 나타날 것입니다"
#, c-format
msgid "AES256CBC encryption invalid keylen=%1$zu"
@ -2045,10 +2048,10 @@ msgid "Add or remove vcpus"
msgstr "vcpus를 추가하거나 제거하기"
msgid "Add or update a throttling group."
msgstr ""
msgstr "제한 그룹을 추가하거나 최신화합니다."
msgid "Add or updte a throttling group."
msgstr ""
msgstr "제한 그룹을 추가하거나 최신화합니다."
msgid "Added"
msgstr "추가됨"
@ -2262,7 +2265,7 @@ msgid "Autostart"
msgstr "자동 시작"
msgid "Autostart Once:"
msgstr ""
msgstr "한 번 자동시작:"
msgid "Autostart:"
msgstr "Autostart:"
@ -3030,7 +3033,7 @@ msgid "Cannot create macvlan devices on this platform"
msgstr "이 기술환경에서 macvlan 장치를 생성 할 수 없음"
msgid "Cannot create monitor FIFO"
msgstr ""
msgstr "monitor FIFO를 생성 할 수 없습니다"
#, c-format
msgid "Cannot create resctrl directory '%1$s'"

197
po/uk.po
View File

@ -16,7 +16,7 @@ msgstr ""
"Project-Id-Version: libvirt 6.0.0\n"
"Report-Msgid-Bugs-To: https://libvirt.org/bugs.html\n"
"POT-Creation-Date: 2025-03-25 10:52+0000\n"
"PO-Revision-Date: 2025-02-25 14:49+0000\n"
"PO-Revision-Date: 2025-04-03 11:20+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://translate.fedoraproject.org/projects/"
"libvirt/libvirt/uk/>\n"
@ -26,7 +26,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 5.10\n"
"X-Generator: Weblate 5.10.4\n"
msgid ""
"\n"
@ -1306,7 +1306,7 @@ msgstr "«%1$s» не є придатним допоміжним засобом
#, c-format
msgid "'%1$s' is not a suitable qemu-rdp helper name"
msgstr ""
msgstr "«%1$s» не є придатним до використання допоміжним засобом qemu-rdp"
#, c-format
msgid "'%1$s' is not supported in this QEMU binary"
@ -1336,7 +1336,7 @@ msgstr "«%1$s» починаючи з %2$llu має лише %3$zd доступ
#, c-format
msgid "'%1$s' vanished unexpectedly"
msgstr ""
msgstr "«%1$s» неочікувано зник"
msgid ""
"'--copy-storage-synchronous-writes' requires one of '--copy-storage-all', '--"
@ -1574,6 +1574,8 @@ msgstr "пропущено член 'return'"
msgid "'sheepdog' protocol is no longer supported by any hypervisor driver"
msgstr ""
"Підтримки протоколу «sheepdog» більше не передбачено у жодному драйвері "
"гіпервізора"
#, c-format
msgid ""
@ -1994,11 +1996,11 @@ msgstr "На цій архітектурі ACPI потребує UEFI"
#, c-format
msgid "ACPI table type '%1$s' is not supported"
msgstr ""
msgstr "Підтримки таблиць ACPI типу «%1$s» не передбачено"
#, c-format
msgid "ACPI table type '%1$s' may only appear once"
msgstr ""
msgstr "Таблиця ACPI типу «%1$s» може з'являтися лише раз"
#, c-format
msgid "AES256CBC encryption invalid keylen=%1$zu"
@ -2120,10 +2122,10 @@ msgid "Add or remove vcpus"
msgstr "Додати або вилучити віртуальні процесори"
msgid "Add or update a throttling group."
msgstr ""
msgstr "Додати або оновити групу регулювання."
msgid "Add or updte a throttling group."
msgstr ""
msgstr "Додати або оновити групу регулювання."
msgid "Added"
msgstr "Додано"
@ -2348,7 +2350,7 @@ msgid "Autostart"
msgstr "Автозапуск"
msgid "Autostart Once:"
msgstr ""
msgstr "Одноразовий автозапуск:"
msgid "Autostart:"
msgstr "Автозапуск:"
@ -3261,6 +3263,8 @@ msgstr "Не вдалося знайти «iothread»: %1$u"
#, c-format
msgid "Cannot find CPU model with PVR 0x%1$03llx, vendor id 0x%2$02llx"
msgstr ""
"Не вдалося знайти модель процесора з PVR 0x%1$03llx, ідентифікатор виробника "
"0x%2$02llx"
#, c-format
msgid "Cannot find CPU model with PVR 0x%1$08x"
@ -5760,7 +5764,7 @@ msgid "Delete a given vol."
msgstr "Вилучити вказаний том."
msgid "Delete a throttling group."
msgstr ""
msgstr "Вилучити групу регулювання."
msgid "Delete an IOThread from the guest domain."
msgstr "Вилучити потік введення-виведення з гостьового домену."
@ -6234,7 +6238,7 @@ msgstr "Домен «%1$s» позначений як домен з автоза
#, c-format
msgid "Domain '%1$s' marked as autostarted on next boot\n"
msgstr ""
msgstr "Домен «%1$s» позначено на автозапуск при наступному завантаженні\n"
#, c-format
msgid "Domain '%1$s' resumed\n"
@ -6266,7 +6270,7 @@ msgstr "Домен «%1$s» не позначений як домен з авт
#, c-format
msgid "Domain '%1$s' unmarked as autostarted on next boot\n"
msgstr ""
msgstr "Позначення «%1$s» для автозапуску знято для наступного завантаження\n"
#, c-format
msgid "Domain '%1$s' was reset\n"
@ -7407,7 +7411,7 @@ msgstr "Не вдалося з'єднати сокет з «%1$s»"
#, c-format
msgid "Failed to connect to dbus-daemon: %1$s"
msgstr ""
msgstr "Не вдалося встановити з'єднання з dbus-daemon: %1$s"
msgid "Failed to connect to mon socket"
msgstr "Не вдалося встановити з'єднання з сокетом mon"
@ -7601,7 +7605,7 @@ msgstr "Не вдалося створити резервне сховище н
#, c-format
msgid "Failed to create rdp state dir %1$s"
msgstr ""
msgstr "Не вдалося створити каталог стану rdp %1$s"
msgid "Failed to create reboot thread, killing domain"
msgstr ""
@ -8378,6 +8382,7 @@ msgstr "Помилка позначення домену «%1$s» як доме
#, c-format
msgid "Failed to mark domain '%1$s' as autostarted on next boot"
msgstr ""
"Не вдалося позначити домен «%1$s» для автозапуску при наступному завантаженні"
#, c-format
msgid "Failed to mkdir %1$s"
@ -9348,6 +9353,8 @@ msgstr "Помилка зняття позначки домену «%1$s» як
#, c-format
msgid "Failed to unmark domain '%1$s' as autostarted on next boot"
msgstr ""
"Не вдалося зняти позначення домену «%1$s» для автозапуску при наступному "
"завантаженні"
#, c-format
msgid "Failed to unmarshall reply: %1$s"
@ -9738,7 +9745,7 @@ msgid "GNUTLS call error"
msgstr "помилка виклику GNUTLS"
msgid "Get a throttling group."
msgstr ""
msgstr "Отримати групу регулювання."
msgid "Get block device size info for a domain."
msgstr "Отримати дані щодо розміру блокового пристрою для домену."
@ -9817,7 +9824,7 @@ msgid "Get the CPU models for an arch."
msgstr "Отримати дані щодо моделей процесорів для архітектури."
msgid "Get the CPU models reported by the hypervisor."
msgstr ""
msgstr "Отримати моделі процесорів, про які повідомляє гіпервізор."
msgid "Get the launch security parameters for a guest domain"
msgstr "Отримати параметри безпеки запуску для гостьового домену"
@ -9840,7 +9847,7 @@ msgid "Get the summary of block devices for a domain."
msgstr "Отримати резюме щодо блокових пристроїв для домену."
msgid "Get the summary of throttle groups for a domain."
msgstr ""
msgstr "Отримати резюме груп регулювання для домену."
msgid "Get the summary of virtual interfaces for a domain."
msgstr "Отримати резюме щодо віртуальних інтерфейсів домену."
@ -10101,7 +10108,7 @@ msgstr ""
"машини «%2$s»"
msgid "Hypervisor reported CPU models"
msgstr ""
msgstr "Гіпервізор повідомив про моделі процесорів"
msgid "I/O Error"
msgstr "Помилка в/в"
@ -10226,6 +10233,8 @@ msgid ""
"IOThread mapping for virtio-scsi controllers is not available with this QEMU "
"binary"
msgstr ""
"Прив'язка IOThread для контролерів virtio-scsi є недоступною для цього "
"виконуваного файла QEMU"
msgid "IOThread to be used by supported device"
msgstr "IOThread, який буде використано підтримуваним пристроєм"
@ -10879,7 +10888,7 @@ msgstr "Некоректний тип драйвера: %1$d"
#, c-format
msgid "Invalid dump_image_format '%1$s'"
msgstr ""
msgstr "Некоректне значення dump_image_format «%1$s»"
msgid "Invalid duration"
msgstr "Неприпустиме значення тривалості"
@ -10961,7 +10970,7 @@ msgstr "Некоректний метод перевірки ключів осн
#, c-format
msgid "Invalid host_data provided. Expected '%1$ld' bytes"
msgstr ""
msgstr "Надано некоректне значення host_data. Мало бути «%1$ld» байтів"
#, c-format
msgid "Invalid hostdev protocol '%1$s'"
@ -10969,7 +10978,7 @@ msgstr "Некоректний протокол пристрою основно
#, c-format
msgid "Invalid image_format '%1$s'"
msgstr ""
msgstr "Некоректне значення image_format «%1$s»"
#, c-format
msgid "Invalid integer value '%1$s' in file '%2$s'"
@ -11195,7 +11204,7 @@ msgstr "Некоректний засіб спостереження resctrl"
#, c-format
msgid "Invalid save_image_format '%1$s'"
msgstr ""
msgstr "Некоректне значення save_image_format «%1$s»"
msgid "Invalid secret"
msgstr "Некоректний ключ"
@ -11221,7 +11230,7 @@ msgstr "Некоректне значення для можливості pserie
#, c-format
msgid "Invalid snapshot_image_format '%1$s'"
msgstr ""
msgstr "Некоректне значення snapshot_image_format «%1$s»"
#, c-format
msgid "Invalid source mode: %1$s"
@ -11524,7 +11533,7 @@ msgid "Kernel image path in this domain is not defined"
msgstr "Шлях до образу ядра у цьому домені не визначено"
msgid "Kernel image path is not defined. With sev_snp=on, pass an igvm path"
msgstr ""
msgstr "Шлях до образу ядра не визначено. З sev_snp=on передано шлях igvm"
msgid "Key file path must be provided for private key authentication"
msgstr ""
@ -12367,7 +12376,7 @@ msgstr "Не вказано типу можливості"
#, c-format
msgid "Missing certificate file '%1$s'"
msgstr ""
msgstr "Не вистачає файла сертифіката «%1$s»"
#, c-format
msgid "Missing check/@partial in CPU model %1$s"
@ -12448,7 +12457,7 @@ msgstr "У документі JSON не вистачає даних keepaliveInt
#, c-format
msgid "Missing key file '%1$s'"
msgstr ""
msgstr "Не вистачає файла ключа «%1$s»"
msgid "Missing listen element"
msgstr "Пропущено елемент listen"
@ -12633,7 +12642,7 @@ msgid "Missing ownerUUID data in JSON document"
msgstr "У документі JSON не вистачає даних щодо UUID власника (ownerUUID)"
msgid "Missing password"
msgstr ""
msgstr "Не вистачає пароля"
msgid "Missing path or lockspace for lease resource"
msgstr "Не вистачає шляху або простору блокування для ресурсу надання"
@ -13869,7 +13878,7 @@ msgid "Only VNC supported"
msgstr "Передбачено підтримку лише VNC"
msgid "Only a single ACPI table is supported"
msgstr ""
msgstr "Передбачено підтримку лише єдиної таблиці ACPI"
msgid "Only a single IDE controller is supported for this machine type"
msgstr "Для цього типу архітектури передбачено лише один контролер IDE"
@ -14329,6 +14338,8 @@ msgstr "Номер паралельного порту, %1$d, не лежить
msgid "Parallel save is only supported with the 'sparse' save image format"
msgstr ""
"Підтримку паралельного збереження передбачено лише для формату образів "
"збереження «sparse»"
#, c-format
msgid "Parameter '%1$s' is not a string"
@ -14707,6 +14718,8 @@ msgstr "на сервері NBD QEMU не передбачено підтрим
#, c-format
msgid "QEMU agent command '%1$s' returned neither error nor success"
msgstr ""
"Команда агента QEMU «%1$s» не повернула ні повідомлення про помилку, ні "
"повідомлення про успіх"
#, c-format
msgid "QEMU binary %1$s is not executable"
@ -14857,13 +14870,13 @@ msgstr ""
"розширених можливостей і створення смуг"
msgid "RDP doesn't support 'multiUser'"
msgstr ""
msgstr "У RDP не передбачено підтримки «multiUser»"
msgid "RDP doesn't support 'replaceUser'"
msgstr ""
msgstr "У RDP не передбачено підтримки «replaceUser»"
msgid "RDP password expiration isn't supported"
msgstr ""
msgstr "Підтримки завершення строку дії пароля RDP не передбачено"
msgid "RDT Memory Bandwidth allocation unsupported"
msgstr "Підтримки розподілу ширини каналу пам'яті RDT не передбачено"
@ -17778,6 +17791,8 @@ msgid ""
"The 'dev' attribute of the <source> element can only be used with "
"<interface> type='user' or type='vhostuser' if the <backend> type='passt'"
msgstr ""
"Атрибут «dev» елемента <source> можна використовувати лише з <interface> "
"type='user' або type='vhostuser', якщо для <backend> type='passt'"
#, c-format
msgid ""
@ -18355,10 +18370,10 @@ msgid "Thread(s) per core:"
msgstr "Потоків на ядро:"
msgid "Throttle group deleted successfully\n"
msgstr ""
msgstr "Групу регулювання успішно вилучено\n"
msgid "Throttle group set successfully\n"
msgstr ""
msgstr "Групу регулювання успішно встановлено\n"
#, c-format
msgid "Time '%1$lld' is too big for guest agent"
@ -20236,7 +20251,7 @@ msgstr "Не вдалося прочитати файл pid «%1$s»"
#, c-format
msgid "Unable to read qemu-rdp pidfile '%1$s'"
msgstr ""
msgstr "Не вдалося прочитати файл PID qemu-rdp «%1$s»"
#, c-format
msgid "Unable to read slirp pidfile '%1$s'"
@ -20650,7 +20665,7 @@ msgid "Unable to set thread local variable"
msgstr "Не вдалося встановити локальний змінну потоку виконання"
msgid "Unable to set throttle group"
msgstr ""
msgstr "Не вдалося встановити групу регулювання"
#, c-format
msgid "Unable to set vlan configuration on port %1$s: %2$s"
@ -21740,7 +21755,7 @@ msgid "Unsupported object type %1$d"
msgstr "Підтримки типів об'єктів %1$d не передбачено"
msgid "Unsupported qemu-rdp listen type"
msgstr ""
msgstr "Непідтримуваний тип очікування qemu-rdp"
msgid "Unsupported resctrl monitor type"
msgstr "Непідтримуваний тип монітора resctrl"
@ -23177,11 +23192,15 @@ msgstr "блок"
msgid ""
"block 'iotune' can't be used together with 'throttlefilters' for disk '%1$s'"
msgstr ""
"блок «iotune» не можна використовувати разом із «throttlefilters» для диска "
"«%1$s»"
#, c-format
msgid ""
"block 'throttlefilters' can't be used together with 'iotune' for disk '%1$s'"
msgstr ""
"блок «throttlefilters» не можна використовувати разом із «iotune» для диска "
"«%1$s»"
#, c-format
msgid "block I/O throttle limit must be no more than %1$llu using QEMU"
@ -23567,7 +23586,7 @@ msgid "can't manipulate inactive snapshots of disk '%1$s'"
msgstr "неможлива робота із неактивними знімками диска «%1$s»"
msgid "can't open log context"
msgstr ""
msgstr "не вдалося відкрити контекст журналу"
#, c-format
msgid "can't open session to the domain with id %1$d"
@ -23812,7 +23831,7 @@ msgid "cannot change persistent config of a transient network"
msgstr "не можна змінювати сталі налаштування тимчасової мережі"
msgid "cannot change port settings on rdp graphics"
msgstr ""
msgstr "не вдалося змінити параметри порту для графіки rdp"
msgid "cannot change port settings on spice graphics"
msgstr "не вдалося змінити параметри порту графічної системи SPICE"
@ -25172,7 +25191,7 @@ msgid "cd: %1$s: %2$s"
msgstr "cd: %1$s: %2$s"
msgid "cdrom device with throttle filters isn't supported"
msgstr ""
msgstr "підтримки пристрою cdrom з фільтрами регулювання не передбачено"
msgid "cdrom device with virtio bus isn't supported"
msgstr "підтримки пристроїв cdrom з каналом virtio не передбачено"
@ -25466,7 +25485,7 @@ msgstr ""
"нульовим виявленням"
msgid "comma separated list of throttle groups to be applied"
msgstr ""
msgstr "список відокремлених комами груп регулювання, які буде застосовано"
msgid "command"
msgstr "команда"
@ -25683,7 +25702,7 @@ msgid "control domain's outgoing traffics"
msgstr "керування вихідними даними домену"
msgid "control next boot state"
msgstr ""
msgstr "керувати станом наступного завантаження"
msgid "control or query domain emulator affinity"
msgstr "вказати або визначити прив'язку у емуляторі домену"
@ -25699,6 +25718,8 @@ msgid ""
"controller driver 'iothread' attribute can't be used together with "
"'iothreads' subelement"
msgstr ""
"атрибут «iothread» драйвера контролера не можна використовувати з разом із "
"піделементом «iothreads»"
#, c-format
msgid "controller index='%1$d' already exists"
@ -26411,6 +26432,8 @@ msgid ""
"dbus-daemon died and reported:\n"
"%1$s"
msgstr ""
"dbus-daemon завершив роботу і повідомив:\n"
"%1$s"
msgid "default"
msgstr "типовий"
@ -27510,11 +27533,11 @@ msgstr "дублювання домену «%1$s»"
#, c-format
msgid "duplicate filter name '%1$s' found"
msgstr ""
msgstr "виявлено дублювання назви фільтра «%1$s»"
#, c-format
msgid "duplicate group name '%1$s' found"
msgstr ""
msgstr "виявлено дублювання назви групи «%1$s»"
#, c-format
msgid "duplicate iothread id '%1$u' found"
@ -28031,6 +28054,10 @@ msgid ""
"oldMAC: %3$s\n"
"newMAC: %4$s\n"
msgstr ""
"подія «nic-mac-change» для домену «%1$s»:\n"
"альтернатива: %2$s\n"
"стара-MAC: %3$s\n"
"нова-MAC: %4$s\n"
#, c-format
msgid "event 'rtc-change' for domain '%1$s': %2$lld\n"
@ -28736,7 +28763,7 @@ msgid "failed to get hostname"
msgstr "помилка отримання назви вузла гіпервізора"
msgid "failed to get hypervisor CPU model names"
msgstr ""
msgstr "не вдалося отримати назви моделей процесорів гіпервізора"
msgid "failed to get hypervisor type"
msgstr "помилка отримання типа гіпервізора"
@ -29307,7 +29334,7 @@ msgid "failed to seek in log file %1$s"
msgstr "не вдалося виконати позиціювання у файлі журналу %1$s"
msgid "failed to seek on file descriptor"
msgstr ""
msgstr "не вдалося виконати позиціювання на дескрипторі файла"
#, c-format
msgid "failed to seek to end of %1$s"
@ -29884,7 +29911,7 @@ msgid "format of the destination file"
msgstr "формат файла призначення"
msgid "format of the save image file"
msgstr ""
msgstr "формат збереження файла образу"
#, c-format
msgid "formatter for %1$s %2$s reported error"
@ -30142,26 +30169,28 @@ msgstr ""
"вистачає: %1$s"
msgid "guest agent command failed"
msgstr ""
msgstr "помилка команди агента гостьової системи"
#, c-format
msgid "guest agent command failed: %1$s"
msgstr ""
msgstr "помилка команди агента гостьової системи: %1$s"
msgid "guest agent command timed out"
msgstr ""
msgstr "перевищено час очікування на виконання команди агента гостьової системи"
#, c-format
msgid "guest agent command timed out: %1$s"
msgstr ""
"перевищено час очікування на виконання команди агента гостьової системи: %1$s"
#, c-format
msgid "guest agent didn't respond to command within '%1$d' seconds"
msgstr ""
msgstr "агент гостьової системи не відповів на команду за «%1$d» секунд"
#, c-format
msgid "guest agent didn't respond to synchronization within '%1$d' seconds"
msgstr ""
"агент гостьової системи не відповів на синхронізацію протягом %1$d секунд"
msgid "guest agent replied with wrong id to guest-sync command"
msgstr ""
@ -30632,7 +30661,7 @@ msgid "inbound rate larger than maximum %1$u"
msgstr "вхідна швидкість перевищує максимальну, %1$u"
msgid "include all CPU models known to the hypervisor for the architecture"
msgstr ""
msgstr "включити усі моделі процесорів, відомі гіпервізору для архітектури"
msgid "include backup size estimate in XML dump"
msgstr "включити оцінку розміру резервної копії до дампу XML"
@ -32066,7 +32095,7 @@ msgid "list all domain blocks"
msgstr "показати список всіх блоків"
msgid "list all domain throttlegroups."
msgstr ""
msgstr "вивести усі групи регулювання домену."
msgid "list all domain virtual interfaces"
msgstr "список всіх віртуальних інтерфейсів домену"
@ -32694,6 +32723,7 @@ msgstr "помилкове форматування слоту у даних щ
msgid "managed save cannot be requested for transient domains"
msgstr ""
"запит щодо керованого збереження не можна надсилати для тимчасових доменів"
msgid "managed save of a domain state"
msgstr "кероване збереження стану домену"
@ -33617,7 +33647,7 @@ msgid "missing gluster volume name for path '%1$s'"
msgstr "не вказано назви тому gluster для шляху «%1$s»"
msgid "missing group name"
msgstr ""
msgstr "не вистачає назви групи"
#, c-format
msgid "missing group_device value for '%1$s'"
@ -33712,7 +33742,7 @@ msgid "missing listen element"
msgstr "пропущено елемент listen"
msgid "missing listen element for VNC graphics"
msgstr ""
msgstr "пропущено елемент listen для графіки VNC"
msgid "missing listen element for spice graphics"
msgstr "пропущено елемент очікування (listen) для графіки spice"
@ -34790,7 +34820,7 @@ msgid "no CPUs given"
msgstr "не вказано процесори"
msgid "no D-Bus address"
msgstr ""
msgstr "немає адреси D-Bus"
msgid "no FLR, PM reset or bus reset available"
msgstr "немає FLR, доступне скидання PM чи шини"
@ -35465,9 +35495,13 @@ msgstr "numad є недоступним для цього вузла"
msgid "number of IO channels to use for parallel restore"
msgstr ""
"кількість каналів введення-виведення для використання при паралельному "
"відновленні"
msgid "number of IO channels to use for parallel save"
msgstr ""
"кількість каналів введення-виведення для використання при паралельному "
"збереженні"
msgid "number of bytes read:"
msgstr "кількість прочитаних байтів:"
@ -35498,7 +35532,7 @@ msgstr ""
"переходу до стану бездіяльності"
msgid "number of parallel save channels cannot be less than 1"
msgstr ""
msgstr "кількість каналів паралельного збереження не може бути меншою за 1"
msgid "number of read operations:"
msgstr "кількість дій з читання:"
@ -35653,6 +35687,8 @@ msgid ""
"only 1 graphics device of each type (sdl, vnc, spice, headless, dbus, rdp) "
"is supported"
msgstr ""
"передбачено підтримку лише 1 графічного пристрою кожного типу (sdl, vnc, "
"spice, headless, dbus, rdp)"
msgid "only JSON objects can be top level"
msgstr "на верхньому рівні можуть бути лише об'єкти JSON"
@ -36060,7 +36096,7 @@ msgstr "значення параметра %1$s є занадто велики
#, c-format
msgid "parameter '%1$s' is missing in reply of guest-get-load"
msgstr ""
msgstr "у відповіді guest-get-load не визначає параметра «%1$s»"
#, c-format
msgid "parameter '%1$s' not supported"
@ -36550,7 +36586,7 @@ msgid "preserve sparseness of volume"
msgstr "зберегти розрідженість тому"
msgid "preserve state before shutting down"
msgstr ""
msgstr "зберегти стан до вимикання"
msgid "pretty-print any JSON output"
msgstr "форматоване виведення для усіх виведених даних JSON"
@ -36739,7 +36775,7 @@ msgid "qemu agent didn't return an array of keys"
msgstr "Агентом qemu не повернуто масиву ключів"
msgid "qemu agent didn't return an array of loads"
msgstr ""
msgstr "агент qemu не повернув масиву навантажень"
#, c-format
msgid "qemu didn't report thread id for vcpu '%1$zu'"
@ -36815,18 +36851,23 @@ msgid ""
"qemu-rdp died and reported:\n"
"%1$s"
msgstr ""
"qemu-rdp завершив роботу і повернув:\n"
"%1$s"
msgid "qemu-rdp does not support multiple listens for one graphics device."
msgstr ""
"у qemu-rdp не передбачено підтримки декількох каналів очікування для одного "
"графічного пристрою."
msgid "qemu-rdp doesn't support the 'multiUser' attribute."
msgstr ""
msgstr "у qemu-rdp не передбачено підтримки атрибута «multiUser»."
msgid "qemu-rdp doesn't support the 'replaceUser' attribute."
msgstr ""
msgstr "у qemu-rdp не передбачено підтримки атрибута «replaceUser»."
msgid "qemu-rdp support requires a D-Bus bus graphics device."
msgstr ""
"для підтримки qemu-rdp потрібен графічний пристрій із підтримкою шини D-Bus."
#, c-format
msgid "qom-get invalid object property type %1$d"
@ -37086,11 +37127,11 @@ msgid "rawio is only supported for scsi host device"
msgstr "підтримку rawio передбачено лише для пристроїв scsi основної системи"
msgid "rdp"
msgstr ""
msgstr "rdp"
#, c-format
msgid "rdp_tls_x509_cert_dir directory '%1$s' does not exist"
msgstr ""
msgstr "каталогу rdp_tls_x509_cert_dir «%1$s» не існує"
msgid "re-initialize NVRAM from its pristine template"
msgstr "повторно ініціалізувати NVRAM з її початкового шаблона"
@ -37386,7 +37427,7 @@ msgid "report interface information"
msgstr "вивести звіт щодо інтерфейсу"
msgid "report load averages information"
msgstr ""
msgstr "повідомити дані щодо середнього навантаження"
msgid "report only stats that are accessible instantly"
msgstr "звітувати лише про статистичні дані, які негайно доступні"
@ -37713,6 +37754,8 @@ msgstr "збереження скасовано"
#, c-format
msgid "save image format %1$s is not supported by this QEMU binary"
msgstr ""
"підтримки формату образу збереження «%1$s» у цьому виконуваному файлі QEMU "
"не передбачено"
msgid "save image is incomplete"
msgstr "збережений образ є неповним"
@ -38119,10 +38162,10 @@ msgid "shares '%1$llu' must be in range [%2$llu, %3$llu]"
msgstr "shares «%1$llu» має перебувати у діапазоні [%2$llu, %3$llu]"
msgid "shim is not supported by this QEMU binary"
msgstr ""
msgstr "підтримки shim у цьому виконуваному файлі QEMU не передбачено"
msgid "shim only allowed with kernel option"
msgstr ""
msgstr "shim можна використовувати лише з параметром ядра"
#, c-format
msgid ""
@ -38351,6 +38394,8 @@ msgid ""
"source disk for '%1$s' is not a regular file, reverting to snapshot is not "
"supported"
msgstr ""
"початковий диск для «%1$s» не є звичайним файлом, повернення до знімка не "
"передбачено"
#, c-format
msgid ""
@ -38513,7 +38558,7 @@ msgid "status mismatch in event (actual 0x%1$x, expected 0x%2$x)"
msgstr "невідповідність станів у події (маємо 0x%1$x, мало бути 0x%2$x)"
msgid "stop the daemon"
msgstr ""
msgstr "зупинити фонову службу"
msgid "stopped, with no saved guests"
msgstr "зупинено без збережених гостьових систем"
@ -39242,18 +39287,18 @@ msgstr "порогове значення як масштабоване числ
#, c-format
msgid "throttle group '%1$s' is still being used by disk %2$s"
msgstr ""
msgstr "група регулювання «%1$s» усе ще використовує диск %2$s"
#, c-format
msgid "throttle group '%1$s' not found"
msgstr ""
msgstr "групи регулювання «%1$s» не знайдено"
#, c-format
msgid "throttle group field '%1$s' must be an integer"
msgstr ""
msgstr "поле групи регулювання «%1$s» має бути цілим"
msgid "throttle group name"
msgstr ""
msgstr "назва групи регулювання"
msgid "time to set"
msgstr "час, який слід встановити"
@ -40558,7 +40603,7 @@ msgstr "неочікуваний тип файлової системи %1$d"
#, c-format
msgid "unexpected graphics type '%1$d'"
msgstr ""
msgstr "неочікуваний тип графіки «%1$d»"
#, c-format
msgid "unexpected host-model CPU for %1$s architecture"
@ -40851,15 +40896,15 @@ msgstr "невідомий тип розпізнавання %1$s"
#, c-format
msgid "unknown auto_shutdown_poweroff '%1$s'"
msgstr ""
msgstr "невідоме значення auto_shutdown_poweroff «%1$s»"
#, c-format
msgid "unknown auto_shutdown_try_save '%1$s'"
msgstr ""
msgstr "невідоме значення auto_shutdown_try_save «%1$s»"
#, c-format
msgid "unknown auto_shutdown_try_shutdown '%1$s'"
msgstr ""
msgstr "невідоме значення auto_shutdown_try_shutdown «%1$s»"
#, c-format
msgid "unknown backend source type '%1$s' for external TPM"
@ -41439,7 +41484,7 @@ msgid "unsupported disk driver %1$s"
msgstr "непідтримуваний драйвер диска, %1$s"
msgid "unsupported disk protocol"
msgstr ""
msgstr "непідтримуваний протокол роботи з диском"
#, c-format
msgid "unsupported disk snapshot type '%1$s'"

View File

@ -68,6 +68,7 @@ virCHDomainObjPrivateFree(void *data)
virBitmapFree(priv->autoCpuset);
virBitmapFree(priv->autoNodeset);
virCgroupFree(priv->cgroup);
g_free(priv->pidfile);
g_free(priv);
}

View File

@ -36,6 +36,7 @@ struct _virCHDomainObjPrivate {
virBitmap *autoCpuset;
virBitmap *autoNodeset;
virCgroup *cgroup;
char *pidfile;
};
#define CH_DOMAIN_PRIVATE(vm) \

View File

@ -54,10 +54,10 @@ static int
virCHEventStopProcess(virDomainObj *vm,
virDomainShutoffReason reason)
{
virCHDriver *driver = ((virCHDomainObjPrivate *)vm->privateData)->driver;
virCHDriver *driver = CH_DOMAIN_PRIVATE(vm)->driver;
virObjectLock(vm);
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY))
if (virDomainObjBeginJob(vm, VIR_JOB_DESTROY))
return -1;
virCHProcessStop(driver, vm, reason);
virDomainObjEndJob(vm);
@ -97,7 +97,6 @@ virCHProcessEvent(virCHMonitor *mon,
case VIR_CH_EVENT_VM_BOOTING:
case VIR_CH_EVENT_VM_BOOTED:
case VIR_CH_EVENT_VM_REBOOTING:
case VIR_CH_EVENT_VM_REBOOTED:
case VIR_CH_EVENT_VM_PAUSING:
case VIR_CH_EVENT_VM_PAUSED:
case VIR_CH_EVENT_VM_RESUMING:
@ -109,15 +108,16 @@ virCHProcessEvent(virCHMonitor *mon,
case VIR_CH_EVENT_VM_DELETED:
break;
case VIR_CH_EVENT_VMM_SHUTDOWN:
case VIR_CH_EVENT_VM_SHUTDOWN:
if (virCHEventStopProcess(vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN)) {
VIR_WARN("Failed to mark the VM(%s) as SHUTDOWN!",
vm->def->name);
ret = -1;
}
break;
case VIR_CH_EVENT_VM_SHUTDOWN:
case VIR_CH_EVENT_VM_REBOOTED:
virObjectLock(vm);
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
virCHProcessUpdateInfo(vm);
virObjectUnlock(vm);
break;
case VIR_CH_EVENT_LAST:
@ -297,7 +297,7 @@ int
virCHStartEventHandler(virCHMonitor *mon)
{
g_autofree char *name = NULL;
name = g_strdup_printf("ch-evt-%d", mon->pid);
name = g_strdup_printf("ch-evt-%d", mon->vm->pid);
virObjectRef(mon);
if (virThreadCreateFull(&mon->event_handler_thread,

View File

@ -27,6 +27,7 @@
#include "datatypes.h"
#include "ch_conf.h"
#include "ch_domain.h"
#include "ch_events.h"
#include "ch_interface.h"
#include "ch_monitor.h"
@ -37,6 +38,7 @@
#include "virfile.h"
#include "virjson.h"
#include "virlog.h"
#include "virpidfile.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_CH
@ -154,7 +156,7 @@ virCHMonitorBuildPayloadJson(virJSONValue *content, virDomainDef *vmdef)
buf = g_base64_decode(vmdef->sec->data.sev_snp.host_data, &len);
if (len != host_data_len) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid host_data provided. Expected '%1$ld' bytes"),
_("Invalid host_data provided. Expected '%1$zu' bytes"),
host_data_len);
return -1;
}
@ -582,10 +584,12 @@ chMonitorCreateSocket(const char *socket_path)
virCHMonitor *
virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg, int logfile)
{
virCHDomainObjPrivate *priv = vm->privateData;
g_autoptr(virCHMonitor) mon = NULL;
g_autoptr(virCommand) cmd = NULL;
int socket_fd = 0;
int event_monitor_fd;
int rv;
if (virCHMonitorInitialize() < 0)
return NULL;
@ -644,6 +648,7 @@ virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg, int logfile)
virCommandSetErrorFD(cmd, &logfile);
virCommandNonblockingFDs(cmd);
virCommandSetUmask(cmd, 0x002);
socket_fd = chMonitorCreateSocket(mon->socketpath);
if (socket_fd < 0) {
virReportSystemError(errno,
@ -655,13 +660,26 @@ virCHMonitorNew(virDomainObj *vm, virCHDriverConfig *cfg, int logfile)
virCommandAddArg(cmd, "--api-socket");
virCommandAddArgFormat(cmd, "fd=%d", socket_fd);
virCommandPassFD(cmd, socket_fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
virCommandAddArg(cmd, "--event-monitor");
virCommandAddArgFormat(cmd, "path=%s", mon->eventmonitorpath);
virCommandSetPidFile(cmd, priv->pidfile);
virCommandDaemonize(cmd);
/* launch Cloud-Hypervisor socket */
if (virCommandRunAsync(cmd, &mon->pid) < 0)
if (virCommandRun(cmd, NULL) < 0) {
VIR_DEBUG("CH vm=%p name=%s failed to spawn",
vm, vm->def->name);
return NULL;
}
if ((rv = virPidFileReadPath(priv->pidfile, &vm->pid)) < 0) {
virReportSystemError(-rv,
_("Domain %1$s didn't show up"),
vm->def->name);
return NULL;
}
VIR_DEBUG("CH vm=%p name=%s running with pid=%lld",
vm, vm->def->name, (long long)vm->pid);
/* open the reader end of fifo before start Event Handler */
while ((event_monitor_fd = open(mon->eventmonitorpath, O_RDONLY)) < 0) {
@ -709,12 +727,6 @@ void virCHMonitorClose(virCHMonitor *mon)
if (!mon)
return;
if (mon->pid > 0) {
/* try cleaning up the Cloud-Hypervisor process */
virProcessAbort(mon->pid);
mon->pid = 0;
}
if (mon->handle)
curl_easy_cleanup(mon->handle);
@ -1127,7 +1139,7 @@ virCHMonitorBuildRestoreJson(virDomainDef *vmdef,
g_autoptr(virJSONValue) nets = virJSONValueNewArray();
for (i = 0; i < vmdef->nnets; i++) {
g_autoptr(virJSONValue) net_json = virJSONValueNewObject();
g_autofree char *id = g_strdup_printf("%s_%ld", CH_NET_ID_PREFIX, i);
g_autofree char *id = g_strdup_printf("%s_%zu", CH_NET_ID_PREFIX, i);
if (virJSONValueObjectAppendString(net_json, "id", id) < 0)
return -1;
if (virJSONValueObjectAppendNumberInt(net_json, "num_fds", vmdef->nets[i]->driver.virtio.queues))

View File

@ -108,8 +108,6 @@ struct _virCHMonitor {
size_t buf_fill_sz;
} event_buffer;
pid_t pid;
virDomainObj *vm;
size_t nthreads;

View File

@ -36,6 +36,7 @@
#include "virjson.h"
#include "virlog.h"
#include "virnuma.h"
#include "virpidfile.h"
#include "virstring.h"
#include "ch_interface.h"
#include "ch_hostdev.h"
@ -130,7 +131,7 @@ virCHProcessUpdateConsole(virDomainObj *vm,
virCHProcessUpdateConsoleDevice(vm, config, "serial");
}
static int
int
virCHProcessUpdateInfo(virDomainObj *vm)
{
g_autoptr(virJSONValue) info = NULL;
@ -429,8 +430,8 @@ virCHProcessSetupVcpus(virDomainObj *vm)
size_t i;
if ((vm->def->cputune.period || vm->def->cputune.quota) &&
!virCgroupHasController(((virCHDomainObjPrivate *) vm->privateData)->
cgroup, VIR_CGROUP_CONTROLLER_CPU)) {
!virCgroupHasController(CH_DOMAIN_PRIVATE(vm)->cgroup,
VIR_CGROUP_CONTROLLER_CPU)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("cgroup cpu is required for scheduler tuning"));
return -1;
@ -700,7 +701,7 @@ chProcessAddNetworkDevices(virCHDriver *driver,
VIR_DEBUG("payload sent with net-add request to CH = %s", payload);
virBufferAsprintf(&buf, "%s", virBufferCurrentContent(&http_headers));
virBufferAsprintf(&buf, "Content-Length: %ld\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "%s", payload);
payload_len = virBufferUse(&buf);
payload = virBufferContentAndReset(&buf);
@ -850,6 +851,21 @@ virCHProcessPrepareHost(virCHDriver *driver, virDomainObj *vm)
if (virCHHostdevPrepareDomainDevices(driver, vm->def, hostdev_flags) < 0)
return -1;
VIR_FREE(priv->pidfile);
if (!(priv->pidfile = virPidFileBuildPath(cfg->stateDir, vm->def->name))) {
virReportSystemError(errno, "%s",
_("Failed to build pidfile path."));
return -1;
}
if (unlink(priv->pidfile) < 0 &&
errno != ENOENT) {
virReportSystemError(errno,
_("Cannot remove stale PID file %1$s"),
priv->pidfile);
return -1;
}
/* Ensure no historical cgroup for this VM is lying around */
VIR_DEBUG("Ensuring no historical cgroup is lying around");
virDomainCgroupRemoveCgroup(vm, priv->cgroup, priv->machineName);
@ -941,7 +957,6 @@ virCHProcessStart(virCHDriver *driver,
}
}
vm->pid = priv->monitor->pid;
vm->def->id = vm->pid;
priv->machineName = virCHDomainGetMachineName(vm);
@ -1008,6 +1023,7 @@ virCHProcessStop(virCHDriver *driver,
virErrorPreserveLast(&orig_err);
if (priv->monitor) {
virProcessAbort(vm->pid);
g_clear_pointer(&priv->monitor, virCHMonitorClose);
}
@ -1035,6 +1051,15 @@ virCHProcessStop(virCHDriver *driver,
vm->def->id = -1;
g_clear_pointer(&priv->machineName, g_free);
if (priv->pidfile) {
if (unlink(priv->pidfile) < 0 &&
errno != ENOENT)
VIR_WARN("Failed to remove PID file for %s: %s",
vm->def->name, g_strerror(errno));
g_clear_pointer(&priv->pidfile, g_free);
}
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
virHostdevReAttachDomainDevices(driver->hostdevMgr, CH_DRIVER_NAME, def,
@ -1092,7 +1117,6 @@ virCHProcessStartRestore(virCHDriver *driver, virDomainObj *vm, const char *from
}
}
vm->pid = priv->monitor->pid;
vm->def->id = vm->pid;
priv->machineName = virCHDomainGetMachineName(vm);
@ -1106,7 +1130,7 @@ virCHProcessStartRestore(virCHDriver *driver, virDomainObj *vm, const char *from
virBufferAddLit(&http_headers, "Host: localhost\r\n");
virBufferAddLit(&http_headers, "Content-Type: application/json\r\n");
virBufferAsprintf(&buf, "%s", virBufferCurrentContent(&http_headers));
virBufferAsprintf(&buf, "Content-Length: %ld\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "%s", payload);
payload_len = virBufferUse(&buf);
payload = virBufferContentAndReset(&buf);

View File

@ -36,3 +36,5 @@ int virCHProcessSetupVcpu(virDomainObj *vm,
int virCHProcessStartRestore(virCHDriver *driver,
virDomainObj *vm,
const char *from);
int virCHProcessUpdateInfo(virDomainObj *vm);

View File

@ -228,7 +228,7 @@ virDomainBackupDefParseXML(xmlXPathContextPtr ctxt,
def->server = g_new0(virStorageNetHostDef, 1);
if (virDomainStorageNetworkParseHost(node, def->server) < 0)
if (virDomainStorageNetworkParseHost(node, def->server, true) < 0)
return NULL;
if (def->server->transport == VIR_STORAGE_NET_HOST_TRANS_RDMA) {
@ -388,6 +388,7 @@ virDomainBackupDefFormat(virBuffer *buf,
if (def->server->port)
virBufferAsprintf(&serverAttrBuf, " port='%u'", def->server->port);
virBufferEscapeString(&serverAttrBuf, " socket='%s'", def->server->socket);
virBufferEscapeString(&serverAttrBuf, " fdgroup='%s'", def->server->fdgroup);
}
virXMLFormatElement(&childBuf, "server", &serverAttrBuf, NULL);

View File

@ -6014,58 +6014,81 @@ virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node,
int
virDomainStorageNetworkParseHost(xmlNodePtr hostnode,
virStorageNetHostDef *host)
virStorageNetHostDef *host,
bool allow_fd)
{
int ret = -1;
g_autofree char *transport = NULL;
g_autofree char *port = NULL;
memset(host, 0, sizeof(*host));
g_autofree char *socket = NULL;
if (virXMLPropEnumDefault(hostnode, "transport",
virStorageNetHostTransportTypeFromString,
VIR_XML_PROP_NONE,
&host->transport,
VIR_STORAGE_NET_HOST_TRANS_TCP) < 0) {
goto cleanup;
}
VIR_STORAGE_NET_HOST_TRANS_TCP) < 0)
return -1;
host->socket = virXMLPropString(hostnode, "socket");
socket = virXMLPropString(hostnode, "socket");
if (host->transport == VIR_STORAGE_NET_HOST_TRANS_UNIX &&
host->socket == NULL) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing socket for unix transport"));
goto cleanup;
}
switch (host->transport) {
case VIR_STORAGE_NET_HOST_TRANS_UNIX:
if (!socket) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing socket for unix transport"));
return -1;
}
if (host->transport != VIR_STORAGE_NET_HOST_TRANS_UNIX &&
host->socket != NULL) {
virReportError(VIR_ERR_XML_ERROR,
_("transport '%1$s' does not support socket attribute"),
transport);
goto cleanup;
}
host->socket = g_steal_pointer(&socket);
break;
case VIR_STORAGE_NET_HOST_TRANS_TCP:
case VIR_STORAGE_NET_HOST_TRANS_RDMA: {
g_autofree char *portstr = NULL;
unsigned int port = 0;
if (socket) {
virReportError(VIR_ERR_XML_ERROR,
_("transport '%1$s' does not support socket attribute"),
virStorageNetHostTransportTypeToString(host->transport));
return -1;
}
if ((portstr = virXMLPropString(hostnode, "port")) &&
virStringParsePort(portstr, &port) < 0)
return -1;
if (host->transport != VIR_STORAGE_NET_HOST_TRANS_UNIX) {
if (!(host->name = virXMLPropString(hostnode, "name"))) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing name for host"));
goto cleanup;
return -1;
}
if ((port = virXMLPropString(hostnode, "port"))) {
if (virStringParsePort(port, &host->port) < 0)
goto cleanup;
host->port = port;
}
break;
case VIR_STORAGE_NET_HOST_TRANS_FD:
if (!allow_fd) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("transport 'fd' is now allowed"));
return -1;
}
if (socket) {
virReportError(VIR_ERR_XML_ERROR,
_("transport '%1$s' does not support socket attribute"),
virStorageNetHostTransportTypeToString(host->transport));
return -1;
}
if (!(host->fdgroup = virXMLPropStringRequired(hostnode, "fdgroup")))
return -1;
break;
case VIR_STORAGE_NET_HOST_TRANS_LAST:
break;
}
ret = 0;
cleanup:
if (ret < 0)
virStorageNetHostDefClear(host);
return ret;
return 0;
}
@ -6089,7 +6112,7 @@ virDomainStorageNetworkParseHosts(xmlNodePtr node,
*nhosts = nhostnodes;
for (i = 0; i < nhostnodes; i++) {
if (virDomainStorageNetworkParseHost(hostnodes[i], *hosts + i) < 0)
if (virDomainStorageNetworkParseHost(hostnodes[i], *hosts + i, false) < 0)
return -1;
}

View File

@ -4024,7 +4024,8 @@ virDomainDiskByTarget(virDomainDef *def,
void virDomainDiskInsert(virDomainDef *def, virDomainDiskDef *disk);
int virDomainStorageNetworkParseHost(xmlNodePtr hostnode,
virStorageNetHostDef *host);
virStorageNetHostDef *host,
bool allow_fd);
int virDomainDiskDefAssignAddress(virDomainXMLOption *xmlopt,
virDomainDiskDef *def,
const virDomainDef *vmdef);

View File

@ -562,7 +562,7 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
return -1;
}
if (src->dataFileStore->dataFileStore || src->backingStore) {
if (src->dataFileStore->dataFileStore || src->dataFileStore->backingStore) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("The <source> of <dataStore> can't have another nested <dataStore> or <backingStore> element"));
return -1;

View File

@ -90,6 +90,12 @@
<ref name="absFilePath"/>
</attribute>
</group>
<group>
<attribute name="transport">
<value>fd</value>
</attribute>
<attribute name="fdgroup"/>
</group>
</choice>
</element>
<ref name="backupDisksPull"/>

View File

@ -1409,6 +1409,8 @@ virStorageVolDefParse(virStoragePoolDef *pool,
"volume", &ctxt, "storagevol.rng", validate)))
return NULL;
flags &= ~VIR_VOL_XML_PARSE_VALIDATE;
return virStorageVolDefParseXML(pool, ctxt, flags);
}

View File

@ -97,6 +97,7 @@ VIR_ENUM_IMPL(virStorageNetHostTransport,
"tcp",
"unix",
"rdma",
"fd",
);
@ -141,17 +142,6 @@ virStorageSourceHasBacking(const virStorageSource *src)
}
void
virStorageNetHostDefClear(virStorageNetHostDef *def)
{
if (!def)
return;
VIR_FREE(def->name);
VIR_FREE(def->socket);
}
void
virStorageNetHostDefFree(size_t nhosts,
virStorageNetHostDef *hosts)
@ -161,8 +151,12 @@ virStorageNetHostDefFree(size_t nhosts,
if (!hosts)
return;
for (i = 0; i < nhosts; i++)
virStorageNetHostDefClear(&hosts[i]);
for (i = 0; i < nhosts; i++) {
g_free(hosts[i].name);
g_free(hosts[i].socket);
g_free(hosts[i].fdgroup);
g_free(hosts[i].qemu_fdname);
}
g_free(hosts);
}

View File

@ -141,6 +141,7 @@ typedef enum {
VIR_STORAGE_NET_HOST_TRANS_TCP,
VIR_STORAGE_NET_HOST_TRANS_UNIX,
VIR_STORAGE_NET_HOST_TRANS_RDMA,
VIR_STORAGE_NET_HOST_TRANS_FD,
VIR_STORAGE_NET_HOST_TRANS_LAST
} virStorageNetHostTransport;
@ -154,6 +155,9 @@ struct _virStorageNetHostDef {
unsigned int port;
virStorageNetHostTransport transport;
char *socket; /* path to unix socket */
char *fdgroup;
char *qemu_fdname; /* name used with 'getfd' to pass to qemu - internal */
};
@ -502,9 +506,6 @@ virSecurityDeviceLabelDef *
virStorageSourceGetSecurityLabelDef(virStorageSource *src,
const char *model);
void
virStorageNetHostDefClear(virStorageNetHostDef *def);
void
virStorageNetHostDefFree(size_t nhosts,
virStorageNetHostDef *hosts);

View File

@ -1,5 +1,7 @@
cpumap_data = [
'arm_a64fx.xml',
'arm_Ampere-1a.xml',
'arm_Ampere-1.xml',
'arm_cortex-a53.xml',
'arm_cortex-a57.xml',
'arm_cortex-a72.xml',

View File

@ -687,7 +687,9 @@ esxConnectToVCenter(esxPrivate *priv,
g_autofree char *url = NULL;
if (!hostSystemIPAddress &&
(!priv->parsedUri->path || STREQ(priv->parsedUri->path, "/"))) {
(!priv->parsedUri->path ||
STREQ(priv->parsedUri->path, "") ||
STREQ(priv->parsedUri->path, "/"))) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Path has to specify the datacenter and compute resource"));
return -1;
@ -799,6 +801,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
if (STRCASENEQ(conn->uri->scheme, "vpx") &&
STRNEQ(conn->uri->path, "") &&
STRNEQ(conn->uri->path, "/")) {
VIR_WARN("Ignoring unexpected path '%s' for non-vpx scheme '%s'",
conn->uri->path, conn->uri->scheme);
@ -4792,18 +4795,20 @@ esxConnectListAllDomains(virConnectPtr conn,
virtualMachine = virtualMachine->_next) {
g_autofree char *name = NULL;
if (needIdentity) {
if (esxVI_GetVirtualMachineIdentity(virtualMachine, &id,
&name, uuid) < 0) {
goto cleanup;
}
}
/* If the lookup of the required properties fails for some of the machines
* in the list it's preferrable to return the valid objects instead of
* failing outright */
if ((needIdentity && esxVI_GetVirtualMachineIdentity(virtualMachine, &id, &name, uuid) < 0) ||
(needPowerState && esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0)) {
if (needPowerState) {
if (esxVI_GetVirtualMachinePowerState(virtualMachine,
&powerState) < 0) {
/* Raise error only if we didn't successfuly fill any domain */
if (count == 0 && !virtualMachine->_next)
goto cleanup;
}
/* failure to fetch information of a single VM must not interrupt
* the lookup of the rest */
virResetLastError();
continue;
}
/* filter by active state */

View File

@ -410,17 +410,20 @@ virConnectGetMaxVcpus(virConnectPtr conn,
* Use of this API is strongly discouraged as the information provided
* is not guaranteed to be accurate on all hardware platforms.
*
* The mHZ value merely reflects the speed that the first CPU in the
* machine is currently running at. This speed may vary across CPUs
* and changes continually as the host OS throttles.
* The CPU frequency value (field 'mhz' in virNodeInfo) merely reflects the
* speed that the first CPU in the machine is currently running at. This speed
* may vary across CPUs and changes continually as the host OS throttles.
*
* The nodes/sockets/cores/threads data is potentially inaccurate as
* it assumes a symmetric installation. If one NUMA node has more
* sockets populated that another NUMA node this information will be
* wrong. It is also not able to report about CPU dies.
* The virNodeInfo structure is not extensible thus only supports global
* nodes/sockets/cores/threads (sockets/cores/threads is per NUMA node)
* topology information. If the host CPU has any further groupings (e.g.
* dies, clusters, etc) or the NUMA topology is non-symmetrical the structure
* can't faithfully represent the system. In such cases a fake topology
* (nodes = 1, sockets = 1, cores = number of host cpus, threads = 1) which
* only correctly represents the total host CPU count is reported.
*
* Applications are recommended to use the virConnectGetCapabilities()
* call instead, which provides all the information except CPU mHZ,
* call instead, which provides all the information except CPU frequency,
* in a more accurate representation.
*
* Returns 0 in case of success and -1 in case of failure.

View File

@ -1153,7 +1153,6 @@ virStorageFileFeatureTypeFromString;
virStorageFileFeatureTypeToString;
virStorageFileFormatTypeFromString;
virStorageFileFormatTypeToString;
virStorageNetHostDefClear;
virStorageNetHostDefCopy;
virStorageNetHostDefFree;
virStorageNetHostTransportTypeFromString;

View File

@ -582,6 +582,107 @@ libxlMakeDomBuildInfo(virDomainDef *def,
VIR_TRISTATE_SWITCH_ON);
#endif
#ifdef LIBXL_HAVE_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE
if (def->features[VIR_DOMAIN_FEATURE_HYPERV] != VIR_DOMAIN_HYPERV_MODE_NONE) {
libxl_bitmap_alloc(ctx, &b_info->u.hvm.viridian_enable,
LIBXL_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE_WIDTH);
switch ((virDomainHyperVMode) def->features[VIR_DOMAIN_FEATURE_HYPERV]) {
case VIR_DOMAIN_HYPERV_MODE_CUSTOM:
/* Base is required by Xen to enable any other flag */
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_BASE);
/* Enable crash ctl register by default to allow guest logs to reach Xen */
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_CRASH_CTL);
break;
case VIR_DOMAIN_HYPERV_MODE_PASSTHROUGH:
libxl_bitmap_set_any(&b_info->u.hvm.viridian_enable);
break;
case VIR_DOMAIN_HYPERV_MODE_NONE:
case VIR_DOMAIN_HYPERV_MODE_LAST:
default:
virReportEnumRangeError(virDomainHyperVMode,
def->features[VIR_DOMAIN_FEATURE_HYPERV]);
return -1;
}
for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
switch ((virDomainHyperv) i) {
case VIR_DOMAIN_HYPERV_VPINDEX:
case VIR_DOMAIN_HYPERV_RELAXED:
/* Already set by base flag */
break;
case VIR_DOMAIN_HYPERV_SYNIC:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_SYNIC);
}
break;
case VIR_DOMAIN_HYPERV_STIMER:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
/* STIMER implies synic and clock features */
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_STIMER);
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_SYNIC);
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_TIME_REF_COUNT);
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_REFERENCE_TSC);
}
break;
case VIR_DOMAIN_HYPERV_VAPIC:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_APIC_ASSIST);
}
break;
case VIR_DOMAIN_HYPERV_FREQUENCIES:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_FREQ);
}
break;
case VIR_DOMAIN_HYPERV_TLBFLUSH:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_HCALL_REMOTE_TLB_FLUSH);
}
break;
case VIR_DOMAIN_HYPERV_IPI:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
libxl_bitmap_set(&b_info->u.hvm.viridian_enable,
LIBXL_VIRIDIAN_ENLIGHTENMENT_HCALL_IPI);
}
break;
case VIR_DOMAIN_HYPERV_SPINLOCKS:
case VIR_DOMAIN_HYPERV_VENDOR_ID:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
const char *name = virDomainHypervTypeToString(i);
VIR_WARN("Hyper-v flag '%s' specified per-domain but is a global Xen setting and will be ignored.", name);
}
break;
case VIR_DOMAIN_HYPERV_RUNTIME:
case VIR_DOMAIN_HYPERV_RESET:
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
case VIR_DOMAIN_HYPERV_EVMCS:
case VIR_DOMAIN_HYPERV_AVIC:
case VIR_DOMAIN_HYPERV_EMSR_BITMAP:
case VIR_DOMAIN_HYPERV_XMM_INPUT:
if (def->hyperv_features[i] == VIR_TRISTATE_SWITCH_ON) {
const char *name = virDomainHypervTypeToString(i);
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Hyper-v enlightenment feature '%1$s' is not supported for Xen domains."), name);
}
break;
case VIR_DOMAIN_HYPERV_LAST:
break;
}
}
}
#endif
/* copy the table path to acpi_firmware */
if (def->os.nacpiTables)
b_info->u.hvm.acpi_firmware = g_strdup(def->os.acpiTables[0]->path);

View File

@ -27,7 +27,6 @@ qemu_driver_sources = [
'qemu_migration_params.c',
'qemu_monitor.c',
'qemu_monitor_json.c',
'qemu_monitor_text.c',
'qemu_namespace.c',
'qemu_nbdkit.c',
'qemu_passt.c',

View File

@ -87,6 +87,7 @@ qemuBackupPrepare(virDomainBackupDef *def)
break;
case VIR_STORAGE_NET_HOST_TRANS_RDMA:
case VIR_STORAGE_NET_HOST_TRANS_FD:
case VIR_STORAGE_NET_HOST_TRANS_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("unexpected transport in <domainbackup>"));
@ -760,6 +761,7 @@ qemuBackupBegin(virDomainObj *vm,
bool reuse = (flags & VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL);
int rc = 0;
int ret = -1;
g_autoptr(qemuFDPassDirect) fdpass = NULL;
virCheckFlags(VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL, -1);
@ -846,6 +848,29 @@ qemuBackupBegin(virDomainObj *vm,
priv->backup = g_steal_pointer(&def);
if (pull && priv->backup->server->fdgroup) {
virStorageSourceFDTuple *fdt = NULL;
VIR_AUTOCLOSE fdcopy = -1;
if (!(fdt = virHashLookup(priv->fds, priv->backup->server->fdgroup))) {
virReportError(VIR_ERR_INVALID_ARG,
_("file descriptor group '%1$s' was not associated with the domain"),
priv->backup->server->fdgroup);
goto endjob;
}
if (fdt->nfds != 1) {
virReportError(VIR_ERR_INVALID_ARG,
_("file descriptor group '%1$s' must contain only 1 file descriptor for NBD server"),
priv->backup->server->fdgroup);
goto endjob;
}
priv->backup->server->qemu_fdname = g_strdup("libvirt-backup-nbd");
fdcopy = dup(fdt->fds[0]);
fdpass = qemuFDPassDirectNew(priv->backup->server->qemu_fdname, &fdcopy);
}
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_BACKUP) < 0)
goto endjob;
@ -856,6 +881,9 @@ qemuBackupBegin(virDomainObj *vm,
if (rc == 0 && tlsProps)
rc = qemuMonitorAddObject(priv->mon, &tlsProps, &tlsAlias);
if (rc == 0 && fdpass)
rc = qemuFDPassDirectTransferMonitor(fdpass, priv->mon);
if (rc == 0) {
if ((rc = qemuMonitorNBDServerStart(priv->mon, priv->backup->server, tlsAlias)) == 0)
nbd_running = true;

View File

@ -266,6 +266,7 @@ qemuBlockStorageSourceBuildJSONSocketAddress(virStorageNetHostDef *host)
break;
case VIR_STORAGE_NET_HOST_TRANS_RDMA:
case VIR_STORAGE_NET_HOST_TRANS_FD:
case VIR_STORAGE_NET_HOST_TRANS_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("transport protocol '%1$s' is not yet supported"),
@ -3641,9 +3642,6 @@ qemuBlockExportGetNBDProps(const char *nodename,
* @writable: whether the NBD export allows writes
* @bitmap: (optional) block dirty bitmap to export along
*
* This function automatically selects the proper invocation of exporting a
* block backend via NBD in qemu.
*
* This function must be called while in the monitor context.
*/
int
@ -3657,10 +3655,6 @@ qemuBlockExportAddNBD(virDomainObj *vm,
g_autoptr(virJSONValue) nbdprops = NULL;
const char *bitmaps[2] = { bitmap, NULL };
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCK_EXPORT_ADD))
return qemuMonitorNBDServerAdd(priv->mon, qemuBlockStorageSourceGetEffectiveNodename(src),
exportname, writable, bitmap);
if (!(nbdprops = qemuBlockExportGetNBDProps(qemuBlockStorageSourceGetEffectiveNodename(src),
exportname, writable, bitmaps)))
return -1;

View File

@ -529,7 +529,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 330 */
"bitmap-merge", /* X_QEMU_CAPS_BITMAP_MERGE */
"nbd-bitmap", /* QEMU_CAPS_NBD_BITMAP */
"nbd-bitmap", /* X_QEMU_CAPS_NBD_BITMAP */
"x86-max-cpu", /* QEMU_CAPS_X86_MAX_CPU */
"cpu-unavailable-features", /* QEMU_CAPS_CPU_UNAVAILABLE_FEATURES */
"canonical-cpu-features", /* QEMU_CAPS_CANONICAL_CPU_FEATURES */
@ -600,7 +600,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 380 */
"usb-host.hostdevice", /* QEMU_CAPS_USB_HOST_HOSTDEVICE */
"virtio-balloon.free-page-reporting", /* QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING */
"block-export-add", /* QEMU_CAPS_BLOCK_EXPORT_ADD */
"block-export-add", /* X_QEMU_CAPS_BLOCK_EXPORT_ADD */
"netdev.vhost-vdpa", /* QEMU_CAPS_NETDEV_VHOST_VDPA */
"fsdev.createmode", /* X_QEMU_CAPS_FSDEV_CREATEMODE */
@ -717,7 +717,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"machine-i8042-opt", /* QEMU_CAPS_MACHINE_I8042_OPT */
/* 465 */
"snapshot-internal-qmp", /* QEMU_CAPS_SNAPSHOT_INTERNAL_QMP */
"snapshot-internal-qmp", /* X_QEMU_CAPS_SNAPSHOT_INTERNAL_QMP */
"chardev-reconnect-miliseconds", /* QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS */
"virtio-ccw.loadparm", /* QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM */
"netdev-stream-reconnect-miliseconds", /* QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS */
@ -1243,7 +1243,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "query-cpu-definitions", QEMU_CAPS_QUERY_CPU_DEFINITIONS },
{ "query-cpu-model-baseline", QEMU_CAPS_QUERY_CPU_MODEL_BASELINE },
{ "query-cpu-model-comparison", QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON },
{ "block-export-add", QEMU_CAPS_BLOCK_EXPORT_ADD },
{ "set-action", QEMU_CAPS_SET_ACTION },
{ "query-dirty-rate", QEMU_CAPS_QUERY_DIRTY_RATE },
{ "sev-inject-launch-secret", QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET },
@ -1251,7 +1250,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "query-stats", QEMU_CAPS_QUERY_STATS },
{ "query-stats-schemas", QEMU_CAPS_QUERY_STATS_SCHEMAS },
{ "display-reload", QEMU_CAPS_DISPLAY_RELOAD },
{ "snapshot-save", QEMU_CAPS_SNAPSHOT_INTERNAL_QMP },
{ "blockdev-set-active", QEMU_CAPS_BLOCKDEV_SET_ACTIVE },
};
@ -1583,7 +1581,6 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "chardev-add/arg-type/backend/+qemu-vdagent", QEMU_CAPS_CHARDEV_QEMU_VDAGENT },
{ "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
{ "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
{ "nbd-server-add/arg-type/bitmap", QEMU_CAPS_NBD_BITMAP },
{ "netdev_add/arg-type/+stream", QEMU_CAPS_NETDEV_STREAM },
{ "netdev_add/arg-type/+stream/reconnect", QEMU_CAPS_NETDEV_STREAM_RECONNECT },
{ "netdev_add/arg-type/+vhost-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA },

View File

@ -510,7 +510,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 330 */
X_QEMU_CAPS_BITMAP_MERGE, /* block-dirty-bitmap-merge */
QEMU_CAPS_NBD_BITMAP, /* nbd-server-add supports bitmap */
X_QEMU_CAPS_NBD_BITMAP, /* nbd-server-add supports bitmap */
QEMU_CAPS_X86_MAX_CPU, /* max-x86_64-cpu type exists */
QEMU_CAPS_CPU_UNAVAILABLE_FEATURES, /* "unavailable-features" CPU property */
QEMU_CAPS_CANONICAL_CPU_FEATURES, /* avoid CPU feature aliases */
@ -581,7 +581,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 380 */
QEMU_CAPS_USB_HOST_HOSTDEVICE, /* -device usb-host.hostdevice */
QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING, /*virtio balloon free-page-reporting */
QEMU_CAPS_BLOCK_EXPORT_ADD, /* 'block-export-add' command is supported */
X_QEMU_CAPS_BLOCK_EXPORT_ADD, /* 'block-export-add' command is supported */
QEMU_CAPS_NETDEV_VHOST_VDPA, /* -netdev vhost-vdpa*/
X_QEMU_CAPS_FSDEV_CREATEMODE, /* fsdev.createmode */
@ -698,7 +698,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_MACHINE_I8042_OPT, /* -machine xxx,i8042=on/off; use virQEMUCapsSupportsI8042Toggle() to query this capability */
/* 465 */
QEMU_CAPS_SNAPSHOT_INTERNAL_QMP, /* internal snapshot support via QMP commands 'snapshot-save'/'snapshot-delete' */
X_QEMU_CAPS_SNAPSHOT_INTERNAL_QMP, /* internal snapshot support via QMP commands 'snapshot-save'/'snapshot-delete' */
QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS, /* 'reconnect-ms' option for chardevs supported */
QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM, /* loadparm available on CCW device for multi device boot */
QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS, /* 'reconnect-ms' option for netdev stream supported */

View File

@ -10685,12 +10685,6 @@ qemuBuildCommandLine(virDomainObj *vm,
if (qemuBuildSecCommandLine(vm, cmd, def->sec) < 0)
return NULL;
/* Internal snapshot reversion happens via QMP command after startup if
* supported */
if (snapshot &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP))
virCommandAddArgList(cmd, "-loadvm", snapshot->def->name, NULL);
if (def->namespaceData) {
qemuDomainXmlNsDef *qemuxmlns;
GStrv n;

View File

@ -5321,8 +5321,7 @@ qemuDomainDefFormatBufInternal(virQEMUDriver *driver,
*/
if (origCPU) {
virCPUDefFree(def->cpu);
if (!(def->cpu = virCPUDefCopy(origCPU)))
return -1;
def->cpu = virCPUDefCopy(origCPU);
}
if (def->cpu &&
@ -9354,8 +9353,8 @@ qemuDomainSaveCookieNew(virDomainObj *vm)
if (!(cookie = virObjectNew(qemuDomainSaveCookieClass)))
return NULL;
if (priv->origCPU && !(cookie->cpu = virCPUDefCopy(vm->def->cpu)))
return NULL;
if (priv->origCPU)
cookie->cpu = virCPUDefCopy(vm->def->cpu);
cookie->slirpHelper = qemuDomainGetSlirpHelperOk(vm);

View File

@ -28,7 +28,6 @@
#include "qemu_alias.h"
#include "qemu_monitor.h"
#include "qemu_monitor_text.h"
#include "qemu_monitor_json.h"
#include "qemu_domain.h"
#include "qemu_capabilities.h"
@ -80,7 +79,7 @@ VIR_LOG_INIT("qemu.qemu_monitor");
_("monitor must not be NULL")); \
exit; \
} \
VIR_DEBUG("mon:%p vm:%p fd:%d", mon, mon->vm, mon->fd); \
VIR_DEBUG("mon:%p vm:%p monfd:%d", mon, mon->vm, mon->fd); \
} while (0)
/* Check monitor and return NULL on error */
@ -2745,30 +2744,6 @@ qemuMonitorDelObject(qemuMonitor *mon,
}
int
qemuMonitorCreateSnapshot(qemuMonitor *mon, const char *name)
{
VIR_DEBUG("name=%s", name);
QEMU_CHECK_MONITOR(mon);
/* there won't ever be a direct QMP replacement for this function */
return qemuMonitorTextCreateSnapshot(mon, name);
}
int
qemuMonitorDeleteSnapshot(qemuMonitor *mon, const char *name)
{
VIR_DEBUG("name=%s", name);
QEMU_CHECK_MONITOR(mon);
/* there won't ever be a direct QMP replacement for this function */
return qemuMonitorTextDeleteSnapshot(mon, name);
}
int
qemuMonitorSnapshotSave(qemuMonitor *mon,
const char *jobname,
@ -3537,23 +3512,6 @@ qemuMonitorNBDServerStart(qemuMonitor *mon,
}
int
qemuMonitorNBDServerAdd(qemuMonitor *mon,
const char *deviceID,
const char *export,
bool writable,
const char *bitmap)
{
VIR_DEBUG("deviceID=%s, export=%s, bitmap=%s", deviceID, NULLSTR(export),
NULLSTR(bitmap));
QEMU_CHECK_MONITOR(mon);
return qemuMonitorJSONNBDServerAdd(mon, deviceID, export, writable,
bitmap);
}
int
qemuMonitorNBDServerStop(qemuMonitor *mon)
{

View File

@ -976,9 +976,6 @@ int qemuMonitorDelObject(qemuMonitor *mon,
const char *objalias,
bool report_error);
int qemuMonitorCreateSnapshot(qemuMonitor *mon, const char *name);
int qemuMonitorDeleteSnapshot(qemuMonitor *mon, const char *name);
int qemuMonitorTransaction(qemuMonitor *mon, virJSONValue **actions)
ATTRIBUTE_NONNULL(2);
int qemuMonitorBlockdevMirror(qemuMonitor *mon,
@ -1221,11 +1218,6 @@ int qemuMonitorNBDServerStart(qemuMonitor *mon,
const virStorageNetHostDef *server,
const char *tls_alias)
ATTRIBUTE_NONNULL(2);
int qemuMonitorNBDServerAdd(qemuMonitor *mon,
const char *deviceID,
const char *export,
bool writable,
const char *bitmap);
int qemuMonitorNBDServerStop(qemuMonitor *mon);
int qemuMonitorBlockExportAdd(qemuMonitor *mon,

View File

@ -6323,6 +6323,24 @@ qemuMonitorJSONBuildUnixSocketAddress(const char *path)
}
static virJSONValue *
qemuMonitorJSONBuildFDSocketAddress(const char *name)
{
g_autoptr(virJSONValue) addr = NULL;
g_autoptr(virJSONValue) data = NULL;
if (virJSONValueObjectAdd(&data, "s:str", name, NULL) < 0)
return NULL;
if (virJSONValueObjectAdd(&addr,
"s:type", "fd",
"a:data", &data, NULL) < 0)
return NULL;
return g_steal_pointer(&addr);
}
int
qemuMonitorJSONNBDServerStart(qemuMonitor *mon,
const virStorageNetHostDef *server,
@ -6341,6 +6359,9 @@ qemuMonitorJSONNBDServerStart(qemuMonitor *mon,
case VIR_STORAGE_NET_HOST_TRANS_UNIX:
addr = qemuMonitorJSONBuildUnixSocketAddress(server->socket);
break;
case VIR_STORAGE_NET_HOST_TRANS_FD:
addr = qemuMonitorJSONBuildFDSocketAddress(server->qemu_fdname);
break;
case VIR_STORAGE_NET_HOST_TRANS_RDMA:
case VIR_STORAGE_NET_HOST_TRANS_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@ -6365,34 +6386,6 @@ qemuMonitorJSONNBDServerStart(qemuMonitor *mon,
return 0;
}
int
qemuMonitorJSONNBDServerAdd(qemuMonitor *mon,
const char *deviceID,
const char *export,
bool writable,
const char *bitmap)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
/* Note: bitmap must be NULL if QEMU_CAPS_NBD_BITMAP is lacking */
if (!(cmd = qemuMonitorJSONMakeCommand("nbd-server-add",
"s:device", deviceID,
"S:name", export,
"b:writable", writable,
"S:bitmap", bitmap,
NULL)))
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
return -1;
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
return -1;
return 0;
}
int
qemuMonitorJSONNBDServerStop(qemuMonitor *mon)
{

View File

@ -541,12 +541,6 @@ qemuMonitorJSONNBDServerStart(qemuMonitor *mon,
const virStorageNetHostDef *server,
const char *tls_alias);
int
qemuMonitorJSONNBDServerAdd(qemuMonitor *mon,
const char *deviceID,
const char *export,
bool writable,
const char *bitmap);
int
qemuMonitorJSONNBDServerStop(qemuMonitor *mon);
int

View File

@ -1,88 +0,0 @@
/*
* qemu_monitor_text.c: interaction with QEMU monitor console
*
* Copyright (C) 2006-2014 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "qemu_monitor_text.h"
#include "qemu_monitor_json.h"
#include "virlog.h"
#include "virerror.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_monitor_text");
int
qemuMonitorTextCreateSnapshot(qemuMonitor *mon,
const char *name)
{
g_autofree char *cmd = NULL;
g_autofree char *reply = NULL;
cmd = g_strdup_printf("savevm \"%s\"", name);
if (qemuMonitorJSONHumanCommand(mon, cmd, -1, &reply))
return -1;
if (strstr(reply, "Error while creating snapshot") ||
strstr(reply, "Could not open VM state file") ||
strstr(reply, "State blocked by non-migratable device") ||
strstr(reply, "Error: ") ||
(strstr(reply, "Error") && strstr(reply, "while writing VM"))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Failed to take snapshot: %1$s"), reply);
return -1;
} else if (strstr(reply, "No block device can accept snapshots")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("this domain does not have a device to take snapshots"));
return -1;
}
return 0;
}
int qemuMonitorTextDeleteSnapshot(qemuMonitor *mon, const char *name)
{
g_autofree char *cmd = NULL;
g_autofree char *reply = NULL;
cmd = g_strdup_printf("delvm \"%s\"", name);
if (qemuMonitorJSONHumanCommand(mon, cmd, -1, &reply))
return -1;
if (strstr(reply, "No block device supports snapshots")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("this domain does not have a device to delete snapshots"));
return -1;
} else if (strstr(reply, "Snapshots not supported on device")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", reply);
return -1;
} else if (strstr(reply, "Error: ") ||
(strstr(reply, "Error") &&
strstr(reply, "while deleting snapshot"))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Failed to delete snapshot: %1$s"), reply);
return -1;
}
return 0;
}

View File

@ -1,29 +0,0 @@
/*
* qemu_monitor_text.h: interaction with QEMU monitor console
*
* Copyright (C) 2006-2009, 2011-2012 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "internal.h"
#include "qemu_monitor.h"
int qemuMonitorTextCreateSnapshot(qemuMonitor *mon, const char *name);
int qemuMonitorTextDeleteSnapshot(qemuMonitor *mon, const char *name);

View File

@ -8239,8 +8239,7 @@ qemuProcessLaunch(virConnectPtr conn,
qemuDomainVcpuPersistOrder(vm->def);
if (snapshot &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP)) {
if (snapshot) {
VIR_DEBUG("reverting internal snapshot via QMP");
if (qemuSnapshotInternalRevert(vm, snapshot, asyncJob) < 0)
goto cleanup;

View File

@ -413,12 +413,25 @@ qemuRdpSetCredentials(virDomainObj *vm,
}
/**
* qemuRdpAvailable:
* @helper: name (or path to) 'qemu-rdp' binary
*
* Returns whether 'qemu-rdp' is available.
*
* Important:
* This function is called from 'virQEMUDriverGetDomainCapabilities'. It must
* not report any errors and must not add any additional checks.
*
* This function is mocked from 'tests/testutilsqemu.c'
*
*/
bool
qemuRdpAvailable(const char *helper)
{
g_autoptr(qemuRdp) rdp = NULL;
g_autofree char *helperPath = NULL;
rdp = qemuRdpNewForHelper(helper);
return rdp && qemuRdpHasFeature(rdp, QEMU_RDP_FEATURE_DBUS_ADDRESS);
/* This function was added corresponding to the first release of 'qemu-rdp'
* thus checking existance of the helper binary is sufficient. */
return !!(helperPath = virFindFileInPath(helper));
}

View File

@ -554,12 +554,12 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
virDomainMomentObj *snap,
unsigned int flags)
{
qemuDomainObjPrivate *priv = vm->privateData;
virObjectEvent *event = NULL;
bool resume = false;
virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap);
int ret = -1;
int rv = 0;
g_autoptr(qemuBlockJobData) job = NULL;
if (!qemuMigrationSrcIsAllowed(vm, false, VIR_ASYNC_JOB_SNAPSHOT, 0))
goto cleanup;
@ -581,27 +581,11 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
}
}
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP)) {
g_autoptr(qemuBlockJobData) job = NULL;
if (!(job = qemuSnapshotCreateActiveInternalStart(vm, snapdef)))
goto cleanup;
if (!(job = qemuSnapshotCreateActiveInternalStart(vm, snapdef)))
goto cleanup;
while ((rv = qemuSnapshotCreateActiveInternalDone(vm, job)) != 1) {
if (rv < 0 || qemuDomainObjWait(vm) < 0)
goto cleanup;
}
ret = 0;
} else {
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_SNAPSHOT) < 0) {
resume = false;
goto cleanup;
}
ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->name);
qemuDomainObjExitMonitor(vm);
if (ret < 0)
while ((rv = qemuSnapshotCreateActiveInternalDone(vm, job)) != 1) {
if (rv < 0 || qemuDomainObjWait(vm) < 0)
goto cleanup;
}
@ -617,6 +601,8 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
resume = false;
}
ret = 0;
cleanup:
if (resume && virDomainObjIsActive(vm) &&
qemuProcessStartCPUs(driver, vm,
@ -943,7 +929,6 @@ qemuSnapshotPrepare(virDomainObj *vm,
bool *has_manual,
unsigned int *flags)
{
qemuDomainObjPrivate *priv = vm->privateData;
size_t i;
bool active = virDomainObjIsActive(vm);
bool reuse = (*flags & VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT) != 0;
@ -1064,13 +1049,6 @@ qemuSnapshotPrepare(virDomainObj *vm,
* varstore is in qcow2 format.
*/
if (active && found_internal) {
if (virDomainDefHasOldStyleUEFI(vm->def) &&
!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("internal snapshots of a VM with pflash based firmware are not supported with this qemu"));
return -1;
}
if (vm->def->os.loader &&
vm->def->os.loader->nvram &&
vm->def->os.loader->nvram->format != VIR_STORAGE_FILE_QCOW2) {
@ -4119,22 +4097,13 @@ qemuSnapshotDiscardImpl(virDomainObj *vm,
return -1;
} else {
virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(snap);
qemuDomainObjPrivate *priv = vm->privateData;
/* Similarly as internal snapshot creation we would use a regular job
* here so set a mask to forbid any other job. */
qemuDomainObjSetAsyncJobMask(vm, VIR_JOB_NONE);
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP)) {
if (qemuSnapshotDiscardActiveInternal(vm, snapdef) < 0)
return -1;
} else {
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_SNAPSHOT) < 0)
return -1;
/* we continue on even in the face of error */
qemuMonitorDeleteSnapshot(qemuDomainGetMonitor(vm), snap->def->name);
qemuDomainObjExitMonitor(vm);
}
if (qemuSnapshotDiscardActiveInternal(vm, snapdef) < 0)
return -1;
qemuDomainObjSetAsyncJobMask(vm, VIR_JOB_DEFAULT_MASK);
}

View File

@ -742,6 +742,42 @@ remoteConnectFormatURI(virURI *uri,
}
static int
remoteCallOpen(virConnectPtr conn,
struct private_data *priv,
const char *name,
unsigned int flags)
{
remote_connect_open_args args = { (char**) &name, flags };
VIR_DEBUG("Trying to open URI '%s'", name);
if (call(conn, priv, 0, REMOTE_PROC_CONNECT_OPEN,
(xdrproc_t) xdr_remote_connect_open_args, (char *) &args,
(xdrproc_t) xdr_void, (char *) NULL) == -1)
return -1;
/* Now try and find out what URI the daemon used */
if (conn->uri == NULL) {
remote_connect_get_uri_ret uriret = { 0 };
VIR_DEBUG("Trying to query remote URI");
if (call(conn, priv, 0,
REMOTE_PROC_CONNECT_GET_URI,
(xdrproc_t) xdr_void, (char *) NULL,
(xdrproc_t) xdr_remote_connect_get_uri_ret, (char *) &uriret) < 0)
return -1;
VIR_DEBUG("Auto-probed URI is %s", uriret.uri);
conn->uri = virURIParse(uriret.uri);
VIR_FREE(uriret.uri);
if (!conn->uri)
return -1;
}
return 0;
}
/* helper macro to ease extraction of arguments from the URI */
#define EXTRACT_URI_ARG_STR(ARG_NAME, ARG_VAR) \
if (STRCASEEQ(var->name, ARG_NAME)) { \
@ -758,13 +794,74 @@ remoteConnectFormatURI(virURI *uri,
virReportError(VIR_ERR_INVALID_ARG, \
_("Failed to parse value of URI component %1$s"), \
var->name); \
goto error; \
return -1; \
} \
ARG_VAR = tmp == 0; \
var->ignore = 1; \
continue; \
}
static int
doRemoteOpenExtractURIArgs(virConnectPtr conn,
char **name,
char **command,
char **sockname,
char **authtype,
char **sshauth,
char **netcat,
char **keyfile,
char **pkipath,
char **knownHosts,
char **knownHostsVerify,
char **tls_priority,
char **mode_str,
char **proxy_str,
#ifndef WIN32
bool *tty,
#endif
bool *sanity,
bool *verify)
{
size_t i;
for (i = 0; i < conn->uri->paramsCount; i++) {
virURIParam *var = &conn->uri->params[i];
EXTRACT_URI_ARG_STR("name", *name);
EXTRACT_URI_ARG_STR("command", *command);
EXTRACT_URI_ARG_STR("socket", *sockname);
EXTRACT_URI_ARG_STR("auth", *authtype);
EXTRACT_URI_ARG_STR("sshauth", *sshauth);
EXTRACT_URI_ARG_STR("netcat", *netcat);
EXTRACT_URI_ARG_STR("keyfile", *keyfile);
EXTRACT_URI_ARG_STR("pkipath", *pkipath);
EXTRACT_URI_ARG_STR("known_hosts", *knownHosts);
EXTRACT_URI_ARG_STR("known_hosts_verify", *knownHostsVerify);
EXTRACT_URI_ARG_STR("tls_priority", *tls_priority);
EXTRACT_URI_ARG_STR("mode", *mode_str);
EXTRACT_URI_ARG_STR("proxy", *proxy_str);
EXTRACT_URI_ARG_BOOL("no_sanity", *sanity);
EXTRACT_URI_ARG_BOOL("no_verify", *verify);
#ifndef WIN32
EXTRACT_URI_ARG_BOOL("no_tty", *tty);
#endif
if (STRCASEEQ(var->name, "authfile")) {
/* Strip this param, used by virauth.c */
var->ignore = 1;
continue;
}
VIR_DEBUG("passing through variable '%s' ('%s') to remote end",
var->name, var->value);
}
return 0;
}
#undef EXTRACT_URI_ARG_STR
#undef EXTRACT_URI_ARG_BOOL
/*
* URIs that this driver needs to handle:
@ -818,7 +915,6 @@ doRemoteOpen(virConnectPtr conn,
bool tty = true;
#endif
int mode;
size_t i;
int proxy;
/* We handle *ALL* URIs here. The caller has rejected any
@ -844,35 +940,28 @@ doRemoteOpen(virConnectPtr conn,
* although that won't be the case for now).
*/
if (conn->uri) {
for (i = 0; i < conn->uri->paramsCount; i++) {
virURIParam *var = &conn->uri->params[i];
EXTRACT_URI_ARG_STR("name", name);
EXTRACT_URI_ARG_STR("command", command);
EXTRACT_URI_ARG_STR("socket", sockname);
EXTRACT_URI_ARG_STR("auth", authtype);
EXTRACT_URI_ARG_STR("sshauth", sshauth);
EXTRACT_URI_ARG_STR("netcat", netcat);
EXTRACT_URI_ARG_STR("keyfile", keyfile);
EXTRACT_URI_ARG_STR("pkipath", pkipath);
EXTRACT_URI_ARG_STR("known_hosts", knownHosts);
EXTRACT_URI_ARG_STR("known_hosts_verify", knownHostsVerify);
EXTRACT_URI_ARG_STR("tls_priority", tls_priority);
EXTRACT_URI_ARG_STR("mode", mode_str);
EXTRACT_URI_ARG_STR("proxy", proxy_str);
EXTRACT_URI_ARG_BOOL("no_sanity", sanity);
EXTRACT_URI_ARG_BOOL("no_verify", verify);
/* This really needs to be a separate function to keep
* the stack size at sane levels. */
if (doRemoteOpenExtractURIArgs(conn,
&name,
&command,
&sockname,
&authtype,
&sshauth,
&netcat,
&keyfile,
&pkipath,
&knownHosts,
&knownHostsVerify,
&tls_priority,
&mode_str,
&proxy_str,
#ifndef WIN32
EXTRACT_URI_ARG_BOOL("no_tty", tty);
&tty,
#endif
if (STRCASEEQ(var->name, "authfile")) {
/* Strip this param, used by virauth.c */
var->ignore = 1;
continue;
}
VIR_DEBUG("passing through variable '%s' ('%s') to remote end",
var->name, var->value);
&sanity,
&verify) < 0) {
goto error;
}
/* Construct the original name. */
@ -974,7 +1063,7 @@ doRemoteOpen(virConnectPtr conn,
VIR_DEBUG("Connecting with transport %d", transport);
switch ((remoteDriverTransport)transport) {
switch (transport) {
case REMOTE_DRIVER_TRANSPORT_UNIX:
case REMOTE_DRIVER_TRANSPORT_SSH:
case REMOTE_DRIVER_TRANSPORT_LIBSSH:
@ -999,7 +1088,7 @@ doRemoteOpen(virConnectPtr conn,
VIR_DEBUG("Chosen UNIX socket %s", NULLSTR(sockname));
/* Connect to the remote service. */
switch ((remoteDriverTransport)transport) {
switch (transport) {
case REMOTE_DRIVER_TRANSPORT_TLS:
if (conf && !tls_priority &&
virConfGetValueString(conf, "tls_priority", &tls_priority) < 0)
@ -1188,33 +1277,8 @@ doRemoteOpen(virConnectPtr conn,
}
/* Finally we can call the remote side's open function. */
{
remote_connect_open_args args = { &name, flags };
VIR_DEBUG("Trying to open URI '%s'", name);
if (call(conn, priv, 0, REMOTE_PROC_CONNECT_OPEN,
(xdrproc_t) xdr_remote_connect_open_args, (char *) &args,
(xdrproc_t) xdr_void, (char *) NULL) == -1)
goto error;
}
/* Now try and find out what URI the daemon used */
if (conn->uri == NULL) {
remote_connect_get_uri_ret uriret = { 0 };
VIR_DEBUG("Trying to query remote URI");
if (call(conn, priv, 0,
REMOTE_PROC_CONNECT_GET_URI,
(xdrproc_t) xdr_void, (char *) NULL,
(xdrproc_t) xdr_remote_connect_get_uri_ret, (char *) &uriret) < 0)
goto error;
VIR_DEBUG("Auto-probed URI is %s", uriret.uri);
conn->uri = virURIParse(uriret.uri);
VIR_FREE(uriret.uri);
if (!conn->uri)
goto error;
}
if (remoteCallOpen(conn, priv, name, flags) < 0)
goto error;
/* Set up events */
if (!(priv->eventState = virObjectEventStateNew()))
@ -1248,8 +1312,6 @@ doRemoteOpen(virConnectPtr conn,
VIR_FREE(priv->hostname);
return VIR_DRV_OPEN_ERROR;
}
#undef EXTRACT_URI_ARG_STR
#undef EXTRACT_URI_ARG_BOOL
static struct private_data *
remoteAllocPrivateData(void)

View File

@ -117,6 +117,4 @@
deny /sys/fs/cgroup?*{,/**} wklx,
deny /sys/fs?*{,/**} wklx,
@BEGIN_APPARMOR_3@
include if exists <abstractions/libvirt-lxc.d>
@END_APPARMOR_3@

View File

@ -190,7 +190,6 @@
/usr/{lib,lib64}/libswtpm_libtpms.so mr,
/usr/lib/@{multiarch}/libswtpm_libtpms.so mr,
@BEGIN_APPARMOR_3@
# support for passt network back-end
/usr/bin/passt Cx -> passt,
@ -206,7 +205,6 @@
include if exists <abstractions/passt>
}
@END_APPARMOR_3@
# for save and resume
/{usr/,}bin/dash rmix,
@ -281,6 +279,4 @@
owner /var/lib/libvirt/qemu/nvram/*_VARS.fd rwk,
owner /var/lib/libvirt/qemu/nvram/*_VARS.ms.fd rwk,
@BEGIN_APPARMOR_3@
include if exists <abstractions/libvirt-qemu.d>
@END_APPARMOR_3@

View File

@ -5,11 +5,6 @@ apparmor_gen_profiles = [
'usr.sbin.virtxend',
]
apparmor_gen_abstractions = [
'libvirt-qemu',
'libvirt-lxc',
]
apparmor_gen_profiles_conf = configuration_data({
'sysconfdir': sysconfdir,
'sbindir': sbindir,
@ -19,41 +14,9 @@ apparmor_gen_profiles_conf = configuration_data({
apparmor_dir = sysconfdir / 'apparmor.d'
# Our profiles use some features that only work well on AppArmor 3.x,
# specifically the 'include if exists' directive. In order to keep
# supporting AppArmor 2.x, the bits that are version-specific are
# enclosed in special markers and we decide which ones to include
# based on the AppArmor version detected on the host.
#
# TODO: drop the additional complexity once we no longer target
# distros that ship AppArmor 2.x (Debian 11, Ubuntu 20.04)
if conf.has('WITH_APPARMOR_3')
apparmor_gen_cmd = [
'sed',
'-e', '/[@]BEGIN_APPARMOR_3[@]/d',
'-e', '/[@]END_APPARMOR_3[@]/d',
'-e', '/[@]BEGIN_APPARMOR_2[@]/,/[@]END_APPARMOR_2[@]/d',
'@INPUT@'
]
else
apparmor_gen_cmd = [
'sed',
'-e', '/[@]BEGIN_APPARMOR_3[@]/,/[@]END_APPARMOR_3[@]/d',
'-e', '/[@]BEGIN_APPARMOR_2[@]/d',
'-e', '/[@]END_APPARMOR_2[@]/d',
'@INPUT@'
]
endif
foreach name : apparmor_gen_profiles
tmp = configure_file(
input: '@0@.in'.format(name),
output: '@0@.tmp'.format(name),
command: apparmor_gen_cmd,
capture: true,
)
configure_file(
input: tmp,
input: '@0@.in'.format(name),
output: name,
configuration: apparmor_gen_profiles_conf,
install: true,
@ -61,29 +24,12 @@ foreach name : apparmor_gen_profiles
)
endforeach
foreach name : apparmor_gen_abstractions
configure_file(
input: '@0@.in'.format(name),
output: name,
command: apparmor_gen_cmd,
capture: true,
install: true,
install_dir: apparmor_dir / 'abstractions',
)
endforeach
install_data(
[ 'libvirt-qemu', 'libvirt-lxc' ],
install_dir: apparmor_dir / 'abstractions',
)
install_data(
[ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ],
install_dir: apparmor_dir / 'libvirt',
)
if not conf.has('WITH_APPARMOR_3')
# We only install the empty local override for AppArmor 2.x. For
# AppArmor 3.x, upstream's preference is to avoid creating these
# files in order to limit the amount of filesystem clutter.
install_data(
'usr.lib.libvirt.virt-aa-helper.local',
install_dir: apparmor_dir / 'local',
rename: 'usr.lib.libvirt.virt-aa-helper',
)
endif

View File

@ -74,10 +74,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper {
/**.[iI][sS][oO] r,
/**/disk{,.*} r,
@BEGIN_APPARMOR_3@
include if exists <local/usr.lib.libvirt.virt-aa-helper>
@END_APPARMOR_3@
@BEGIN_APPARMOR_2@
#include <local/usr.lib.libvirt.virt-aa-helper>
@END_APPARMOR_2@
}

View File

@ -144,7 +144,5 @@ profile libvirtd @sbindir@/libvirtd flags=(attach_disconnected) {
/usr/{lib,lib64,lib/qemu,libexec,libexec/qemu}/qemu-bridge-helper rmix,
}
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.libvirtd>
@END_APPARMOR_3@
}

View File

@ -136,7 +136,5 @@ profile virtqemud @sbindir@/virtqemud flags=(attach_disconnected) {
/usr/{lib,lib64,lib/qemu,libexec,libexec/qemu}/qemu-bridge-helper rmix,
}
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.virtqemud>
@END_APPARMOR_3@
}

View File

@ -55,7 +55,5 @@ profile virtxend @sbindir@/virtxend flags=(attach_disconnected) {
/etc/libvirt/hooks/** rmix,
/etc/xen/scripts/** rmix,
@BEGIN_APPARMOR_3@
include if exists <local/usr.sbin.virtxend>
@END_APPARMOR_3@
}

View File

@ -1560,13 +1560,8 @@ main(int argc, char **argv)
/* create the profile from TEMPLATE */
if (ctl->cmd == 'c' || purged) {
g_autofree char *tmp = NULL;
#if defined(WITH_APPARMOR_3)
const char *ifexists = "if exists ";
#else
const char *ifexists = "";
#endif
tmp = g_strdup_printf(" #include %s<libvirt/%s.files>\n", ifexists, ctl->uuid);
g_autofree char *tmp = g_strdup_printf(
" #include if exists <libvirt/%s.files>\n", ctl->uuid);
if (ctl->dryrun) {
vah_info(profile);

View File

@ -1939,6 +1939,7 @@ storageVolCreateXML(virStoragePoolPtr pool,
if (backend->buildVol) {
int buildret;
virStorageVolDef *buildvoldef = NULL;
unsigned int buildFlags = flags;
buildvoldef = g_new0(virStorageVolDef, 1);
@ -1953,7 +1954,8 @@ storageVolCreateXML(virStoragePoolPtr pool,
voldef->building = true;
virObjectUnlock(obj);
buildret = backend->buildVol(obj, buildvoldef, flags);
buildFlags &= ~VIR_STORAGE_VOL_CREATE_VALIDATE;
buildret = backend->buildVol(obj, buildvoldef, buildFlags);
VIR_FREE(buildvoldef);

View File

@ -74,6 +74,7 @@ virStorageFileBackendGlusterInitServer(virStorageFileBackendGlusterPriv *priv,
hoststr = host->socket;
break;
case VIR_STORAGE_NET_HOST_TRANS_FD:
case VIR_STORAGE_NET_HOST_TRANS_LAST:
break;
}

View File

@ -643,9 +643,8 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
int nodecpus, nodecores, nodesockets, nodethreads, offline = 0;
int threads_per_subcore = 0;
unsigned int node;
int ret = -1;
char *sysfs_nodedir = NULL;
char *sysfs_cpudir = NULL;
g_autofree char *sysfs_nodedir = NULL;
g_autofree char *sysfs_cpudir_fallback = NULL;
int direrr;
*mhz = 0;
@ -659,12 +658,11 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
/* Get information about what CPUs are present in the host and what
* CPUs are online, so that we don't have to so for each node */
present_cpus_map = virHostCPUGetPresentBitmap();
if (!present_cpus_map)
goto cleanup;
online_cpus_map = virHostCPUGetOnlineBitmap();
if (!online_cpus_map)
goto cleanup;
if (!(present_cpus_map = virHostCPUGetPresentBitmap()))
return -1;
if (!(online_cpus_map = virHostCPUGetOnlineBitmap()))
return -1;
/* OK, we've parsed clock speed out of /proc/cpuinfo. Get the
* core, node, socket, thread and topology information from /sys
@ -699,7 +697,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
* On hosts other than POWER this will be 0, in which case a simpler
* thread-counting logic will be used */
if ((threads_per_subcore = virHostCPUGetThreadsPerSubcore(arch)) < 0)
goto cleanup;
return -1;
/* If the subcore configuration is not valid, just pretend subcores
* are not in use and count threads one by one */
@ -707,6 +705,8 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
threads_per_subcore = 0;
while ((direrr = virDirRead(nodedir, &nodedirent, sysfs_nodedir)) > 0) {
g_autofree char *sysfs_cpudir = NULL;
if (sscanf(nodedirent->d_name, "node%u", &node) != 1)
continue;
@ -721,9 +721,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
threads_per_subcore,
&nodesockets, &nodecores,
&nodethreads, &offline)) < 0)
goto cleanup;
VIR_FREE(sysfs_cpudir);
return -1;
*cpus += nodecpus;
@ -738,23 +736,21 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
}
if (direrr < 0)
goto cleanup;
return -1;
if (*cpus && *nodes)
goto done;
fallback:
VIR_FREE(sysfs_cpudir);
sysfs_cpudir_fallback = g_strdup_printf("%s/cpu", SYSFS_SYSTEM_PATH);
sysfs_cpudir = g_strdup_printf("%s/cpu", SYSFS_SYSTEM_PATH);
if ((nodecpus = virHostCPUParseNode(sysfs_cpudir, arch,
if ((nodecpus = virHostCPUParseNode(sysfs_cpudir_fallback, arch,
present_cpus_map,
online_cpus_map,
threads_per_subcore,
&nodesockets, &nodecores,
&nodethreads, &offline)) < 0)
goto cleanup;
return -1;
*nodes = 1;
*cpus = nodecpus;
@ -766,17 +762,17 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
/* There should always be at least one cpu, socket, node, and thread. */
if (*cpus == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no CPUs found"));
goto cleanup;
return -1;
}
if (*sockets == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no sockets found"));
goto cleanup;
return -1;
}
if (*threads == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no threads found"));
goto cleanup;
return -1;
}
/* Now check if the topology makes sense. There are machines that don't
@ -796,12 +792,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo,
*threads = 1;
}
ret = 0;
cleanup:
VIR_FREE(sysfs_nodedir);
VIR_FREE(sysfs_cpudir);
return ret;
return 0;
}
# define TICK_TO_NSEC (1000ull * 1000ull * 1000ull / sysconf(_SC_CLK_TCK))

View File

@ -4553,6 +4553,507 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char *location)
return ret;
}
static int
vboxSnapshotReplaceRWDisks(struct _vboxDriver *data,
virVBoxSnapshotConfMachine *snapshotMachineDesc,
char *currentSnapshotXmlFilePath)
{
g_auto(GStrv) realReadWriteDisksPath = NULL;
g_auto(GStrv) realReadOnlyDisksPath = NULL;
int realReadWriteDisksPathSize = 0;
int realReadOnlyDisksPathSize = 0;
int it = 0;
/*
* We have created fake disks, so we have to remove them and replace them with
* the read-write disks if there are any. The fake disks will be closed during
* the machine unregistration.
*/
if (virVBoxSnapshotConfRemoveFakeDisks(snapshotMachineDesc) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to remove Fake Disks"));
return -1;
}
realReadWriteDisksPathSize = virVBoxSnapshotConfGetRWDisksPathsFromLibvirtXML(currentSnapshotXmlFilePath,
&realReadWriteDisksPath);
realReadOnlyDisksPathSize = virVBoxSnapshotConfGetRODisksPathsFromLibvirtXML(currentSnapshotXmlFilePath,
&realReadOnlyDisksPath);
/* The read-only disk number is necessarily greater or equal to the
* read-write disk number */
if (realReadOnlyDisksPathSize < realReadWriteDisksPathSize) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("The read only disk number must be greater or equal to the read write disk number"));
return -1;
}
for (it = 0; it < realReadWriteDisksPathSize; it++) {
virVBoxSnapshotConfHardDisk *readWriteDisk = NULL;
PRUnichar *locationUtf = NULL;
IMedium *readWriteMedium = NULL;
char *uuid = NULL;
PRUnichar *formatUtf = NULL;
char *format = NULL;
const char *parentUuid = NULL;
vboxIID iid;
nsresult rc;
VBOX_IID_INITIALIZE(&iid);
VBOX_UTF8_TO_UTF16(realReadWriteDisksPath[it], &locationUtf);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&readWriteMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
return -1;
}
VBOX_UTF16_FREE(locationUtf);
rc = gVBoxAPI.UIMedium.GetId(readWriteMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get the read write medium id"));
return -1;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetFormat(readWriteMedium, &formatUtf);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get the read write medium format"));
return -1;
}
VBOX_UTF16_TO_UTF8(formatUtf, &format);
VBOX_UTF16_FREE(formatUtf);
readWriteDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
readWriteDisk->format = format;
readWriteDisk->uuid = uuid;
readWriteDisk->location = realReadWriteDisksPath[it];
/*
* We get the current snapshot's read-only disk uuid in order to add the
* read-write disk to the media registry as its child. The read-only disk
* is already in the media registry because it is the fake disk's parent.
*/
parentUuid = virVBoxSnapshotConfHardDiskUuidByLocation(snapshotMachineDesc,
realReadOnlyDisksPath[it]);
if (parentUuid == NULL) {
VIR_FREE(readWriteDisk);
return -1;
}
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(readWriteDisk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to media Registry"));
VIR_FREE(readWriteDisk);
return -1;
}
rc = gVBoxAPI.UIMedium.Close(readWriteMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
return -1;
}
}
return 0;
}
static int
vboxSnapshotAddDisksToMediaRegistry(struct _vboxDriver *data,
virDomainSnapshotDef *def,
virVBoxSnapshotConfMachine *snapshotMachineDesc)
{
int it = 0;
for (it = 0; it < def->parent.dom->ndisks; it++) {
int diskInMediaRegistry = 0;
IMedium *readOnlyMedium = NULL;
PRUnichar *locationUtf = NULL;
char *uuid = NULL;
PRUnichar *formatUtf = NULL;
char *format = NULL;
char *parentUuid = NULL;
virVBoxSnapshotConfHardDisk *readOnlyDisk = NULL;
vboxIID iid, parentiid;
IMedium *parentReadOnlyMedium = NULL;
nsresult rc;
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
diskInMediaRegistry = virVBoxSnapshotConfDiskIsInMediaRegistry(snapshotMachineDesc,
def->parent.dom->disks[it]->src->path);
if (diskInMediaRegistry == -1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to know if disk is in media registry"));
return -1;
}
if (diskInMediaRegistry == 1) /* Nothing to do. */
continue;
/* The read only disk is not in the media registry */
VBOX_UTF8_TO_UTF16(def->parent.dom->disks[it]->src->path, &locationUtf);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&readOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
return -1;
}
VBOX_UTF16_FREE(locationUtf);
rc = gVBoxAPI.UIMedium.GetId(readOnlyMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
return -1;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetFormat(readOnlyMedium, &formatUtf);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk format"));
VIR_FREE(uuid);
return -1;
}
VBOX_UTF16_TO_UTF8(formatUtf, &format);
VBOX_UTF16_FREE(formatUtf);
/* This disk is already in the media registry */
rc = gVBoxAPI.UIMedium.GetParent(readOnlyMedium, &parentReadOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get parent hard disk"));
VIR_FREE(uuid);
return -1;
}
rc = gVBoxAPI.UIMedium.GetId(parentReadOnlyMedium, &parentiid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
VIR_FREE(uuid);
return -1;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
rc = gVBoxAPI.UIMedium.Close(readOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
VIR_FREE(uuid);
VIR_FREE(parentUuid);
return -1;
}
readOnlyDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
readOnlyDisk->format = format;
readOnlyDisk->uuid = uuid;
readOnlyDisk->location = g_strdup(def->parent.dom->disks[it]->src->path);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(readOnlyDisk, snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to media registry"));
VIR_FREE(readOnlyDisk);
return -1;
}
}
return 0;
}
static int
vboxSnapshotAddRWDisks(struct _vboxDriver *data,
virDomainSnapshotDef *def,
virVBoxSnapshotConfMachine *snapshotMachineDesc,
bool needToChangeStorageController)
{
int it = 0;
for (it = 0; it < def->ndisks; it++) {
IMedium *medium = NULL;
PRUnichar *locationUtf16 = NULL;
virVBoxSnapshotConfHardDisk *disk = NULL;
PRUnichar *formatUtf16 = NULL;
char *format = NULL;
char *uuid = NULL;
IMedium *parentDisk = NULL;
char *parentUuid = NULL;
vboxIID iid, parentiid;
nsresult rc;
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
VBOX_UTF8_TO_UTF16(def->disks[it].src->path, &locationUtf16);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf16,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
return -1;
}
VBOX_UTF16_FREE(locationUtf16);
disk = g_new0(virVBoxSnapshotConfHardDisk, 1);
rc = gVBoxAPI.UIMedium.GetFormat(medium, &formatUtf16);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk format"));
VIR_FREE(disk);
return -1;
}
VBOX_UTF16_TO_UTF8(formatUtf16, &format);
disk->format = format;
VBOX_UTF16_FREE(formatUtf16);
disk->location = g_strdup(def->disks[it].src->path);
rc = gVBoxAPI.UIMedium.GetId(medium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk uuid"));
VIR_FREE(disk);
return -1;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
disk->uuid = uuid;
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetParent(medium, &parentDisk);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk parent"));
VIR_FREE(disk);
return -1;
}
gVBoxAPI.UIMedium.GetId(parentDisk, &parentiid);
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(disk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to the media registry"));
VIR_FREE(disk);
return -1;
}
if (needToChangeStorageController) {
/* We need to append this disk in the storage controller */
g_auto(GStrv) searchResultTab = NULL;
char *tmp = NULL;
ssize_t resultSize = 0;
resultSize = virStringSearch(snapshotMachineDesc->storageController,
VBOX_UUID_REGEX,
it + 1,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to find UUID %1$s"), searchResultTab[it]);
return -1;
}
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
disk->uuid);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
return -1;
snapshotMachineDesc->storageController = g_strdup(tmp);
VIR_FREE(tmp);
}
/* Close disk */
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
return -1;
}
}
return 0;
}
static int
vboxSnapshotCreateFakeDiffStorage(struct _vboxDriver *data,
virDomainSnapshotDef *def,
char *machineLocationPath,
virVBoxSnapshotConfMachine *snapshotMachineDesc)
{
virVBoxSnapshotConfHardDisk *newHardDisk = NULL;
int it;
int ret = -1;
for (it = 0; it < def->parent.dom->ndisks; it++) {
IMedium *medium = NULL;
PRUnichar *locationUtf16 = NULL;
char *parentUuid = NULL;
IMedium *newMedium = NULL;
PRUnichar *formatUtf16 = NULL;
PRUnichar *newLocation = NULL;
char *newLocationUtf8 = NULL;
resultCodeUnion resultCode;
char *uuid = NULL;
char *format = NULL;
char *tmp = NULL;
vboxIID iid, parentiid;
IProgress *progress = NULL;
PRUint32 tab[1];
nsresult rc;
g_auto(GStrv) searchResultTab = NULL;
ssize_t resultSize = 0;
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
VBOX_UTF8_TO_UTF16(def->parent.dom->disks[it]->src->path, &locationUtf16);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf16,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf16);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
rc = gVBoxAPI.UIMedium.GetId(medium, &parentiid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
VBOX_UTF8_TO_UTF16("VDI", &formatUtf16);
newLocationUtf8 = g_strdup_printf("%sfakedisk-%d.vdi",
machineLocationPath, it);
VBOX_UTF8_TO_UTF16(newLocationUtf8, &newLocation);
rc = gVBoxAPI.UIVirtualBox.CreateHardDisk(data->vboxObj,
formatUtf16,
newLocation,
&newMedium);
VBOX_UTF16_FREE(newLocation);
VBOX_UTF16_FREE(formatUtf16);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to create HardDisk"));
goto cleanup;
}
tab[0] = MediumVariant_Diff;
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Error while creating diff storage, rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
VBOX_RELEASE(progress);
/*
* The differential newHardDisk is created, we add it to the
* media registry and the machine storage controllers.
*/
newHardDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
rc = gVBoxAPI.UIMedium.GetId(newMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get medium uuid"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
newHardDisk->uuid = uuid;
vboxIIDUnalloc(&iid);
newHardDisk->location = g_strdup(newLocationUtf8);
rc = gVBoxAPI.UIMedium.GetFormat(newMedium, &formatUtf16);
VBOX_UTF16_TO_UTF8(formatUtf16, &format);
newHardDisk->format = format;
VBOX_UTF16_FREE(formatUtf16);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(newHardDisk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to the media registry"));
goto cleanup;
}
newHardDisk = NULL; /* Consumed by above */
/* Adding the fake disk to the machine storage controllers */
resultSize = virStringSearch(snapshotMachineDesc->storageController,
VBOX_UUID_REGEX,
it + 1,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to find UUID %1$s"), searchResultTab[it]);
goto cleanup;
}
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
uuid);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
snapshotMachineDesc->storageController = g_strdup(tmp);
VIR_FREE(tmp);
/* Closing the "fake" disk */
rc = gVBoxAPI.UIMedium.Close(newMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close the new medium"));
goto cleanup;
}
}
ret = 0;
cleanup:
virVboxSnapshotConfHardDiskFree(newHardDisk);
return ret;
}
static int
vboxSnapshotRedefine(virDomainPtr dom,
virDomainSnapshotDef *def,
@ -4596,15 +5097,10 @@ vboxSnapshotRedefine(virDomainPtr dom,
char *currentSnapshotXmlFilePath = NULL;
PRUnichar *machineNameUtf16 = NULL;
char *machineName = NULL;
g_auto(GStrv) realReadWriteDisksPath = NULL;
int realReadWriteDisksPathSize = 0;
g_auto(GStrv) realReadOnlyDisksPath = NULL;
int realReadOnlyDisksPathSize = 0;
virVBoxSnapshotConfSnapshot *newSnapshotPtr = NULL;
unsigned char snapshotUuid[VIR_UUID_BUFLEN];
virVBoxSnapshotConfHardDisk **hardDiskToOpen = NULL;
size_t hardDiskToOpenSize = 0;
virVBoxSnapshotConfHardDisk *newHardDisk = NULL;
g_auto(GStrv) searchResultTab = NULL;
ssize_t resultSize = 0;
int it = 0;
@ -4668,102 +5164,10 @@ vboxSnapshotRedefine(virDomainPtr dom,
}
if (snapshotFileExists) {
/*
* We have created fake disks, so we have to remove them and replace them with
* the read-write disks if there are any. The fake disks will be closed during
* the machine unregistration.
*/
if (virVBoxSnapshotConfRemoveFakeDisks(snapshotMachineDesc) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to remove Fake Disks"));
if (vboxSnapshotReplaceRWDisks(data, snapshotMachineDesc,
currentSnapshotXmlFilePath) < 0)
goto cleanup;
}
realReadWriteDisksPathSize = virVBoxSnapshotConfGetRWDisksPathsFromLibvirtXML(currentSnapshotXmlFilePath,
&realReadWriteDisksPath);
realReadOnlyDisksPathSize = virVBoxSnapshotConfGetRODisksPathsFromLibvirtXML(currentSnapshotXmlFilePath,
&realReadOnlyDisksPath);
/* The read-only disk number is necessarily greater or equal to the
* read-write disk number */
if (realReadOnlyDisksPathSize < realReadWriteDisksPathSize) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("The read only disk number must be greater or equal to the read write disk number"));
goto cleanup;
}
for (it = 0; it < realReadWriteDisksPathSize; it++) {
virVBoxSnapshotConfHardDisk *readWriteDisk = NULL;
PRUnichar *locationUtf = NULL;
IMedium *readWriteMedium = NULL;
char *uuid = NULL;
PRUnichar *formatUtf = NULL;
char *format = NULL;
const char *parentUuid = NULL;
vboxIID iid;
VBOX_IID_INITIALIZE(&iid);
VBOX_UTF8_TO_UTF16(realReadWriteDisksPath[it], &locationUtf);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&readWriteMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf);
rc = gVBoxAPI.UIMedium.GetId(readWriteMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get the read write medium id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetFormat(readWriteMedium, &formatUtf);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get the read write medium format"));
goto cleanup;
}
VBOX_UTF16_TO_UTF8(formatUtf, &format);
VBOX_UTF16_FREE(formatUtf);
readWriteDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
readWriteDisk->format = format;
readWriteDisk->uuid = uuid;
readWriteDisk->location = realReadWriteDisksPath[it];
/*
* We get the current snapshot's read-only disk uuid in order to add the
* read-write disk to the media registry as its child. The read-only disk
* is already in the media registry because it is the fake disk's parent.
*/
parentUuid = virVBoxSnapshotConfHardDiskUuidByLocation(snapshotMachineDesc,
realReadOnlyDisksPath[it]);
if (parentUuid == NULL) {
VIR_FREE(readWriteDisk);
goto cleanup;
}
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(readWriteDisk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to media Registry"));
VIR_FREE(readWriteDisk);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.Close(readWriteMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
goto cleanup;
}
}
/*
* Now we have done this swap, we remove the snapshot xml file from the
* current machine location.
@ -4779,106 +5183,8 @@ vboxSnapshotRedefine(virDomainPtr dom,
* read-only disks are in the redefined snapshot's media registry (the disks need to
* be open to query their uuid).
*/
for (it = 0; it < def->parent.dom->ndisks; it++) {
int diskInMediaRegistry = 0;
IMedium *readOnlyMedium = NULL;
PRUnichar *locationUtf = NULL;
char *uuid = NULL;
PRUnichar *formatUtf = NULL;
char *format = NULL;
char *parentUuid = NULL;
virVBoxSnapshotConfHardDisk *readOnlyDisk = NULL;
vboxIID iid, parentiid;
IMedium *parentReadOnlyMedium = NULL;
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
diskInMediaRegistry = virVBoxSnapshotConfDiskIsInMediaRegistry(snapshotMachineDesc,
def->parent.dom->disks[it]->src->path);
if (diskInMediaRegistry == -1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to know if disk is in media registry"));
goto cleanup;
}
if (diskInMediaRegistry == 1) /* Nothing to do. */
continue;
/* The read only disk is not in the media registry */
VBOX_UTF8_TO_UTF16(def->parent.dom->disks[it]->src->path, &locationUtf);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&readOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf);
rc = gVBoxAPI.UIMedium.GetId(readOnlyMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetFormat(readOnlyMedium, &formatUtf);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk format"));
VIR_FREE(uuid);
goto cleanup;
}
VBOX_UTF16_TO_UTF8(formatUtf, &format);
VBOX_UTF16_FREE(formatUtf);
/* This disk is already in the media registry */
rc = gVBoxAPI.UIMedium.GetParent(readOnlyMedium, &parentReadOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get parent hard disk"));
VIR_FREE(uuid);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetId(parentReadOnlyMedium, &parentiid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
VIR_FREE(uuid);
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
rc = gVBoxAPI.UIMedium.Close(readOnlyMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
VIR_FREE(uuid);
VIR_FREE(parentUuid);
goto cleanup;
}
readOnlyDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
readOnlyDisk->format = format;
readOnlyDisk->uuid = uuid;
readOnlyDisk->location = g_strdup(def->parent.dom->disks[it]->src->path);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(readOnlyDisk, snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to media registry"));
VIR_FREE(readOnlyDisk);
goto cleanup;
}
}
if (vboxSnapshotAddDisksToMediaRegistry(data, def, snapshotMachineDesc) < 0)
goto cleanup;
/* Now, we can unregister the machine */
rc = gVBoxAPI.UIMachine.Unregister(machine,
@ -5062,243 +5368,20 @@ vboxSnapshotRedefine(virDomainPtr dom,
* If the snapshot to redefine is the current snapshot, we add read-write disks in
* the machine storage controllers.
*/
for (it = 0; it < def->ndisks; it++) {
IMedium *medium = NULL;
PRUnichar *locationUtf16 = NULL;
virVBoxSnapshotConfHardDisk *disk = NULL;
PRUnichar *formatUtf16 = NULL;
char *format = NULL;
char *uuid = NULL;
IMedium *parentDisk = NULL;
char *parentUuid = NULL;
vboxIID iid, parentiid;
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
VBOX_UTF8_TO_UTF16(def->disks[it].src->path, &locationUtf16);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf16,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
disk = g_new0(virVBoxSnapshotConfHardDisk, 1);
rc = gVBoxAPI.UIMedium.GetFormat(medium, &formatUtf16);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk format"));
VIR_FREE(disk);
goto cleanup;
}
VBOX_UTF16_TO_UTF8(formatUtf16, &format);
disk->format = format;
VBOX_UTF16_FREE(formatUtf16);
disk->location = g_strdup(def->disks[it].src->path);
rc = gVBoxAPI.UIMedium.GetId(medium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk uuid"));
VIR_FREE(disk);
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
disk->uuid = uuid;
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UIMedium.GetParent(medium, &parentDisk);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get disk parent"));
VIR_FREE(disk);
goto cleanup;
}
gVBoxAPI.UIMedium.GetId(parentDisk, &parentiid);
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(disk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to the media registry"));
VIR_FREE(disk);
goto cleanup;
}
if (needToChangeStorageController) {
/* We need to append this disk in the storage controller */
char *tmp = NULL;
resultSize = virStringSearch(snapshotMachineDesc->storageController,
VBOX_UUID_REGEX,
it + 1,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to find UUID %1$s"), searchResultTab[it]);
goto cleanup;
}
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
disk->uuid);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
snapshotMachineDesc->storageController = g_strdup(tmp);
VIR_FREE(tmp);
}
/* Close disk */
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close HardDisk"));
goto cleanup;
}
if (vboxSnapshotAddRWDisks(data, def, snapshotMachineDesc,
needToChangeStorageController) < 0) {
goto cleanup;
}
} else {
char *snapshotContent;
/* Create a "fake" disk to avoid corrupting children snapshot disks. */
for (it = 0; it < def->parent.dom->ndisks; it++) {
IMedium *medium = NULL;
PRUnichar *locationUtf16 = NULL;
char *parentUuid = NULL;
IMedium *newMedium = NULL;
PRUnichar *formatUtf16 = NULL;
PRUnichar *newLocation = NULL;
char *newLocationUtf8 = NULL;
resultCodeUnion resultCode;
char *uuid = NULL;
char *format = NULL;
char *tmp = NULL;
vboxIID iid, parentiid;
IProgress *progress = NULL;
PRUint32 tab[1];
VBOX_IID_INITIALIZE(&iid);
VBOX_IID_INITIALIZE(&parentiid);
VBOX_UTF8_TO_UTF16(def->parent.dom->disks[it]->src->path, &locationUtf16);
rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
locationUtf16,
DeviceType_HardDisk,
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf16);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
rc = gVBoxAPI.UIMedium.GetId(medium, &parentiid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get hard disk id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
vboxIIDUnalloc(&parentiid);
VBOX_UTF8_TO_UTF16("VDI", &formatUtf16);
newLocationUtf8 = g_strdup_printf("%sfakedisk-%d.vdi",
machineLocationPath, it);
VBOX_UTF8_TO_UTF16(newLocationUtf8, &newLocation);
rc = gVBoxAPI.UIVirtualBox.CreateHardDisk(data->vboxObj,
formatUtf16,
newLocation,
&newMedium);
VBOX_UTF16_FREE(newLocation);
VBOX_UTF16_FREE(formatUtf16);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to create HardDisk"));
goto cleanup;
}
tab[0] = MediumVariant_Diff;
gVBoxAPI.UIMedium.CreateDiffStorage(medium, newMedium, 1, tab, &progress);
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Error while creating diff storage, rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
VBOX_RELEASE(progress);
/*
* The differential newHardDisk is created, we add it to the
* media registry and the machine storage controllers.
*/
newHardDisk = g_new0(virVBoxSnapshotConfHardDisk, 1);
rc = gVBoxAPI.UIMedium.GetId(newMedium, &iid);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to get medium uuid"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
newHardDisk->uuid = uuid;
vboxIIDUnalloc(&iid);
newHardDisk->location = g_strdup(newLocationUtf8);
rc = gVBoxAPI.UIMedium.GetFormat(newMedium, &formatUtf16);
VBOX_UTF16_TO_UTF8(formatUtf16, &format);
newHardDisk->format = format;
VBOX_UTF16_FREE(formatUtf16);
if (virVBoxSnapshotConfAddHardDiskToMediaRegistry(newHardDisk,
snapshotMachineDesc->mediaRegistry,
parentUuid) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to add hard disk to the media registry"));
goto cleanup;
}
newHardDisk = NULL; /* Consumed by above */
/* Adding the fake disk to the machine storage controllers */
resultSize = virStringSearch(snapshotMachineDesc->storageController,
VBOX_UUID_REGEX,
it + 1,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to find UUID %1$s"), searchResultTab[it]);
goto cleanup;
}
tmp = virStringReplace(snapshotMachineDesc->storageController,
searchResultTab[it],
uuid);
VIR_FREE(snapshotMachineDesc->storageController);
if (!tmp)
goto cleanup;
snapshotMachineDesc->storageController = g_strdup(tmp);
VIR_FREE(tmp);
/* Closing the "fake" disk */
rc = gVBoxAPI.UIMedium.Close(newMedium);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to close the new medium"));
goto cleanup;
}
if (vboxSnapshotCreateFakeDiffStorage(data, def,
machineLocationPath,
snapshotMachineDesc) < 0) {
goto cleanup;
}
/*
* We save the snapshot xml file to retrieve the real read-write disk during the
* next define. This file is saved as "'machineLocation'/snapshot-'uuid'.xml"
@ -5387,7 +5470,6 @@ vboxSnapshotRedefine(virDomainPtr dom,
VIR_FREE(currentSnapshotXmlFilePath);
VBOX_UTF16_FREE(machineNameUtf16);
VBOX_UTF8_FREE(machineName);
virVboxSnapshotConfHardDiskFree(newHardDisk);
VIR_FREE(hardDiskToOpen);
VIR_FREE(newSnapshotPtr);
VIR_FREE(machineLocationPath);

View File

@ -408,6 +408,34 @@ cpuTestHasFeature(const void *arg)
}
static int
cpuTestValidateFeatures(const void *arg)
{
const struct data *data = arg;
g_autoptr(virCPUDef) cpu = NULL;
int result;
if (!(cpu = cpuTestLoadXML(data->arch, data->name)))
return -1;
result = virCPUValidateFeatures(data->arch, cpu);
if (data->result == -1)
virResetLastError();
if (data->result != result) {
VIR_TEST_VERBOSE("\nExpected result %s, got %s",
cpuTestBoolWithErrorStr(data->result),
cpuTestBoolWithErrorStr(result));
/* Pad to line up with test name ... in virTestRun */
VIR_TEST_VERBOSE("%74s", "... ");
return -1;
}
return 0;
}
typedef enum {
/* No JSON data from QEMU. */
JSON_NONE,
@ -986,6 +1014,10 @@ mymain(void)
host "/" feature " (" #result ")", \
host, feature, NULL, 0, NULL, 0, result)
#define DO_TEST_VALIDATEFEATURES(arch, name, result) \
DO_TEST(arch, cpuTestValidateFeatures, name, \
NULL, name, NULL, 0, NULL, 0, result)
#define DO_TEST_GUESTCPU(arch, host, cpu, models, result) \
DO_TEST(arch, cpuTestGuestCPU, \
host "/" cpu " (" #models ")", \
@ -1235,6 +1267,9 @@ mymain(void)
"Xeon-E5-2609-v3", "Xeon-E5-2650-v4");
DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell+Skylake",
"Xeon-E7-8890-v3", "Xeon-Gold-5115");
DO_TEST_VALIDATEFEATURES(VIR_ARCH_AARCH64, "guest", 0);
cleanup:
#if WITH_QEMU
qemuTestDriverFree(&driver);

View File

@ -0,0 +1,4 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>cortex-a57</model>
<feature name='pauth' policy='require'/>
</cpu>

View File

@ -0,0 +1,22 @@
<domainbackup mode='pull'>
<incremental>1525889631</incremental>
<server transport='fd' fdgroup='nbdfd'/>
<disks>
<disk name='vda' type='file'>
<scratch file='/path/to/file'/>
</disk>
<disk name='hda' backup='no'/>
<disk name='vdc' type='file' backupmode='full'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vdd' type='file' backupmode='incremental'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vde' type='file' backupmode='incremental' incremental='blah'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vdf' type='file' incremental='bleh'>
<scratch file='/path/to/file'/>
</disk>
</disks>
</domainbackup>

View File

@ -0,0 +1,23 @@
<domainbackup mode='pull'>
<incremental>1525889631</incremental>
<server transport='fd' fdgroup='nbdfd'/>
<disks>
<disk name='vda' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
<scratch file='/path/to/file'/>
</disk>
<disk name='hda' backup='no'/>
<disk name='vdc' backup='yes' type='file' backupmode='full'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vdd' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vde' backup='yes' type='file' backupmode='incremental' incremental='blah'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vdf' backup='yes' type='file' backupmode='incremental' incremental='bleh'>
<scratch file='/path/to/file'/>
</disk>
<disk name='vdextradisk' backup='no'/>
</disks>
</domainbackup>

View File

@ -245,6 +245,7 @@ mymain(void)
DO_TEST_BACKUP("empty");
DO_TEST_BACKUP("backup-pull");
DO_TEST_BACKUP("backup-pull-unix");
DO_TEST_BACKUP("backup-pull-fd");
DO_TEST_BACKUP("backup-pull-seclabel");
DO_TEST_BACKUP("backup-pull-encrypted");
DO_TEST_BACKUP("backup-push");

View File

@ -0,0 +1,101 @@
{
"c_info": {
"type": "hvm",
"name": "test-hvm",
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
},
"b_info": {
"max_vcpus": 4,
"avail_vcpus": [
0,
1,
2,
3
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"video_memkb": 8192,
"shadow_memkb": 1234,
"device_model_version": "qemu_xen",
"device_model": "/bin/true",
"sched_params": {
},
"apic": "True",
"acpi": "True",
"type.hvm": {
"pae": "True",
"viridian_enable": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"vga": {
"kind": "cirrus"
},
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
},
"spice": {
},
"boot": "c",
"rdm": {
}
},
"arch_arm": {
}
},
"disks": [
{
"pdev_path": "/var/lib/xen/images/test-hvm.img",
"vdev": "hda",
"backend": "qdisk",
"format": "raw",
"removable": 1,
"readwrite": 1
}
],
"nics": [
{
"devid": 0,
"mac": "00:16:3e:66:12:b4",
"bridge": "br0",
"script": "/etc/xen/scripts/vif-bridge",
"nictype": "vif_ioemu"
}
],
"vfbs": [
{
"devid": -1,
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
}
}
],
"vkbs": [
{
"devid": -1
}
],
"on_reboot": "restart"
}

View File

@ -0,0 +1,45 @@
<domain type='xen'>
<name>test-hvm</name>
<description>None</description>
<uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<clock offset='utc'/>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<apic/>
<acpi/>
<pae/>
<hyperv>
<vapic state='on'/>
<vpindex state='on'/>
<synic state='on'/>
<stimer state='on'/>
<frequencies state='on'/>
<tlbflush state='on'/>
<ipi state='on'/>
</hyperv>
</features>
<devices>
<emulator>/bin/true</emulator>
<disk type='file' device='disk'>
<driver name='qemu'/>
<source file='/var/lib/xen/images/test-hvm.img'/>
<target dev='hda'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:66:12:b4'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
</devices>
</domain>

View File

@ -0,0 +1,99 @@
{
"c_info": {
"type": "hvm",
"name": "test-hvm",
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
},
"b_info": {
"max_vcpus": 4,
"avail_vcpus": [
0,
1,
2,
3
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"video_memkb": 8192,
"shadow_memkb": 1234,
"device_model_version": "qemu_xen",
"device_model": "/bin/true",
"sched_params": {
},
"apic": "True",
"acpi": "True",
"type.hvm": {
"pae": "True",
"viridian_enable": [
0,
2,
3,
4,
6,
7,
8,
9
],
"vga": {
"kind": "cirrus"
},
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
},
"spice": {
},
"boot": "c",
"rdm": {
}
},
"arch_arm": {
}
},
"disks": [
{
"pdev_path": "/var/lib/xen/images/test-hvm.img",
"vdev": "hda",
"backend": "qdisk",
"format": "raw",
"removable": 1,
"readwrite": 1
}
],
"nics": [
{
"devid": 0,
"mac": "00:16:3e:66:12:b4",
"bridge": "br0",
"script": "/etc/xen/scripts/vif-bridge",
"nictype": "vif_ioemu"
}
],
"vfbs": [
{
"devid": -1,
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
}
}
],
"vkbs": [
{
"devid": -1
}
],
"on_reboot": "restart"
}

View File

@ -0,0 +1,42 @@
<domain type='xen'>
<name>test-hvm</name>
<description>None</description>
<uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<clock offset='utc'/>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<apic/>
<acpi/>
<pae/>
<hyperv mode="custom">
<synic state='on'/>
<stimer state='on'/>
<tlbflush state='on'/>
<ipi state='on'/>
</hyperv>
</features>
<devices>
<emulator>/bin/true</emulator>
<disk type='file' device='disk'>
<driver name='qemu'/>
<source file='/var/lib/xen/images/test-hvm.img'/>
<target dev='hda'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:66:12:b4'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
</devices>
</domain>

View File

@ -0,0 +1,155 @@
{
"c_info": {
"type": "hvm",
"name": "test-hvm",
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
},
"b_info": {
"max_vcpus": 4,
"avail_vcpus": [
0,
1,
2,
3
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"video_memkb": 8192,
"shadow_memkb": 1234,
"device_model_version": "qemu_xen",
"device_model": "/bin/true",
"sched_params": {
},
"apic": "True",
"acpi": "True",
"type.hvm": {
"pae": "True",
"viridian_enable": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63
],
"vga": {
"kind": "cirrus"
},
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
},
"spice": {
},
"boot": "c",
"rdm": {
}
},
"arch_arm": {
}
},
"disks": [
{
"pdev_path": "/var/lib/xen/images/test-hvm.img",
"vdev": "hda",
"backend": "qdisk",
"format": "raw",
"removable": 1,
"readwrite": 1
}
],
"nics": [
{
"devid": 0,
"mac": "00:16:3e:66:12:b4",
"bridge": "br0",
"script": "/etc/xen/scripts/vif-bridge",
"nictype": "vif_ioemu"
}
],
"vfbs": [
{
"devid": -1,
"vnc": {
"enable": "True",
"listen": "0.0.0.0",
"findunused": "False"
},
"sdl": {
"enable": "False"
}
}
],
"vkbs": [
{
"devid": -1
}
],
"on_reboot": "restart"
}

View File

@ -0,0 +1,37 @@
<domain type='xen'>
<name>test-hvm</name>
<description>None</description>
<uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<clock offset='utc'/>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<apic/>
<acpi/>
<pae/>
<hyperv mode="passthrough"/>
</features>
<devices>
<emulator>/bin/true</emulator>
<disk type='file' device='disk'>
<driver name='qemu'/>
<source file='/var/lib/xen/images/test-hvm.img'/>
<target dev='hda'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:66:12:b4'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
</devices>
</domain>

View File

@ -211,6 +211,14 @@ mymain(void)
DO_TEST("single-serial");
DO_TEST("multiple-serial");
# ifdef LIBXL_HAVE_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE
DO_TEST("viridian-hvm");
DO_TEST("viridian-hvm-full");
# if LIBXL_BUILDINFO_HVM_VIRIDIAN_ENABLE_DISABLE_WIDTH == 64
DO_TEST("viridian-passthrough");
# endif
# endif
unlink("libxl-driver.log");
testXLFreeDriver(driver);

View File

@ -56,7 +56,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
@ -72,7 +71,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
@ -128,7 +126,6 @@
<flag name='usb-mtp'/>
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<flag name='chardev-reconnect-miliseconds'/>
<flag name='virtio-ccw.loadparm'/>
<flag name='netdev-stream-reconnect-miliseconds'/>

View File

@ -108,7 +108,6 @@
<flag name='egl-headless.rendernode'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -133,7 +132,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -201,7 +199,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<flag name='chardev-reconnect-miliseconds'/>
<flag name='netdev-stream-reconnect-miliseconds'/>
<flag name='migrate-incoming.exit-on-error'/>

View File

@ -108,7 +108,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -133,7 +132,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -200,7 +198,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<flag name='chardev-reconnect-miliseconds'/>
<flag name='netdev-stream-reconnect-miliseconds'/>
<flag name='migrate-incoming.exit-on-error'/>

View File

@ -80,7 +80,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -100,7 +99,6 @@
<flag name='spapr-tpm-proxy'/>
<flag name='numa.hmat'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -132,7 +130,6 @@
<flag name='display-reload'/>
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<version>6002000</version>
<microcodeVersion>42900244</microcodeVersion>
<package>v6.2.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -174,7 +172,6 @@
<flag name='display-reload'/>
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<version>6002000</version>
<microcodeVersion>43100244</microcodeVersion>
<package>v6.2.0</package>

View File

@ -89,7 +89,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -111,7 +110,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -151,7 +149,6 @@
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>7000000</version>
<microcodeVersion>42900243</microcodeVersion>
<package>v7.0.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -182,7 +180,6 @@
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>7000000</version>
<microcodeVersion>43100243</microcodeVersion>
<package>v7.0.0</package>

View File

@ -86,7 +86,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -108,7 +107,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -152,7 +150,6 @@
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>7001000</version>
<microcodeVersion>42900244</microcodeVersion>
<package>v7.1.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -187,7 +185,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>7001000</version>
<microcodeVersion>43100244</microcodeVersion>
<package>v7.1.0</package>

View File

@ -81,7 +81,6 @@
<flag name='egl-headless.rendernode'/>
<flag name='memory-backend-file.pmem'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -100,7 +99,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -147,7 +145,6 @@
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>7002000</version>
<microcodeVersion>0</microcodeVersion>
<package>qemu-7.2.0-6.fc37</package>

View File

@ -108,7 +108,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -134,7 +133,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -191,7 +189,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>7002000</version>
<microcodeVersion>43100245</microcodeVersion>
<package>v7.2.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -191,7 +189,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>7002000</version>
<microcodeVersion>43100245</microcodeVersion>
<package>v7.2.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -195,7 +193,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>8000000</version>
<microcodeVersion>43100244</microcodeVersion>
<package>v8.0.0</package>

View File

@ -53,7 +53,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
@ -69,7 +68,6 @@
<flag name='virtio-blk-pci.scsi.default.disabled'/>
<flag name='numa.hmat'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
@ -115,7 +113,6 @@
<flag name='display-reload'/>
<flag name='usb-mtp'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<version>8001000</version>
<microcodeVersion>39100245</microcodeVersion>
<package>v8.1.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -197,7 +195,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>8001000</version>
<microcodeVersion>43100245</microcodeVersion>
<package>v8.1.0</package>

View File

@ -85,7 +85,6 @@
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='machine.virt.iommu'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -106,7 +105,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -162,7 +160,6 @@
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>8002000</version>
<microcodeVersion>61700246</microcodeVersion>
<package>v8.2.0</package>

View File

@ -90,7 +90,6 @@
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='machine.virt.iommu'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -110,7 +109,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -169,7 +167,6 @@
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>8002000</version>
<microcodeVersion>0</microcodeVersion>
<package>qemu-8.2.0-7.fc39</package>

View File

@ -79,7 +79,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -99,7 +98,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -152,7 +150,6 @@
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<version>8002000</version>
<microcodeVersion>106300246</microcodeVersion>
<package>v8.2.0</package>

View File

@ -53,7 +53,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
@ -69,7 +68,6 @@
<flag name='virtio-blk-pci.scsi.default.disabled'/>
<flag name='numa.hmat'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
@ -116,7 +114,6 @@
<flag name='usb-mtp'/>
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<version>8002000</version>
<microcodeVersion>39100246</microcodeVersion>
<package>v8.2.0</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -200,7 +198,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>8002000</version>
<microcodeVersion>43100246</microcodeVersion>
<package>v8.2.0</package>

View File

@ -23,7 +23,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='memory-backend-file.pmem'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='drive-nvme'/>
@ -33,7 +32,6 @@
<flag name='aio.io_uring'/>
<flag name='tcg'/>
<flag name='numa.hmat'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='ncr53c90'/>
<flag name='memory-backend-file.x-use-canonical-path-for-ramblock-id'/>
@ -72,7 +70,6 @@
<flag name='blockjob.backing-mask-protocol'/>
<flag name='display-reload'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<version>9000000</version>
<microcodeVersion>0</microcodeVersion>
<package>qemu-9.0.0-1.fc40</package>

View File

@ -109,7 +109,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -135,7 +134,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -202,7 +200,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<version>9000000</version>
<microcodeVersion>43100245</microcodeVersion>
<package>v9.0.0</package>

View File

@ -83,7 +83,6 @@
<flag name='egl-headless.rendernode'/>
<flag name='memory-backend-file.pmem'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
@ -102,7 +101,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -160,7 +158,6 @@
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<flag name='migrate-incoming.exit-on-error'/>
<flag name='machine.virt.aia'/>
<version>9001000</version>

View File

@ -56,7 +56,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
@ -72,7 +71,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
@ -125,7 +123,6 @@
<flag name='usb-mtp'/>
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<flag name='query-cpu-model-expansion.deprecated-props'/>
<flag name='migrate-incoming.exit-on-error'/>
<version>9001000</version>

View File

@ -108,7 +108,6 @@
<flag name='memory-backend-file.pmem'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<flag name='canonical-cpu-features'/>
@ -133,7 +132,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -200,7 +198,6 @@
<flag name='acpi-erst'/>
<flag name='intel-iommu.dma-translation'/>
<flag name='machine-i8042-opt'/>
<flag name='snapshot-internal-qmp'/>
<flag name='migrate-incoming.exit-on-error'/>
<version>9001000</version>
<microcodeVersion>43100246</microcodeVersion>

View File

@ -66,7 +66,6 @@
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='machine.virt.iommu'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='dbus-vmstate'/>
<flag name='ramfb'/>
@ -81,7 +80,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
@ -132,7 +130,6 @@
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='acpi-erst'/>
<flag name='snapshot-internal-qmp'/>
<flag name='chardev-reconnect-miliseconds'/>
<flag name='netdev-stream-reconnect-miliseconds'/>
<flag name='migrate-incoming.exit-on-error'/>

View File

@ -56,7 +56,6 @@
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='egl-headless.rendernode'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
@ -72,7 +71,6 @@
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
@ -125,7 +123,6 @@
<flag name='usb-mtp'/>
<flag name='virtio-sound'/>
<flag name='netdev.user'/>
<flag name='snapshot-internal-qmp'/>
<flag name='chardev-reconnect-miliseconds'/>
<flag name='virtio-ccw.loadparm'/>
<flag name='netdev-stream-reconnect-miliseconds'/>

Some files were not shown because too many files have changed in this diff Show More