Compare commits

...

79 Commits

Author SHA1 Message Date
antonios-f
5609eed33f Merge branch 'spice-vnc-default-audio-backend' into 'master'
src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend

See merge request libvirt/libvirt!271
2024-04-06 06:09:01 +00:00
Benjamin Taubmann
a39dd25715 Extend libvirt-guests to shutdown only persistent VMs
At the moment, there is no configuration option for the libvirt-guests
service that allows users to define that only persistent virtual machines
should be shutdown on host shutdown.

Currently, the service config allows to choose between two ON_SHUTDOWN
actions that are executed on running virtual machines when the host goes
down: shutdown, suspend.
The ON_SHUTDOWN action should be orthogonal to the type of the virtual
machine. However, the existing implementation, does not suspend
transient virtual machines.
This is the matrix of actions that is executed on virtual machines based
on the configured ON_SHUTDOWN action and the type of a virtual machine.

         | persistent | transient
shutdown | shutdown   | shutdown (what we want to change)
suspend  | suspend    | nothing

Add config option PERSISTENT_ONLY to libvirt-guests config that allows
users to define if the ON_SHUTDOWN action should be applied only on
persistent virtual machines. PERSISTENT_ONLY can be set to true, false,
default. The default option will implement the already existing logic.

Case 1: PERSISTENT_ONLY=default
         | persistent | transient
shutdown | shutdown   | shutdown
suspend  | suspend    | nothing

Case 2: PERSISTENT_ONLY=true
         | persistent | transient
shutdown | shutdown   | nothing
suspend  | suspend    | nothing

Case 3: PERSISTENT_ONLY=false
         | persistent | transient
shutdown | shutdown   | shutdown
suspend  | suspend    | suspend

Signed-off-by: Benjamin Taubmann <benjamin.taubmann@nutanix.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-04-04 09:10:00 +02:00
Marc Hartmayer
5138dd2478 node_device_conf: virNodeDeviceGetSCSITargetCaps: fix memory leak
Make sure the old value in `scsi_target->wwpn` is free'd before replacing it.
While at it, simplify the code.

==9104== 38 bytes in 2 blocks are definitely lost in loss record 1,943 of 3,250
==9104==    at 0x483B8C0: malloc (vg_replace_malloc.c:442)
==9104==    by 0x4DFB69B: g_malloc (gmem.c:130)
==9104==    by 0x4E1921D: g_strdup (gstrfuncs.c:363)
==9104==    by 0x495D60B: g_strdup_inline (gstrfuncs.h:321)
==9104==    by 0x495D60B: virFCReadRportValue (virfcp.c:62)
==9104==    by 0x4A5F5CB: virNodeDeviceGetSCSITargetCaps (node_device_conf.c:2914)
==9104==    by 0xBF62529: udevProcessSCSITarget (node_device_udev.c:657)
==9104==    by 0xBF62529: udevGetDeviceDetails (node_device_udev.c:1406)
==9104==    by 0xBF62529: udevAddOneDevice (node_device_udev.c:1563)
==9104==    by 0xBF639B5: udevProcessDeviceListEntry (node_device_udev.c:1637)
==9104==    by 0xBF639B5: udevEnumerateDevices (node_device_udev.c:1691)
==9104==    by 0xBF639B5: nodeStateInitializeEnumerate (node_device_udev.c:2009)
==9104==    by 0x49BDBFD: virThreadHelper (virthread.c:256)
==9104==    by 0x5242069: start_thread (in /usr/lib64/libc.so.6)

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-04 09:05:11 +02:00
Peter Krempa
e2a7dd3f7e qemucapabilitiestest: Update qemu-9.0 capabilities for RC1
Update the capabilities to v9.0.0-rc1-55-g7fcf7575f3

Notable changes:
 - Q35 machine now supports 4096 cpus

 - 'kvm-asyncpf-vmexit' cpu feature added
 - 'x2apic' cpu feature is now migratable

 - LUKS detached header support added
 - LUKS sm4 cipher alg support added

 - 'console' chardev backend type removed
 - 'memory' chardev backend type deprecated

 - 'mapped-ram' migration capability added
 - 'zero-page-detection' migration parameter added

 - 'acpi-generic-initiator' 'object' added

 - 'request-ebpf' QMP command added

 - 'legacy-reset', 'resettable-container', 'vhost-user-snd*' QOM types
   added

 - 'vdpa' property added for following device models:
    - virtio-balloon-pci
    - virtio-blk-pci
    - virtio-gpu-pci
    - virtio-iommu-pci
    - virtio-mem-pci
    - virtio-net-pci
    - virtio-scsi-pci

 - 'win2k-install-hack' property of 'ide-hd' added
 - 'aw-bits', 'granule', properties of 'virtio-iommu-pci' added
 - 'ebpf-rss-fds' property of 'virtio-net-pci' added

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-04-03 10:41:45 +02:00
Rayhan Faizel
6c62ee7933 tests: Add testcase for usb-net
Add small test case to demonstrate use of usb-net with user networking
backend.

Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-03 10:40:32 +02:00
Rayhan Faizel
e18c69bcd8 conf: Automatically assign address to usb-net device
This patch will allow usb-net devices to be automatically assigned a USB
address (and skip any attempt to assign a PCI one).

Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-03 10:40:14 +02:00
Denis V. Lunev
d37a4aa69c remote: properly initialize objects in ACL helpers
Commit 2ecdf25929 was intended to
implement two things: reduce stack usage inside ACL helpers and
minimally initialize virDomainDef object to avoid passing garbage
inside validation framework. Though original commit has not
touched other ACL helpers.

This patch adds proper clauses to
    remoteRelayNetworkEventCheckACL
    remoteRelayStoragePoolEventCheckACL
    remoteRelayNodeDeviceEventCheckACL
    remoteRelaySecretEventCheckACL

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-03 09:34:35 +02:00
Brett Holman
b902cfece0 virsysinfo: Try reading DMI table
Add DMI support for risc-v and mips. Attempt to read dmidecode and
fall back to old behavior if that fails.

The SMBIOS specification[1] officially supports both RISC-V and LoongArch.
Some mips-based Loongson-3 processors also have SMBIOS.

[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.0.pdf

Signed-off-by: Brett Holman <brett.holman@canonical.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2024-04-02 16:58:47 -06:00
Jonathon Jongsma
21af003084 qemu: enable display/ramfb for vfio pci hostdevs
Implement display="on" and ramfb="on" for vfio PCI host devices in qemu.
This enables passthrough PCI devices for display just like we did for
mdevs.

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

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-02 11:45:54 -05:00
Jonathon Jongsma
092f933a62 conf: allow display and ramfb for vfio pci hostdevs
We already allow the user to specify display="on" and ramfb="on" for
mdev host devices. But newer GPU models will no longer use the mdev
framework, so we should enable this same functionality for other
non-mdev passthrough PCI devices.

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

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-02 11:45:54 -05:00
Andrea Bolognani
16d37076be virsh: Show 'connected to console' message later
Right now, we display the message before actually attempting
to connect to the VM console. That operation, however, can
fail for a number of reasons: for example, is the VM doesn't
have a serial device, the output ends up looking like

  $ virsh console cirros
  Connected to domain 'cirros'
  Escape character is ^] (Ctrl + ])
  error: internal error: cannot find character device <null>

