Commit Graph

330 Commits

Author SHA1 Message Date
Cole Robinson
7cd6151a21 uitests: Drop hotplug work around, f38 libvirt is fixed now
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-24 12:49:02 -04:00
Cole Robinson
64bd6ba53e tests: uitests: make menu operations more robust
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
509c95ddb9 uitests: More attempts at making manager reposition test reliable
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
75422ec75e uitests: Make hotplug test pass on both f37 and f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
6030049cd7 tests: uitests: Fix manager window repositioning test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:48:24 -04:00
Cole Robinson
7f83d23f4f tests: livetests: work around qemu media change regression
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:47:25 -04:00
Cole Robinson
909c8aa880 tests: uitests: Fix window reposition on f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 14:54:31 -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
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
1aaa28e26a tests: uitests: Add coverage for when spice is missing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 14:23:09 -05:00
Cole Robinson
365d1f5d56 diskbackend: Set relative path for media change
Via the virt-manager UI we aren't converting relative path to
absolute path, even though we do it internally when needed.

We were benefiting from this in the test suite in some ways, so we
need to adjust tests to strip out the dev dir on XML comparison

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson
59595aebb7 uitests: details: Break out table cell click helper
We may want to move this to generic code at some point

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson
1f20ef7e07 tests: testdriver: Have all pools use pool- prefix
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:13 -05:00
Cole Robinson
435c7181f1 tests: testdriver: Rename default-pool -> pool-dir
And move the path to not be rooted in /dev, which doesn't make
sense for a directory pool, and triggers some special /dev handling
in virtinst that we don't want in the common testing path.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:03:04 -05:00
Cole Robinson
6a21b38ae8 tests: testdriver: Rename disk-pool -> pool-logical
It _is_ type=logical, so make it clear in the naming. Plus we
already have a type=disk pool named pool-disk

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 12:55:48 -05:00
Cole Robinson
9c0a132f2a fsdetails: Point users to Memory screen if shared memory not enabled
If the user selects virtiofs when editting or adding a new VM, and
we don't detect that they have shared memory enabled, show
a warning label in the UI pointing them to the Memory screen.

It would be nicer if we did this for them, but to get that totally
correct would require both duplicating libvirt's shared memory
detection logic, and some surgery to the addhw wizard. This is good
enough for now

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:44:29 -05:00
Cole Robinson
fd181cecc3 virtManager: Split out tpmdetails.py and tweak it
Split out tpmdetails.py, following the pattern of fsdetails.py. This
adds more UI editing fields for an already attached TPM.

Move the model and version under an 'Advanced options' expander,
since we should be getting this correct by default.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:22 -05:00
Cole Robinson
0c2cb36475 tests: uitests: Test linux2020 osinfo usage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
8903b470f1 details: Have 'copy host CPU' mean 'host-passthrough'
Adjust the UI to leave the box checked for both host-model and
host-passthrough, but host-passthrough is now what it means when
the user selects it. host-model can still be selected via the
CPU model drop down list

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
8377b7f7b6 details: Remove 'detect zeroes' UI
After checking with qemu devs, this option is not really recommended
for common usage and doesn't get used much in practice. So I don't
think it is suitable for the UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:50:53 -05:00
Cole Robinson
c3e9db5f3a createvm: Tweaks to new UEFI pref
* Make it clear in code and UI that this is x86 only. Other arches
  either require UEFI (aarch64) or don't support it
* Drop the internal 'bios' values since we don't handle them and may
  not want them anyways, since when win11 support lands we will need
  to explicitly throw an error if the user tries to force bios
* Add UI tests

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-31 14:18:42 -05:00
Cole Robinson
5003f0432e details: Add os.firmware=efi in the firmware selector UI
Let users choose libvirt's os.firmware=efi setting in the UI, putting
it about the firmware path list, since it's the preferred default
these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 13:23:27 -05:00
Cole Robinson
6c3b5def81 netlist: Revive portgroup UI
I removed Portgroup UI in 4c3c53f773 release 3.0.0, but there's been
a steady stream of requests to bring it back. It seems it's commonly
used with some certain openvswitch config.

Maint burden isn't too bad. Let's bring it back

Fixes: https://github.com/virt-manager/virt-manager/issues/169

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 16:01:17 -05:00
Cole Robinson
c9ce3ad84e tests: uitests: Add some coverage for 'Enable shared memory'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 12:26:14 -05:00
Cole Robinson
b39aa1ea79 tests: Clean up URI building and naming
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 10:32:03 -05:00
Cole Robinson
4a933b0223 uitests: Test graphics port fix
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-21 13:19:57 -05:00
Cole Robinson
acaca061be uitests: top off test coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-17 17:11:18 -05:00
Cole Robinson
4f02ccd7b5 uitests: Mock virtBootstrap
It's historically flakey to keep it + skopeo + virt-sandbox
all working, let's just mock it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-17 15:13:12 -05:00
Shalini Chellathurai Saroja
0e15cd51df virt-manager: enable MDEV support
Enable virt-manager GUI to support add, edit, remove, hot-plug and
hot-unplug of mediated devices (like DASDs, APQNs and PCIs) in virtual
server.

