Commit Graph

8271 Commits

Author SHA1 Message Date
Cole Robinson 5e48307e9d virtinstall: Set VM name earlier so disks are named correctly
We need to change the flow from

  * parse all the strings
  * set capabilities defaults
  * build installer
  * fill in all guest defaults

To

  * parse boot and metadata strings
  * set capabilities defaults
  * build installer
  * set --name default
  * parse all the remaining strings
  * fill in all guest defaults

Because --disk parsing depends on --name for some path generation.
So this fixes --disk names when --name is implicitly specified by
--install or --osinfo

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson 02e6abad48 cli: Break up parse_option_strings
Into run_parser and run_all_parsers. Opencode some of the special
case handling in virtxml

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson e2dfbf9bd9 virt-xml: Simplify --build-xml parse_option_strings usage
parse_option_strings will do the right thing for us already

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson bfa37d0065 xmlutil: Take unindent_device_xml from details.py
We will use this in virt-xml soon

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson d2b346370a virtxml: Remove redundant listify calls
parse_option_strings always returns a list

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson 4ca0d2c29b tests: More trailing newline fixes
The diff_compare rstrip() should never have been added, let's fix
it once and for all but dealing with missing newlines in the diff
helper

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson effe274a9b tests: test_urls: Update fedora links
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 11:44:25 -04:00
Charles Arnold 424283ad1d launch_security: Use SEV-ES policy=0x07 if host supports it 2022-08-03 08:47:35 -04:00
Lin Ma 2984c13cff cli: Add --iothreads defaultiothread.thread_pool_{min,max}
It allows to set the thread pool size to optimize spawning worker threads
for the default event loop in real time environment. For example:

--iothreads defaultiothread.thread_pool_min=8,\
defaultiothread.thread_pool_max=16

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-02 14:56:09 -04:00
Miro Hrončok 90e13549b4 Fix build with setuptools 61+
+ ./setup.py configure --default-hvs qemu,xen,lxc
    error: Multiple top-level packages discovered in a flat-layout: ['po', 'ui', 'man', 'data', 'virtinst', 'virtManager'].
    To avoid accidental inclusion of unwanted files or directories,
    setuptools will not proceed with this build.
    If you are trying to create a single distribution with multiple packages
    on purpose, you should not rely on automatic discovery.
    Instead, consider the following options:
    1. set up custom discovery (`find` directive with `include` or `exclude`)
    2. use a `src-layout`
    3. explicitly set `py_modules` or `packages` with a list of names
    To find more information, look for "package discovery" on setuptools docs.

Downstream bug report: https://bugzilla.redhat.com/2113754
2022-08-02 12:05:39 -04:00
Lin Ma 0d84bcfbfa cli: Add iothreadids attributes thread_pool_min and thread_pool_max
These two optional attributes allow setting lower and upper boundary for
number of worker threads for given IOThread. For example:

--iothreads iothreads=2,\
iothreadids.iothread0.id=1,\
iothreadids.iothread1.id=2,\
iothreadids.iothread1.thread_pool_min=8,\
iothreadids.iothread1.thread_pool_max=16

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-01 11:32:23 -04:00
Cole Robinson 58ffe7fa7a tests: uitests: livetests: Fix LXC domain cleanup
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 10:38:01 -04:00
Lin Ma b8a77805b0 domain: cpu: Clear 'migratable' when changing to custom cpu
Otherwise going host-passthrough -> custom can cause libvirt validation
error due to libvirt fills the default value(migratable='on') for the
host-passthrough in domain XML.

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-01 10:11:43 -04:00
Feng Jiang cf2c28ada1 ui: Fix too wide lables
When some lables have too much content, they will become very wide,
causing the window to widen.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
2022-08-01 10:10:41 -04:00
Cole Robinson e7c936f16e vmwindow: Customize window should not be 'deletable'
This forces the user to use the 'Cancel' button, which gives a warning
about the install being aborted

Resolves: https://github.com/virt-manager/virt-manager/issues/416

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 09:44:48 -04:00
Cole Robinson 6287760ed0 tests: Fix memdev uuid testing with libvirt.git
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 06:46:41 -04:00
Cole Robinson 35871fe96b capabilities: Remove noisy alias debugging
our debugging output is not this fine grained, so this crowds out
more interesting messages

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 06:04:48 -04:00
Cole Robinson 8079c421bd connection: De-duplicate ui and cli version logging
Remove the open coded version logging in cli.py and virt-manager
connection.py, and move it into virtinst connection open

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 06:04:48 -04:00
Cole Robinson aeffa4f711 guest: Check coverage for more of domcaps caching
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-07-27 18:07:05 -04:00
Daniel P. Berrangé 92ba8e5d35 virtinst: log libvirt version numbers after connecting
The various version numbers reported by libvirt are all relevant pieces
of information when debugging problem reports.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-27 17:53:14 -04:00
Daniel P. Berrangé 01ff867f56 virtinst: include the version number in first log message
Knowledge of the version number is not always available from the user
bug report. They may merely have a log file from an automated system.
Including the version number in the log message is key information.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-27 17:53:14 -04:00
Daniel P. Berrangé b5e8e58d74 virtinst: include host capbilities in debug log
This is critical information when debugging many user problems.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-27 17:53:14 -04:00
Daniel P. Berrangé fec5fd84a7 virtinst: include domain capbilities in debug log
This is critical information when debugging many user problems.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-27 17:53:14 -04:00
Daniel P. Berrangé 05fcc7410e virtinst: fix caching of domain capabilities
The domain capabilities XML always contains the canonical machine name.
When the selected machine type for a guest is an alias, the check
comparing it to the domain capabilities machine will always fail. This
prevents the domain capabilities result from being cached.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-27 17:53:14 -04:00
Cole Robinson a4a5c1529a tests: Fix with latest libvirt
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-07-27 17:51:21 -04:00
Cole Robinson 7ae10b5566 cli: Add --serial source.tls=on|off
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 18:06:40 -04:00
Cole Robinson 137cfdc347 cli: Add --serial source.channel
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 18:03:55 -04:00
Cole Robinson d0e6213643 cli: Add --memorybacking allocation.threads
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 17:54:50 -04:00
Cole Robinson d51541e155 Fix UI rename with firmware='efi'
Our code to duplicate nvram wasn't expecting the XML to be devoid
of an nvram path.