The initial message is misleading. Change things so that it's
only printed if we actually successfully connected to the VM
console.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-02 18:26:35 +02:00
Peter Krempa
1e853a64dd tests: Drop 'test-lib.sh'
We no longer have any shell-based tests that use it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
1f82833251 virshtest: Adapt virsh-uriprecedence test case
Reimplement the virsh-uriprecedence test case in virshtest. To do this
we need to add infrastructure to pass extra environment variables to the
tested virsh.

The user config files are shipped in repo rather than created in the
script.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
e57ce7fb45 tests: Reimplement 'libvirtd-fail' case directly in meson
The test simply invokes libvirtd and expects it to fail. We can do that
directly in meson without the need for a wrapper script.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
8f10dd32af tests: Re-implement '(virsh|virt-admin)-self-test' directly in meson
The self-test command for both virsh and virt-admin is self contained
and directly reports success, thus we don't actually need to run a shell
wrapper around it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
c92c63a5a3 virshtest: Adapt 'libvirtd-pool'
The test case is a fairly simple invocation of pool-create-as which can
be done easily from 'virshtest'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
3ace963662 virshtest: Adapt 'virsh-read-bufsiz' and 'virsh-read-non-seekable'
Test both situations (reading from non-regular file and reading a file
larger than (arbitrary) buffer size) via 'virshtest'.

To feed the pipe we need to create a thread that does it, but otherwise
it's fairly straightforward.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
60cc7bd1c0 virshtest: Adapt 'virsh-checkpoint' test
Invoke the majority of the command via DO_TEST_SCRIPT in 'virshtest'.
Some adaptation was needed to avoid printing of tables with volatile
data such as checkpoint creation time, which were converted to list
names-only.

To proprely test redefinition we store XMLs rather than taking them from
the defined checkpoints and use them separately to test redefinition of
checkpoint XMLs. This makes use of the 'cd' command in non-interactive
mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
c8d5703150 virshtest: Adapt 'virsh-snapshot' test
Invoke the majority of the command via DO_TEST_SCRIPT in 'virshtest'.
Some adaptation was needed to avoid printing of tables with volatile
data such as snapshot creation time, which were converted to list
names-only.

To proprely test redefinition we store XMLs rather than taking them from
the defined snapshots and use them separately to test redefinition of
snapshot XMLs. This makes use of the 'cd' command in non-interactive
mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
eb82c632e3 vsh: Allow non-interactive use of 'cd' command
For testing purposes it will come handy to change the directory from a
batch-mode script. Remove the check forbidding use of the 'cd' command
in batch mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
6193c4656e virsh: Fix '--name' and '--parent' used together in '(snapshot|checkpoint)-list' command
Until now when '--name' was used the parent was not printed and the
option was ignored. One option would be to declare the options mutually
exclusive, but for testing it may come handy to print both the snapshot
name and parent. Adjust the code to print them tab-separated and adjust
the docs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
a068dec641 virshtest: Adapt 'virsh-start' and 'virsh-undefine' tests as 'lifecycle' case
The 'virsh-start' case simply tried to start an already running VM. This
can be easily tested together with the tests for undefining a VM.

For this test the test driver config with multiple VMs comes handy as we
need to test 3 situations when we undefine and stop the VM.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
6bc71ed27c virshtest: Adapt 'virsh-schedinfo'
It's a simple virsh invocation which can be done in 'virshtest'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
090ae2b46c virshtest: Adapt 'virsh-int-overflow'
It's a simple test case invoking one virsh command thus it can be moved
to 'virshtest'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
d8e2220c9a virshtest: Adapt 'virsh-vcpupin' test
As all cases are negative we can test them all in one virsh run.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
630b229bc9 qemuxmlconftest: Adapt XMLs from 'virsh-cpuset' and 'virsh-define-dev-segfault' cases
Rather than using 'virsh define' for the tests use the XML (or idea what
the XML is testing) and use them as 'qemuxmlconftest' cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
c96ac614a8 virshtest: Reimplement 'virsh-output' test
Adapt the 'tests/virsh-output-commands' file from 'virsh-output' test as
a source. Apart from expanding the bash function to each command, I've
also had to drop the negative tests for argument population, as a
command parsing error aborts the execution of the script right away
rather than just reporting the error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
06f816cb7b virshtest: Adapt 'event' option arg handling tests from 'virsh-optparse'
Move the argument parsing tests excercising 'virsh event' options
from 'virsh-optparse' to 'virshtest'.

As the test invokes 'virsh event' with a timeout and thus waits for one
second pointlessly the patch also adds infrastructure to mark individual
cases as expensive and is skipped normally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
2aec9b399b virshtest: Adapt numeric option arg handling tests from 'virsh-optparse'
Move the argument parsing tests excercising various numeric options
(except 'virsh event') from 'virsh-optparse' to 'virshtest'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
6a2712262e virshtest: Adapt 'snapshot-create-as' arg handling tests from 'virsh-optparse'
Move the argument parsing tests excercising 'virsh snapshot-create-as'
from 'virsh-optparse' to 'virshtest'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
1b3f148866 virshtest: Adapt argument parsing tests from 'virsh-optparse'
Move the argument parsing tests excercising 'virsh setvcpus' from
'virsh-optparse' to 'virshtest'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
52fc03ef21 virshtest: Drop support for testing against hardcoded strings
Now that all tests were converted, this is no longer needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
cf0d80344e virshtest: Adapt 'iothread' tests to DO_TEST_SCRIPT
Adapt the tests to be invoked in one run. Note that multiple fake VMs
were used for the distinct tests so that they don't influence each
other.

This is the final coversion of tests to run in batch mode which halved
the runtime of 'virshtest' on my machine (1.11s vs 2.33s).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
b65f3a01a8 virshtest: Adapt 'blkiotune' tests to DO_TEST_SCRIPT
The query and update can be tested in one run and validated against
files rather than hardcoded strings.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
a5e203417a virshtest: Adapt tests for domain id lookup and state query to DO_TEST_SCRIPT
All of the commands can be tested in one 'virsh' run in batch mode and
tested against a file rather than hardcoded strings.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
4b8581b8ef virshtest: Replace list and nodeinfo tests by equivalent VIR_TEST_SCRIPT variant
Add the basic list and info commands into a script and run it via
VIR_TEST_RUN_SCRIPT to simplify the code and save up on 'virsh'
instances exec'd for the test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
e8e79e38e5 virshtest: Drop string form of expected output data of "echo" tests
Now that the output is tested against files these are not needed any
more. The brief existence of both proved that the output is identical.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
d15b79a35c virshtest: Test against output files ("echo" tests)
Managing output files is much simpler especially with
VIR_TEST_REGENERATE_OUTPUT compared to putting the expected string blobs
into the C source file.