It is not possible to edit MDEV when a virtual server is in
running state, as this is not supported by libvirt.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-06-08 09:58:50 -04:00
Cole Robinson
a8e978dd38 pylint: Another fix for gtk3 version detection
We need to place require_version calls earlier and before
any code that might import Gtk/Gdk

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
61a4c00835 tests: uitests: Add mock test for VNC autoresize
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-19 16:46:30 -04:00
Cole Robinson
60ecc1c223 uitests: createvm: Fix with latest osinfo
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-12-07 14:54:13 -05:00
Cole Robinson
41eda8a431 tests: Remove now redundant LANG overrides
We added a central one in the previous commit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-12-07 14:32:27 -05:00
Cole Robinson
488f153655 fsdetails: Rework XML building logic
Make it work more like gfxdetails. The problem with the current
approach is that it requires effectively rebuilding the whole device
to match the original device when we want to edit a single field,
which is error prone.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-14 16:09:21 -05:00
Cole Robinson
41023192ca fsdetails: Stop showing the 'driver' combo for qemu
The only valid value now is 'path' which is also the default,
so drop the UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-13 13:17:41 -05:00
Cole Robinson
374ea52be0 fsdetails: Remove wrpolicy UI
This is an obscure setting. If users need it they can set
it manually in the XML editor

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-13 12:20:57 -05:00
Cole Robinson
6a6c1c13d7 diskbackend: Fix volume lookup for existing rbd disk
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-11 19:06:32 -05:00
Cole Robinson
9f930bd329 tests: uitests: fix clone case after recent changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-11 18:07:50 -05:00
Cole Robinson
0643adfc49 uitests: Make sure we hit details perf page coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-30 17:44:15 -04:00
Cole Robinson
9c13d2f878 Remove use of problematic terminology
Following kernel recommendation here:
https://lkml.org/lkml/2020/7/4/229

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-23 14:33:17 -04:00
Cole Robinson
12fe58cd91 uitests: Use drag() method again for window cleanup tests
delete and createvm tests launch a dialog which obstructs the
manager UI. The location can be kinda random, and it might obstruct
selecting the connection in the manager window. Go back to using
the drag() window pattern to make this more deterministic

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-22 11:28:21 -04:00
Cole Robinson
9a5ab50b51 gfxdetails: Use a single 'changed' signal
And absord device building from addhardware. This moves all the
knowledge to gfxdetails, which saves sprinkling it around in other
places

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 22:11:17 -04:00
Cole Robinson
e5a51f6374 details: Change Close accelerator to ctrl+shift+w
Close accelerator changes ctrl+w -> ctrl+shift+w
Quit accelerator changes ctrl+q -> ctrl+shift+q

After aafb874c8, if the mouse pointer isn't inside the console
window, it has keyboard focus but ctrl+w will be sent to the vmwindow
and not the VM. ctrl+w is a common shortcut for deleting a word so
this is pretty disruptive if you are typing inside the VM

Use gnome-terminal-esque accelerators starting with ctrl+shift to
reduce the chance of collision.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 14:33:25 -04:00
Cole Robinson
05174f3719 uitests: More workaround for newvm wizard focus grab issues
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 19:48:22 -04:00
Cole Robinson
295c8a86dd details: Add host-passthrough as an explicit CPU UI choice
Historically we have not advertised host-passthrough because it was
not recommended for general usage. That stance is softening,
tools like gnome-boxes already set it as the default, and users
continue to ask about it.

We may change the default in virt-manager but it will take more
discussion. This is a tiny move in the direction of hiding it less
than we already do.

Drop the label for host-model and call it by its libvirt XML name,
since otherwise it's hard to tell which combo choice is for each
value

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 18:21:43 -04:00
Cole Robinson
2f7931da63 createvol: Drop Allocation field in favor of checkbox
Inspired by some discussion from here:
https://bugzilla.redhat.com/show_bug.cgi?id=1759454

Most libvirt storage volume creation doesn't actually do anything
with allocation, besides interpreting cap == alloc and cap != alloc.
The exceptions are zfs volumes, and raw file volumes. But it's unclear
what the usecase is for the latter at all.

This drops the allocation spinner and adds checkbox in its place
'Allocate entire volume now'. When enabled, it sets cap == alloc.

We only show this for file volumes. For qcow2 it defaults to unselected
(sparse), for all others it defaults to selected. If it's not showing,
it defaults to selected.

Bundled with this change is showing this field for qcow2, where
we previously only allowed nonsparse here. Libvirt and qemu-img
support non-sparse qcow2 these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 17:08:39 -04:00
Cole Robinson
092a62552c uitests: More work to drop sleeping and hacks
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 14:32:55 -04:00
Cole Robinson
ba08f84b34 addstorage: Return to using qcow2 sparse by default
https://bugzilla.redhat.com/show_bug.cgi?id=1759454

See 15a6a7e210

The idea behind virt-manager's sparse vs nonsparse default, is that if
the user selected 'raw' for as the default image format, assume they
want to maximize performance, so fully allocate the disk.

qcow2 didn't support anything except sparse, so the sparse=True vs
sparse=False made no difference. So we always set sparse=False

Then qcow2 grows non-sparse support, and virt-manager is suddenly
defaulting to it, which is not the intention.

Default to sparse when requested format isn't raw

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 10:11:36 -04:00
Cole Robinson
6f8b9c13a7 uitests: Test raw diskimage default via keyfile
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 10:11:36 -04:00
Cole Robinson
6a88f92fd0 preferences: Unconditionally add VM sound devices
This is another preference that was added before anyone ever asked
for it. I'm fine with suggesting users remove the device manually
if they don't want it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00