Resolves: https://github.com/virt-manager/virt-manager/issues/372

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 09:37:26 -04:00
Cole Robinson 9da917b8ac connection: Add get_libvirt_data_root_dir()
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 09:10:59 -04:00
Cole Robinson 280c30736f tests: Fix test skipping with old osinfo-db
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-18 17:42:44 -04:00
Cole Robinson 48f66f27fd domcaps: armv7l doesn't support tpm-tis
Libvirt domcaps can advertise armv7l support for tpm-tis, even though
it will explicitly reject that config:

https://gitlab.com/libvirt/libvirt/-/issues/329

Work around that in domcaps. Without this, UEFI arm32 VMs generate
default configs that libvirt will reject

https://bugzilla.redhat.com/show_bug.cgi?id=2078995

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-17 13:09:39 -04:00
Ryan Schmidt 49c2e046a1 Install before updating cache & compiling schemas
Closes #400
2022-06-13 15:18:19 -04:00
Cole Robinson 3db783dab2 tests: caps: Update with newer amd sev caps
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 14:32:02 -04:00
Cole Robinson 686603eabe tests: Add an explicit test for old host-model default
when caps does not report that libvirt is new enough to default
to host-passthrough

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 14:29:18 -04:00
Cole Robinson eb613283d5 Update mailmap
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:49:54 -04:00
Cole Robinson 64dfb6c595 details: Go back to old Channel naming format
The new format is too long and wordy IMO. It was added to handle
qemu-vdagent ambiguity, since without it we would print the same string
for spicevmc and qemu-vgagent channel. Let's just special case
qemu-vdagent to solve that problem

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:49:08 -04:00
Cole Robinson bfe17ce627 osdict: Fix test coverage with latest libosinfo
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:49:08 -04:00
Jonathon Jongsma caa99a6001 virt-manager: add support for qemu-vdagent channel
This provides the UI support for the qemu-vdagent channel which allows
 clipboard sharing with VNC graphics (see previous commit for more
 information).

 The channel name in the device list was changed slightly in order to
 avoid confusion. Due to the fact that both the spice-vdagent and the
 qemu-vdagent specify the same virtio name (com.redhat.spice.0), both of
 these channels were showing up in the device list as "Channel spice",
 which is a bit confusing.

 In order to disambiguate these, channels now show up in the device list
 as "Channel {type} ({name})" instead of "Channel {name}". So for
 example, a qemu-vdagent channel would show up as:
    Channel Qemu vdagent (spice)
Whereas a spice-vdagent channel would show up as:
    Channel Spice agent (spice)

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-06-13 13:49:08 -04:00
Jonathon Jongsma 44355e5ed0 virt-install: add support for qemu-vdagent channel
This allows support for host/guest clipboard sharing when using vnc
guests (and possibly other graphics types in the future). This channel
is similar to the spicevmc channel, but it contains a couple additional
options to enable/disable clipboard sharing and specify the mouse mode.
In the case of spice, these settings are specified on the 'graphics'
element, but for qemu-vdagent, they are specified on the channel. For
example:

   --channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-06-13 13:49:08 -04:00
Cole Robinson 0533bb8189 tests: Fix with latest osinfo-db
linux2020 is now reporting virtio-gpu support, adjust output and
add a compat check

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:20:01 -04:00
Cole Robinson 34662fecc9 tests: Fix with latest argcomplete
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:20:01 -04:00
Cole Robinson ddead32287 virtmanager: Remove executable bit
rpmbuild complains about it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-04-13 08:36:05 -04:00
Martin Kletzander a62e3df72f Add support for URL query with disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 08:35:50 -04:00
Cole Robinson 9ac94ef739 tests: Fix another sgio=filtered case
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-04-13 08:35:50 -04:00
Peter Alfredsen 46dc061630 setup: add bits for setuptools-61
Quoting https://github.com/pypa/setuptools/issues/3227
"Setuptools >= 61, intentionally changes the way packages are built in the
 sensec that it will try to find files and fail if something is weird.

 Empty packages (like this one), are asked to explicitly add packages=[]
 to their configuration.

 This intentional change in behaviour is described in
 https://setuptools.pypa.io/en/latest/history.html#v61-0-0."

Bug: https://bugs.gentoo.org/836645
Signed-off-by: Peter Alfredsen <crabbedhaloablution@icloud.com>
2022-04-13 08:35:40 -04:00
Cole Robinson c61074191d tests: Drop usage of sgio=unfiltered
libvirt 8.1.0+ rejects it, so it breaks the testsuite

Fixes: #382

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-04-13 07:00:37 -04:00
Cole Robinson d12be94f40 DESIGN.md: disk serial is back, but disk detect zeroes is gone
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-09 13:30:16 -05:00
Cole Robinson e924dfb389 Prep for release 4.0.0
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-02 12:44:04 -05:00
Weblate 05136e3843 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/
2022-03-02 12:26:50 -05:00