For now the output is tested both against the hardcoded strings as well
as the output files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
c63b5ee98b virshtest: Prepare for simpler testing - echo tests
Embedding the expected output in a C source code makes it very hard to
extend tests. In order to be able to test the outputs against data in
files on disk we need better naming of the tests themselves.

Use virTestCounterNext/Reset with appropriate tags to give reasonable
names to the 'virsh echo' tests' and prepare the 'DO_TEST' macro for
wider use.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
5fd0653a39 virshtest: Adapt some 'escaping' tests via DO_TEST_SCRIPT
Express what's possible via a "virsh script" rather than invoking
separate virsh for each one.

We need to keep a few for parity as the argument parser behaves
differently when processing argv-like input compared to a string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
f3d205ad44 virshtest: Drop some redundant 'echo' cases
Both argument passing and multiple command handling is already tested in
the 'multiple commands' cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
7fca0d4d52 virshtest: Adapt 'echo --split' tests to DO_TEST_SCRIPT
Optimize invocation of the tests to share one 'virsh' binary as they
don't influence each other.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
fdaf2ffb04 virshtest: Add support for testing commands read from input file and adapt alias tests
Add support for reading a file and passing it to virsh in 'batch' mode
so that multiple commands can be easily tested with one invocation of
virsh.

To show how it's used adapt the alias handling tests to be invoked all
at once.

As in batch mode the arguments are read from a string and separated
inside virsh, one test is kept separate to be parsed in argv mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
f9dbd34c49 virshtest: Filter multiple occurences of string to drop in testFilterLine
Upcoming patches will require that possibly multiple occurences of the
string to drop are present in the output string thus we need to adapt
testFilterLine to handle them.

Additionally we drop the unused return value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
99392689cb virshtest: Allow to test failure of commands
Modify the test code so that if virsh fails both 'stdout' and 'stderr'
are captured and compared against the output and also the return value
is checked by appending it to the output.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
86bf707838 virshtest: Prepare for testing against output files
Modify testCompareOutputLit to take a filename argument and compare it
against and populate the arguments.

For tests which don't use the 'data' from virTestRun, we'll expect to
pass the output filename, thus we also propagate it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
de9dfeee9a vshCmdOptDef: Remove unused 'flags' member
Drop the last enum member VSH_OFLAG_NONE and remove the 'flags' variable
from vshCmdOptDef.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
4b44113d7b vsh: Replace 'VSH_OFLAG_EMPTY_OK' bitwise flag with a separate struct member
Replace the last bitwise flag with a separate member.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
8e39542a03 vsh: Make positional parsing of arguments opt-in
Switch the command parser from using the VSH_OFLAG_REQ_OPT flag
opting out from positional parsing of arguments to a combination of the
'positional' flags for truly positional arguments and
'unwanted_positional' preserving semantics for the existing arguments
where the parser did it due to bad design.

This patch retires VSH_OFLAG_REQ_OPT along with the infrastructure that
was needed to refactor all uses properly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
a67f737ddf virt-admin: Annodate 'unwanted_positional' arguments
Historically the command parser in virsh parses/fills even optional
arguments with values as if they were positional unless opted out using
VSH_OFLAG_REQ_OPT. This creates unexpected situations when commands can
break in this unwanted semantics:

 $ virsh snapshot-create-as --print-xml 1 2 3
 <domainsnapshot>
   <name>2</name>
   <description>3</description>
 </domainsnapshot>

To prevent any further addition annotate the rest of the arguments with
the 'unwanted_positional' flag, so that the parser can keep parsing them
as such but any further optional argument will not have this behaviour.

Certain arguments where it makes sense are annotated as 'positional' too
in this patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
100cbccecd virsh: Annodate 'unwanted_positional' arguments
Historically the command parser in virsh parses/fills even optional
arguments with values as if they were positional unless opted out using
VSH_OFLAG_REQ_OPT. This creates unexpected situations when commands can
break in this unwanted semantics:

 $ virsh snapshot-create-as --print-xml 1 2 3
 <domainsnapshot>
   <name>2</name>
   <description>3</description>
 </domainsnapshot>

To prevent any further addition annotate the rest of the arguments with
the 'unwanted_positional' flag, so that the parser can keep parsing them
as such but any further optional argument will not have this behaviour.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
32a89fc670 virsh: Annotate "unwanted_positional" arguments for 'pool-(define|create)-as' commands
Annotate arguments which can be unintentionally parsed positionally.
(See previous commits for explanation.)

All of these options were added in order thus we must declare all of
them as 'unwanted_positional'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:30 +02:00
Peter Krempa
e31cd46364 virsh: volume: Mark optional 'pool' argument as 'positional'
Annotate arguments which can be unintentionally parsed positionally.
(See previous commits for explanation.)

The pool name is optional but in all cases it can be promoted to an
optional positional argument so that it can be properly aligned with the
expectations of the parser.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
1304ef40a9 virsh: Annotate some optional arguments as positional
Make certain optional arguments truly positional in cases when it makes
semantic sense.

Previously it wasn't possible to have optional positional arguments, but
the parser filled them regardless, thus this preserves functionality.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
d19b12a681 virsh-backup: Fix argument annotations of 'backup-begin' command
Mark the 'backupxml' as positional optional and the 'checkpointxml' as
'unwanted_positional' to preserve the positional parsing quirk.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
3bbc97620a virsh: Make '(snapshot|checkpoint)-create' 'xmlfile' argument positional
The argument is optional thus couldn't be marked as positional until now,
despite being parsed positionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
29f3ac4223 virsh: snapshot: Make 'snapshotname' argument positional
The 'snapshotname' argument is optional as by default "current" snapshot
is considered. Regardless of that we should treat it as positional as
it's the common usage. This is now possible as we can have one optional
positional argument.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
0ce337b20c vsh: Make the only argument of 'connect', 'cd', and 'help' commands positional
The intended use of those commands is to use the argument directly
without the flag. Since the argument is optional in all cases we
couldn't declare them as positional until now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
fc7934695d vsh: Allow one optional positional argument
We already allow a optional positional _ARGV argument but there's no
reason why any other argument type could not be allowed this way.

Add checks that there's just one such argument and it's placed after
required positional arguments.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
627cf466f0 virsh-checkpoint: Make 'checkpointname' positional and required
The argument was being parsed positionally due to the command parser
quirk as we didn't opt out of it.

Since the code in virshLookupCheckpoint requires that the checkpointname
is present we can mark all the options as positional and required and
remove the redundant check from virshLookupCheckpoint.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
a7b10919e7 virsh: Require option flags for all optional arguments of 'attach-disk'
Annotate arguments which can be unintentionally parsed positionally.
(See previous commits for explanation.)

Currently virsh accepts the arguments such as:

 $ virsh attach-disk --print-xml 1 2 3 4 5 6 7 8 9 10
 <disk type='file' device='10'>
   <driver name='5' type='6' iothread='7' cache='8' io='9'/>
   <source file='2'/>
   <target dev='3' bus='4'/>
 </disk>

While making virsh require the flags is technically a breaking change,
there were multiple instances where arguments were added to the argument
list thus changing the order the positional arguments would be
interpreted as. Examples are commits: 7e157858b4, bc5a8090af,
ca21d75d25. As of such there are multiple breaks of compatibility for
the positional arguments.

As of such, require the option flag for all optional arguments with
value for 'virsh attach-disk'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
1efb794487 virsh: Fix "positional" argument annotations for 'migrate' command
Annotate arguments which can be unintentionally parsed positionally.
(See previous commits for explanation.)

Annotate '--migrateuri', '--graphicsuri', '--listen-address', '-dname',
'--timeout', '--xml', '--migrate-disks' and '--disks port' as
'unwanted_positional'. These were declared in chronological order per
git history.

All others are annotated with VSH_OFLAG_REQ_OPT which makes the parser
require the '--optionname'. This is due to the fact that '--disks-uri'
was introduced later and put in front of others declared earlier
breaking the order they would be accepted, thus changing the behaviour
between versions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
39218865f4 virsh: Require option flags for 'blkdeviotune' arguments
Make all of the tunable parameter flags require the option name (don't
parse them positionally).

While techically this would be a breaking change if anyone were to
specify the tunable values positionally this is not the case as the
first two tunables are not compatible with each other:

  $ virsh blkdeviotune cd vda 4 5
  error: Unable to change block I/O throttle
  error: invalid argument: total and read/write of bytes_sec cannot be set at the same time

The above is produced by all implementations of the API (qemu and test
drivers). It is true that the first tunable can be specified
positionally (--total-bytes-sec) but it is misleading and shoud not be
allowed either.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
baa20d6eb8 vsh: Fix option formatting for 'VHS_OT_ARGV' options
While previous fixes kept the help output unchanged as base for the
refactors it turns out that the formatting of help for argv options is
wrong.

Specifically in SYNOPSIS the non-positional _ARGV would have the option
name in square brackets (which in other cases means that given thing is
optional) despite being required.

Similarly in the DESCRIPTION section positional versions would not show
the optional argument name and also didn't use the three dots to signal
that it can be used multiple times.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
e9e3d6dff4 virsh: Annotate rest of _ARGV arguments as positional
In most cases it's the usual/recommended way to use those commands:

 $ virsh qemu-monitor-command VMNAME cmd args args args

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
4d4f4fd516 virsh: Annotate '--diskspec' _ARGV options as unwanted positional
Our documentation in most places explicitly mentions --diskspec and it
was never meant to be positional, although we can't change the parser
any more. Annotate them as 'unwanted_positional'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
d226a2cd70 vsh: Introduce annotation for vsh options which are unexpectedly parsed positionally
Based on the rationale in previous commit, all commands which were
parsed as positional but not documented as such will be annotated with
this flag.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
348010ac93 vsh: Introduce tool to find unwanted positional arguments to 'self-test'
While the virsh option definitions specify (either explicitly after
recent refactors, or implicitly before) whether an argument is
positional or not, the actual parser is way more lax and actually and
allows also arguments which were considered/documented as non-positional
to be filled positionally unless VSH_OFLAG_REQ_OPT is used in the flags.

This creates situations such as 'snapshot-create-as' which has the
following docs:

SYNOPSIS
  snapshot-create-as <domain> [--name <string>] [--description <string>]
    [--print-xml] [--no-metadata] [--halt] [--disk-only]
    [--reuse-external] [--quiesce] [--atomic] [--live] [--validate]
    [--memspec <string>] [[--diskspec] <string>]...

Thus showing as if '--name' and '--description' required the option, but
in fact the following happens when only positionals are passed:

  $ virsh snapshot-create-as --print-xml 1 2 3 4 5
  <domainsnapshot>
    <name>2</name>
    <description>3</description>
    <disks>
      <disk name='4'/>
      <disk name='5'/>
    </disks>
  </domainsnapshot>

In the above example e.g. '--memspec' is not populated.

This disconnect makes it impossible to refactor the parser itself and
allows users to write buggy interactions with virsh.

In order to address this we'll be annotating every single of these
unwanted positional options as such so that this doesn't happen in the
future, while still preserving the quirk in the parser.

This patch introduces a tool which outputs list of options which are not
marked as positional but are lacking the VSH_OFLAG_REQ_OPT flag.

This tool will be removed once all the offenders found by it will be
addressed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
1f3f9c81da virsh: Inline VIRSH_COMMON_OPT_NETWORK_OT_STRING macro
The macro is used in just one place and the definition of the option is
going to be modified. Inline the macro.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
d2e29eb74c virsh: Inline VIRSH_COMMON_OPT_FILE_FULL macro
The macro is used in one place only and the command definition will be
altered. Inline it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
7a696e9c3d virsh: Inline VIRSH_COMMON_OPT_DOMAIN_OT_STRING macro
Upcoming patches will need to tweak some of the properties of the
command. Since the macro is used in just two places expand it inline.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
25be987715 vshCmddefCheckInternals: Improve some checks
- move the check that completer_flags are 0 if no completer is set
   into a common place and remove duplication
 - add check that _BOOL arguments are not positional
 - add missing checks to _ALIAS

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Peter Krempa
334510a687 vshCmddefHelp: Drop empty line at the end
All virsh commands in non-quiet mode append another separator line thus
having two is unnecessary and in quiet mode it still has a trailing
blank line. Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-02 14:24:29 +02:00
Pavel Hrdina
0a164b74eb qemu_snapshot: correctly update metadata when deleting external snapshot with multiple branches
XML metadata for snapshot contains only single list of disk overlays
from the moment when the snapshot was taken. When user creates multiple
branches of snapshots the parent snapshot will still list only the
original disk overlays. This may cause an issue in a specific scenario:

     s1
      |
      +- s2
      +- s3 (active)

For this snapshot topology when we delete s2 metadata for s1 are not
updated. Now when we delete s1 the code operated with incorrect
overlays from s1 metadata in order to update s3 metadata resulting in no
changes to s3 metadata.

Now when user tries to delete s3 it fails with following error:

    error: Failed to delete snapshot s3
    error: operation failed: snapshot VM disk source and parent disk source are not the same

For the actual deletion there is a code to figure out the correct disk
source but it was not used to update metadata as well. Due to reasons
how block commit in libvirt works we need to create a copy of that disk
source in order to have it available when updating metadata as the
original source will be freed at that point.

Resolves: https://issues.redhat.com/browse/RHEL-26276
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-02 14:14:26 +02:00
Pavel Hrdina
79654f425c qemu_snapshot: call qemuSnapshotDeleteUpdateDisks only for external snapshots
Calling this function when deleting internal snapshot isn't required
because with internal snapshots all changes are done within the file
itself so there is no file deletion and no need to update snapshot
metadata.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-02 14:14:26 +02:00
Jiri Denemark
ca7d1bd5ee Post-release version bump to 10.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-02 13:43:31 +02:00
Jiri Denemark
5d9ebb126c Release of libvirt-10.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-02 13:38:48 +02:00
김인수
222a6c8638 Translated using Weblate (Korean)
Currently translated at 100.0% (10438 of 10438 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2024-03-29 15:36:18 +01:00
Anton Fadeev
971753af89 src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend
If we have Spice and VNC graphics in domain XML, and Spice graphics defined before VNC, audioBackend will be overrided in qemuDomainDefSuggestDefaultAudioBackend to VIR_DOMAIN_AUDIO_TYPE_NONE, and we will have no sound in Spice session, like this https://bugs.launchpad.net/qemu/+bug/1900352. If the flag addAudio already set, we do not need to override audioBackend. This commit fix the issue.
2023-06-29 08:52:21 +00:00
163 changed files with 6792 additions and 6630 deletions

View File

@ -8,13 +8,23 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v10.2.0 (unreleased)
v10.3.0 (unreleased)
====================
* **Security**
* **Removed features**
* **New features**
* **Improvements**
* **Bug fixes**
v10.2.0 (2024-04-02)
====================
* **New features**
* ch: Basic save and restore support for ch driver
@ -43,8 +53,6 @@ v10.2.0 (unreleased)
restarting the guest. Available via the ``virDomainGraphicsReload`` API
and the ``domdisplay-reload`` virsh command.
* **Improvements**
* **Bug fixes**
* qemu: Fix migration from libvirt older than 9.10.0 when vmx is enabled

View File

@ -1386,7 +1386,7 @@ exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/vir(file|event)\.c|src/libvirt-stream\.c|tests/(vir.+mock\.c|commandhelper\.c|qemusecuritymock\.c)|tools/nss/libvirt_nss_(leases|macs)\.c)|tools/virt-qemu-qmp-proxy$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
((^tests/(nodedevmdevctl|viracpi|virhostcpu|virpcitest|virstoragetest|qemunbdkit)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)|\.bin)
((^tests/(nodedevmdevctl|viracpi|virhostcpu|virpcitest|virstoragetest|qemunbdkit|virshtest)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)|\.bin)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^(src/(util/(vircommand|virdaemon)|lxc/lxc_controller)|tests/testutils)\.c$$)
@ -1437,7 +1437,7 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers\.c$$|scripts/rpcgen/tests/test_demo\.c$$)
exclude_file_name_regexp--sc_trailing_blank = \
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo$$
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|tests/virshtestdata/.*$$
exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
@ -1466,7 +1466,7 @@ exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
exclude_file_name_regexp--sc_prohibit_empty_first_line = \
^tests/vmwareverdata/fusion-5.0.3.txt|scripts/rpcgen/tests/demo\.c$$
^tests/vmwareverdata/fusion-5.0.3.txt|scripts/rpcgen/tests/demo\.c|^tests/virshtestdata/.*$$
exclude_file_name_regexp--sc_prohibit_useless_translation = \
^tests/virpolkittest.c

View File

@ -4390,6 +4390,14 @@ or:
starting the guest or hot-plugging the device and
``virNodeDeviceReAttach`` (or ``virsh nodedev-reattach``) after hot-unplug
or stopping the guest.
:since:`Since 10.3.0` an optional ``display`` attribute may be used to
enable using a vgpu device as a display device for the guest. Supported
values are either ``on`` or ``off`` (default). There is also an optional
``ramfb`` attribute with values of either ``on`` or ``off`` (default).
When enabled, the ``ramfb`` attribute provides a memory framebuffer device
to the guest. This framebuffer allows the vgpu to be used as a boot display
before the gpu driver is loaded within the guest. ``ramfb`` requires the
``display`` attribute to be set to ``on``.
``scsi``
For SCSI devices, user is responsible to make sure the device is not used
by host. If supported by the hypervisor and OS, the optional ``sgio`` (
@ -5600,6 +5608,7 @@ ne2k_pci pcnet rtl8139 e1000 virtio. :since:`Since 5.2.0`,
``virtio-transitional`` and ``virtio-non-transitional`` values are supported.
See `Virtio transitional devices`_ for more details.
:since:`Since 9.3.0` igb is also supported.
:since:`Since 10.3.0` usb-net is supported.
Setting NIC driver-specific options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -113,6 +113,28 @@ The following variables are supported:
this requires guest agent with support for time synchronization
running in the guest. By default, this functionality is turned off.
- PERSISTENT_ONLY=default
Defines what type of guest virtual machine ON_SHUTDOWN action is applied to
* default
This implements the already existing default behavior.
If ON_SHUTDOWN action is shutdown, transient and persistent guest virtual
machines are asked to shutdown.
If ON_SHUTDOWN action is suspend, only persistent guest virtual machines
are asked to suspend.
* true
ON_SHUTDOWN action is executed only on persistent guest virtual machines.
Transient guest virtual machines are not affected.
* false
ON_SHUTDOWN action is executed on persistent and transient guest virtual
machines.
BUGS
====

View File

@ -326,8 +326,6 @@ Will change current directory to *directory*. The default directory
for the ``cd`` command is the home directory or, if there is no *HOME*
variable in the environment, the root directory.
This command is only available in interactive mode.
pwd
---
@ -7673,9 +7671,11 @@ If *--parent* is specified, add a column to the output table giving
the name of the parent of each snapshot. If *--roots* is specified,
the list will be filtered to just snapshots that have no parents.
If *--tree* is specified, the output will be in a tree format, listing
just snapshot names. These three options are mutually exclusive. If
*--name* is specified only the snapshot name is printed. This option is
mutually exclusive with *--tree*.
just snapshot names. These three options are mutually exclusive.
If *--name* is specified only the snapshot name is printed optionally
followed by a tab-separated name of the parent snapshot if *--parent* is used
as well. This option is mutually exclusive with *--tree*.
If *--from* is provided, filter the list to snapshots which are
children of the given ``snapshot``; or if *--current* is provided,
@ -7989,8 +7989,11 @@ the name of the parent of each checkpoint. If *--roots* is
specified, the list will be filtered to just checkpoints that have no
parents. If *--tree* is specified, the output will be in a tree
format, listing just checkpoint names. These three options are
mutually exclusive. If *--name* is specified only the checkpoint name
is printed. This option is mutually exclusive with *--tree*.
mutually exclusive.
If *--name* is specified only the checkpoint name is printed optionally
followed by a tab-separated name of the parent checkpoint if *--parent* is used
as well. This option is mutually exclusive with *--tree*.
If *--from* is provided, filter the list to checkpoints which are
children of the given ``checkpoint``. When used in isolation or with

View File

@ -1,6 +1,6 @@
project(
'libvirt', 'c',
version: '10.2.0',
version: '10.3.0',
license: 'LGPLv2+',
meson_version: '>= 0.56.0',
default_options: [

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: 2024-03-22 09:54+0000\n"
"PO-Revision-Date: 2024-03-27 17:36+0000\n"
"PO-Revision-Date: 2024-03-29 14:36+0000\n"
"Last-Translator: 김인수 <simmon@nplob.com>\n"
"Language-Team: Korean <https://translate.fedoraproject.org/projects/libvirt/"
"libvirt/ko/>\n"
@ -5758,6 +5758,9 @@ msgid ""
"virtualization is enabled in the host BIOS, and host configuration is setup "
"to load the mshv modules."
msgstr ""
"도메인은 MSHV 장치가 필요하지만, 사용 할 수 없습니다. 가상화가 호스트 "
"바이오스에서 활성화 되어 있는지 점검하고, 호스트 구성이 mshv 모듈을 "
"적재하도록 설정(setup)되었습니다."
msgid "Domain requires at least 1 vCPU"
msgstr "도메인에는 최소 1개의 vCPU가 필요합니다"
@ -7703,7 +7706,7 @@ msgstr "도메인 이미지 파일 '%1$s'을(를) 열지 못했습니다"
#, c-format
msgid "Failed to open domain save file '%1$s'"
msgstr ""
msgstr "도메인 저장 파일 '%1$s'를 여는 데 실패했습니다"
#, c-format
msgid "Failed to open file '%1$s'"
@ -8051,7 +8054,7 @@ msgstr "도메인 '%1$s'에 대한 관리되는 저장 이미지를 제거하지
#, c-format
msgid "Failed to remove managed save path '%1$s'"
msgstr ""
msgstr "관리된 저장 경로 '%1$s'룰 제거하는 데 실패했습니다"
#, c-format
msgid "Failed to remove storage volume '%1$s'(%2$s)"
@ -8195,7 +8198,7 @@ msgid "Failed to save VM settings"
msgstr "VM 설정을 저장하는데 실패함"
msgid "Failed to save domain"
msgstr ""
msgstr "도메인 저장에 실패했습니다"
#, c-format
msgid "Failed to save domain '%1$d' with libxenlight"
@ -8389,7 +8392,7 @@ msgid "Failed to shutdown domain '%1$s'"
msgstr "도메인 '%1$s'를 종료하지 못했습니다"
msgid "Failed to shutoff after domain save"
msgstr ""
msgstr "도메인 저장 후 종료하는 데 실패했습니다"
#, c-format
msgid "Failed to soft reset VM '%1$s'. Destroying VM"
@ -8613,7 +8616,7 @@ msgid "Failed to write '%1$s'"
msgstr "'%1$s' 쓰기에 실패"
msgid "Failed to write file header"
msgstr ""
msgstr "파일 헤더를 쓰는 데 실패했습니다"
msgid "Failed to write pixel data"
msgstr "픽셀 데이터 쓰기 실패했습니다"
@ -8634,7 +8637,7 @@ msgid "Failed to write vmx file '%1$s'"
msgstr "vmx 파일 '%1$s' 쓰기에 실패"
msgid "Failed to write xml definition"
msgstr ""
msgstr "xml 정의를 작성하는 데 실패했습니다"
msgid "Failed to write xml description"
msgstr "xml 설명을 쓰지 못했습니다"
@ -8948,16 +8951,16 @@ msgid "Get or set perf event"
msgstr "perf 이벤트 가져오기 또는 설정"
msgid "Get or set the current blkio parameters for a guest domain."
msgstr ""
msgstr "게스트 도메인을 위한 현재 blkio 매개변수를 가져오거나 설정합니다."
msgid "Get or set the current memory parameters for a guest domain."
msgstr ""
msgstr "게스트 도메인을 위한 현재 메모리 매개변수를 가져오거나 설정합니다."
msgid "Get or set the current numa parameters for a guest domain."
msgstr ""
msgstr "게스트 도메인을 위한 현재 numa 매개변수를 가져오거나 설정합니다."
msgid "Get or set the current perf events for a guest domain."
msgstr ""
msgstr "게스트 도메인을 위한 현재 perf 사건을 가져오거나 설정합니다."
msgid "Get or set the current snapshot"
msgstr "현재 순간찍기를 가져오거나 설정합니다"
@ -11790,6 +11793,8 @@ msgid ""
"NUMA mode, one of strict, preferred and interleave or a number from the "
"virDomainNumatuneMemMode enum"
msgstr ""
"NUMA 모드는 엄격, 선호 및 인터리브 중 하나 또는 virDomainNumatuneMemMode "
"열거형의 숫자로 구성되어 있습니다"
#, c-format
msgid "NUMA node %1$d is not available"
@ -13620,7 +13625,7 @@ msgid "Relative backing during copy not supported yet"
msgstr "복사 중에 상대적인 백업은 아직 지원하지 않습니다"
msgid "Reload domain's graphics display certificates"
msgstr ""
msgstr "도메인의 그래픽 표시 인증서를 재적재합니다"
#, c-format
msgid "Remote command terminated with non-zero code: %1$d"
@ -13804,10 +13809,10 @@ msgid "Retrieve identity details about <client> from <server>"
msgstr "<server>에서 <client>에 대한 ID 세부 정보 검색"
msgid "Retrieve server's client-related configuration limits"
msgstr ""
msgstr "서버의 클라이언트-관련 구성 제한 검색"
msgid "Retrieve threadpool attributes from a server."
msgstr ""
msgstr "서버에서 쓰레드 풀 속성을 검색합니다."
msgid "Return pool info in bytes"
msgstr "바이트 단위로 풀 정보 반환"
@ -14279,7 +14284,7 @@ msgstr ""
"머신 유형과 호환되지 않습니다"
msgid "Serial only works in UNIX/PTY modes"
msgstr ""
msgstr "시리얼은 UNIX/PTY 방식에서 동작합니다"
#, c-format
msgid "Serial port index %1$d out of [0..3] range"
@ -18840,7 +18845,7 @@ msgid "Unexpectedly got a network port without a plug"
msgstr "예기치 않게 플러그가 없는 네트워크 포트가 있음"
msgid "Unix Socket backend is not supported by this version of ch."
msgstr ""
msgstr "유닉스 소켓 백엔드는 이 채널의 버전에서 지원되지 않습니다."
msgid "Unix file descriptors not supported on this platform"
msgstr "이 기술환경에서 지원되지 않는 유닉스 파일 설명자"
@ -22307,10 +22312,10 @@ msgid "cannot revert snapshot of running domain"
msgstr "동작 중인 도메인의 순간찍기를 되돌릴 수 없습니다"
msgid "cannot save domain with host devices"
msgstr ""
msgstr "호스트 장치에 도메인을 저장 할 수 없습니다"
msgid "cannot save domain with network interfaces"
msgstr ""
msgstr "네트워크 연결장치에 도메인을 저장 할 수 없습니다"
#, c-format
msgid "cannot save file '%1$s'"
@ -22861,10 +22866,10 @@ msgid "command '%1$s' requires <%2$s> option"
msgstr "'%1$s' 명령은 <%2$s> 옵션이 필요함"
msgid "command groups is NULL run vshInit before reloading"
msgstr ""
msgstr "명령 그룹은 NULL이고 다시 적재하기 전에 vshInit를 실행하세요"
msgid "command groups must be non-NULL"
msgstr ""
msgstr "명령 그룹은 비-NULL이어야 합니다"
#, c-format
msgid "command is already running as pid %1$lld"
@ -26318,7 +26323,7 @@ msgid "failed to read AppArmor template"
msgstr "AppArmor 템플릿을 읽는데 실패"
msgid "failed to read CHSaveXMLHeader header"
msgstr ""
msgstr "CHSaveXMLHeader 헤더를 읽는 데 실패했습니다"
msgid "failed to read XML"
msgstr "XML을 읽는 것을 실패"
@ -26441,19 +26446,19 @@ msgid "failed to resolve symlink %1$s: %2$s"
msgstr "심볼릭 링크 %1$s을(를) 확인하지 못했습니다: %2$s"
msgid "failed to restore domain"
msgstr ""
msgstr "도메인을 복구하는 데 실패했습니다"
msgid "failed to restore domain from managed save"
msgstr ""
msgstr "관리된 저장에서 도메인을 복구하는 데 실패했습니다"
msgid "failed to resume domain"
msgstr "도메인을 재개하는 것에 실패"
msgid "failed to resume domain after restore"
msgstr ""
msgstr "복구 후 도메인을 재개하는 데 실패했습니다"
msgid "failed to resume domain after restore from managed save"
msgstr ""
msgstr "관리된 저장에서 복구 후 도메인을 재개하는 데 실패했습니다"
msgid "failed to retrieve XML"
msgstr "XML을 검색하지 못했습니다"
@ -26572,7 +26577,7 @@ msgid "failed to suspend domain"
msgstr "도메인을 일시 중단하지 못했습니다"
msgid "failed to suspend domain before saving"
msgstr ""
msgstr "저장하기 전에 도메인을 중지하는 데 실패했습니다"
msgid "failed to take screenshot"
msgstr "스크린샷을 찍지 못했습니다"
@ -27259,7 +27264,7 @@ msgid "graphics device is needed for attribute value 'display=on' in <hostdev>"
msgstr "<hostdev>의 속성 값 'display=on'에 그래픽 장치가 필요합니다"
msgid "graphics display type"
msgstr ""
msgstr "그래픽 표시 유형"
msgid ""
"graphics type 'egl-headless' is only supported with one of: 'vnc', 'spice' "
@ -27489,7 +27494,7 @@ msgid "hostdev does not have an alias"
msgstr "hostdev에는 단축명령어(alias)가 없습니다"
msgid "hostdev interface missing hostdev data"
msgstr "hostdev 인터페이스에 hostdev 데이터가 없습니다"
msgstr "hostdev 연결장치에 hostdev 자료가 없습니다"
#, c-format
msgid "hostdev invalid secret type '%1$s'"
@ -27605,7 +27610,8 @@ msgstr "하이퍼바이저 기능 자동 감지 재정의"
msgid ""
"hypervisor provided conflicting CPU data: feature '%1$s' is both enabled and "
"disabled at the same time"
msgstr ""
msgstr "하이퍼바이저는 충돌하는 CPU 자료를 제공합니다: 특성 '%1$s'가 동시에 활성화 "
"및 비활성화 되었습니다"
msgid "i - turn off validation and try to redefine again"
msgstr "i - 유효성 검사를 끄고 다시 재정의하십시오"
@ -29610,7 +29616,7 @@ msgid "manipulate authorized SSH keys file for given user (via agent)"
msgstr "지정된 사용자에 대한 승인된 SSH 키 파일 조작(에이전트를 통해)"
msgid "maplen must be non-negative"
msgstr ""
msgstr "maplen는 비-음수이어야 합니다"
msgid "mark inactive domains with managed save state"
msgstr "관리되는 저장 상태로 비활성 도메인 표시"
@ -29648,7 +29654,7 @@ msgid "maxcells > REMOTE_NODE_MAX_CELLS"
msgstr "maxcells > REMOTE_NODE_MAX_CELLS"
msgid "maxcells must be non-negative"
msgstr ""
msgstr "maxcells은 비-음수이어야 합니다"
msgid "maxerrors too large"
msgstr "maxerrors가 너무 큽니다"
@ -29657,7 +29663,7 @@ msgid "maxids > REMOTE_DOMAIN_LIST_MAX"
msgstr "최대 ID > REMOTE_DOMAIN_LIST_MAX"
msgid "maxids must be non-negative"
msgstr ""
msgstr "maxids는 비-음수이어야 합니다"
msgid "maximum"
msgstr "최대"
@ -29698,7 +29704,7 @@ msgid "maxinfo > REMOTE_VCPUINFO_MAX"
msgstr "maxinfo > REMOTE_VCPUINFO_MAX"
msgid "maxinfo must be non-negative"
msgstr ""
msgstr "maxinfo는 비-음수이어야 합니다"
msgid "maxnames > REMOTE_DOMAIN_LIST_MAX"
msgstr "최대 이름 > REMOTE_DOMAIN_LIST_MAX"
@ -29728,13 +29734,13 @@ msgid "maxnames > REMOTE_STORAGE_VOL_LIST_MAX"
msgstr "최대 이름 > REMOTE_STORAGE_VOL_LIST_MAX"
msgid "maxnames must be non-negative"
msgstr ""
msgstr "maxnames는 비-음수이어야 합니다"
msgid "maxuuids > REMOTE_SECRET_LIST_MAX"
msgstr "최대 ID > REMOTE_SECRET_LIST_MAX"
msgid "maxuuids must be non-negative"
msgstr ""
msgstr "maxuuids는 비-음수이어야 합니다"
msgid "mdev attribute missing name or value"
msgstr "mdev 속성에 이름 또는 값이 없습니다"
@ -31013,10 +31019,10 @@ msgid "msi option is only supported with a server"
msgstr "msi 옵션은 서버에서만 지원됩니다"
msgid "mtp is not supported with this QEMU binary"
msgstr ""
msgstr "mtp는 이 QEMU 바이너리를 지원하지 않습니다"
msgid "mtp only supports passthrough accessmode"
msgstr ""
msgstr "mtp는 통과 접근방식(passthrough accessmode)만 지원합니다"
#, c-format
msgid ""
@ -31150,7 +31156,7 @@ msgid "ncpumaps > REMOTE_VCPUINFO_MAX"
msgstr "ncpumaps > REMOTE_VCPUINFO_MAX"
msgid "ncpumaps must be non-negative"
msgstr ""
msgstr "ncpumaps는 비-음수이어야 합니다"
#, c-format
msgid "ncpus count exceeds maximum: %1$u > %2$u"
@ -32143,7 +32149,7 @@ msgid "nparams in %1$s must be equal to %2$d"
msgstr "%1$s의 nparams는 %2$d와 같아야 합니다"
msgid "nparams must be non-negative"
msgstr ""
msgstr "nparams는 비-음수이어야 합니다"
msgid "nparams too large"
msgstr "nparams가 너무 큽니다"
@ -32364,7 +32370,7 @@ msgid "only can resume paused domain"
msgstr "일시중지된 도메인만 재개할 수 있습니다"
msgid "only can save running/paused domain"
msgstr ""
msgstr "동작하는/중지된 도메인만 저장 할 수 있습니다"
msgid "only can shutdown running/paused domain"
msgstr "실행/일시 중지된 도메인만 종료할 수 있습니다"
@ -32602,7 +32608,7 @@ msgid "output an XML string for the hypervisor sysinfo, if available"
msgstr "사용 가능한 경우 하이퍼바이저 sysinfo에 대한 XML 문자열을 출력합니다"
msgid "output help for each command"
msgstr ""
msgstr "개별 명령을 위한 도움말 출력"
msgid "output the list of options which are missing completers"
msgstr "완성자가 누락된 옵션(선택)의 목록을 출력합니다"
@ -34122,7 +34128,7 @@ msgid "save image is incomplete"
msgstr "이미지 저장이 불완전합니다"
msgid "save image magic is incorrect"
msgstr ""
msgstr "저장 이미지 마법이 올바르지 않습니다"
msgid "saved"
msgstr "저장됨"
@ -36027,7 +36033,7 @@ msgstr "이벤트의 유형 불일치(실제 0x%1$x, 예상 0x%2$x)"
#, c-format
msgid "type must be less than %1$d"
msgstr ""
msgstr "유형은 %1$d 보다 작아야만 합니다"
msgid "type of source (block|file|network)"
msgstr "원천 유형(블록|파일|네트워크)"
@ -38387,7 +38393,7 @@ msgstr "virVMXContext에 parseFileName 함수 세트가 없습니다"
#, c-format
msgid "virt type '%1$s' is not supported"
msgstr ""
msgstr "가상 유형 '%1$s' 이 지원되지 않습니다"
#, c-format
msgid ""

View File

@ -6306,6 +6306,16 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
VIR_XML_PROP_NONE,
&mdevsrc->ramfb) < 0)
return -1;
} else if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
if (virXMLPropTristateSwitch(node, "display",
VIR_XML_PROP_NONE,
&pcisrc->display) < 0)
return -1;
if (virXMLPropTristateSwitch(node, "ramfb",
VIR_XML_PROP_NONE,
&pcisrc->ramfb) < 0)
return -1;
}
switch (def->source.subsys.type) {
@ -26251,6 +26261,7 @@ virDomainHostdevDefFormat(virBuffer *buf,
const char *mode = virDomainHostdevModeTypeToString(def->mode);
virDomainHostdevSubsysSCSI *scsisrc = &def->source.subsys.u.scsi;
virDomainHostdevSubsysMediatedDev *mdevsrc = &def->source.subsys.u.mdev;
virDomainHostdevSubsysPCI *pcisrc = &def->source.subsys.u.pci;
virDomainHostdevSubsysSCSIVHost *scsihostsrc = &def->source.subsys.u.scsi_host;
const char *type;
@ -26319,7 +26330,14 @@ virDomainHostdevDefFormat(virBuffer *buf,
virBufferAsprintf(buf, " ramfb='%s'",
virTristateSwitchTypeToString(mdevsrc->ramfb));
}
if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
if (pcisrc->display != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " display='%s'",
virTristateSwitchTypeToString(pcisrc->display));
if (pcisrc->ramfb != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " ramfb='%s'",
virTristateSwitchTypeToString(pcisrc->ramfb));
}
}
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
@ -28677,7 +28695,14 @@ virDomainUSBDeviceDefForeach(virDomainDef *def,
}
}
/* TODO: add def->nets here when libvirt starts supporting usb-net */
/* usb-net */
for (i = 0; i < def->nnets; i++) {
virDomainNetDef *net = def->nets[i];
if (net->model == VIR_DOMAIN_NET_MODEL_USB_NET) {
if (iter(&net->info, opaque) < 0)
return -1;
}
}
/* usb-ccid */
for (i = 0; i < def->ncontrollers; i++) {

View File

@ -236,6 +236,8 @@ struct _virDomainHostdevSubsysUSB {
struct _virDomainHostdevSubsysPCI {
virPCIDeviceAddress addr; /* host address */
virDeviceHostdevPCIDriverInfo driver;
virTristateSwitch display;
virTristateSwitch ramfb;
virBitmap *origstates;
};

View File

@ -1291,15 +1291,20 @@ virDomainDefHostdevValidate(const virDomainDef *def)
}
}
if (dev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV &&
dev->source.subsys.u.mdev.ramfb == VIR_TRISTATE_SWITCH_ON) {
if (ramfbEnabled) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only one vgpu device can have 'ramfb' enabled"));
return -1;
if (dev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
virTristateSwitch *ramfbsetting = NULL;
if (dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV)
ramfbsetting = &dev->source.subsys.u.mdev.ramfb;
else if (dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
ramfbsetting = &dev->source.subsys.u.pci.ramfb;
if (ramfbsetting && *ramfbsetting == VIR_TRISTATE_SWITCH_ON) {
if (ramfbEnabled) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only one vgpu device can have 'ramfb' enabled"));
return -1;
}
ramfbEnabled = true;
}
ramfbEnabled = true;
}
}