Commit Graph

7495 Commits

Author SHA1 Message Date
Cole Robinson d24b3ba1d1 cli: Add virtio driver packed= option
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 09:00:33 -04:00
Cole Robinson bc246aeaba cli: Add --iommu comment heading
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 09:00:33 -04:00
Cole Robinson 65f93e5d60 cli: support --sysinfo type=fwcfg,entry...
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 09:00:33 -04:00
Cole Robinson 5643a560d5 domain: Fix details performance page graph scaling
This was busted in a88a28d0

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 09:00:33 -04:00
Cole Robinson ac8591192f console: Add option to disable autoconnect
As part of making virt-manager cooperate better with external viewers,
add an option to disable console autoconnect. When opening a VM window
for a running VM, you'll see a 'Connect to console' button in place
of the spice/vnc viewer. Click that and things proceed like normal.

This is useful to prevent virt-manager from disconnecting a virt-viewer
instance that's already attached to a VM

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:59:31 -04:00
Cole Robinson bbbfd4b7c8 vmwindow: Default the console widget to 1024x768
When a VM window is launched for the first for a VM, currently we
set the top window size to 800x600 which is small and arbitrary and
is universally shrinks the viewer too much to fit any OS installer
I can find.

Instead do some hacks to resize the window to accomodate a viewer
widget of 1024x768 which seems to be what QXL graphics give us for
win10 and Fedora 32 installers. So for new VMs hitting the OS installer
we don't see scrollbars.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:37:11 -04:00
Cole Robinson 43512302f7 vmwindow: Cleanup the interaction with vmmConsolePages
- Add ui/console.ui for console-pages and below
- Add move auth and graphics unavailable pages to a new subnotebook
- Move all the menubar handling up into vmwindow
- Clarify the control flow as much as I can come up with

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:37:11 -04:00
Cole Robinson 48bf5c6ab8 uitests: Fix some clonevm flakiness
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:22:19 -04:00
Cole Robinson aafb874c85 viewers: Enable window modifiers when viewer doesn't have keyboard
Right now this is tied to widget focus, which is too strong. This
changes it so that say clicking on the window title or toolbar then
allows the user to use Alt+F to trigger the File menu for example.
This roughly matches how virt-viewer works

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 11:25:50 -04:00
Cole Robinson 33a61f7f30 prefs: Remove 'Force console accels' option
This is very obscure and definitely not in line with our DESIGN.md
nowadays

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 09:15:53 -04:00
Cole Robinson 971a3e58f8 uitests: Fix createvm test after tests/data move
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 09:11:23 -04:00
Cole Robinson ec90d1360d createvm: Help make UI tests more reliable
We check if the page moved forward in uitests by scraping the top
label. Make sure we do that last when the page changes

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 08:49:12 -04:00
Cole Robinson b88e755a52 console: Text console submenu improvements
* Move all the menu building to its own class, for clarity
* Rename the menu 'Consoles' since it contains graphical choice as well
* Strip out the VM console duplicate if it exists
* Simplify the code a bit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 08:49:12 -04:00
Cole Robinson 5473695fe1 installer: Upload unattended and cloudinit data to remote connections
* rename kernelupload.py to volumeupload.py and make the entrypoint
  more generic
* move all upload invocation to the Installer class
* use it with cloudinit and unattended ISO generation if required

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 19:24:21 -04:00
Cole Robinson 44033b43bb virt-xml: Handle removing <console> <serial> dup device
This is a quirk of libvirt that the first <device> is usually a
logical duplicate of the first <serial> device. Adjust virt-xml to
understand this quirk and remove both devices at the same time,
like we already do in virt-manager

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:55:09 -04:00
Cole Robinson e2419869e7 tests: data: Move all cli/ bits to their own directories
Move the content to:

* cli/virtclone/
* cli/unattended/
* fakemedia/

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:48:40 -04:00
Cole Robinson 900ff8c3e1 tests: Move cli virt-xml input XML to a virtxml/ dir
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:39:38 -04:00
Cole Robinson 38cd19b0c3 domain: Fix VM deletion with firmare='efi'
Our check for nvram was not complete for that case

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:32:00 -04:00
Cole Robinson 1689ebb251 viewers: spice: remove unused audio channel handle
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:32:00 -04:00
Cole Robinson 7d69783042 virtManager: misc reference leak fixes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:32:00 -04:00
Cole Robinson d073ee9a48 addstorage: Revive disk serial UI
coreos is going to start using disk serial for ignition disk, so
setting this in the UI for distro testing will become more common

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:32:00 -04:00
Cole Robinson c54da68535 addstorage: Absorb advanced field UI
Share the UI for changing all these disk properties:

- shareable
- readonly
- removable
- cache
- discard
- detect zeroes

Move them all under the 'Advanced options' expander in details, and
add the checkbox options to the addhardware wizard.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 17:32:00 -04:00
Cole Robinson 8d5439567b uitests: finish statsmanager.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 17:50:57 -04:00
Cole Robinson 5e495ebd46 migrate: Add XML editor support
Allows the user to tweak the XML at the destination, which is already
something that libvirt supports

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 17:50:48 -04:00
Cole Robinson 16ebab2230 clone: Rework the UI
* Drop the network editing, users can use the details window
* Drop the combo box approach in favor of a regular treeview
* Drop a lot validation checks which are redundant with modern
  virtinst. We probably lose some checks but I don't think it's
  too important
* Use the cloner API
* Add uitest coverage

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson b9de8ad919 cloner: Fix some corner cases with name generation
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 5c1a1076c0 cloner: Log the generated XML diff, not the whole thing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 4a47d32b09 xmlutil: add a diff() helper
And centralize all the scattered difflib calls we have

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 7f1f5e343e codespell: Whitelist 'cloneable'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 8856b781d0 cloner: Write preserve vs share vs clone into DiskInfo
This let's us move more of the preserve logic to virtclone.py
and prep more things to share with virt-manager

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson e6df73261b cloner: Rename clone_disk -> new_disk
The latter is more clear in most contexts, and will make more
sense for future changes

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 9c1453a253 disk: lookup volumes in disk.set_backend_for_existing_path
Seems like it should be doing this.
Make use of that helper in cloner afterwards

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 8f60e4af47 tests: Add our own test:///default driver XML
test:///default saves changes for the lifetime of the connecting
process, which can cause weird interdependent issues in the test
suite. Duplicating it with driver XML will avoid those issues
popping up.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson f06325904b cloner: Share more clone disk building logic
We use this in virt-manager for nvram move on VM rename, so
let's simplify things for all callers

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson f23a27639f cloner: Big API rework
* Centralize lots of disk building
* Open code virt-clone specific behavior at the source
* Drop a lot or properties
* Move most testing to test_cli.py
* Generally a ton of cleanup

virt-manager clone wizard has not been converted yet so is totally
broken after this commit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson c0d1e76941 tests: Cover more of cloner.py from test_cli.py
Cover more cases via the virt-clone CLI testing, than just the
test_cloner.py unit style testing.

Change most of the virt-clone --print-xml testing to also attempt the
clone operation as well via a hidden cli option, to ensure we aren't
testing XML of any bogus operations

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson f157aa1839 diskbackend: Simplify path a case of path joining
We are reimplementing os.path.join. Make sure the standard cli
test suite hits this case too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson f46e1a395c tests: cli: Drop most usage of virt-clone --clone-running
This is just a test suite hack from before we had other methods
of specifying cloneable guests. It will be removed soon

We need to tweak some test XML to fix code coverage after

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 39e8d60bea tests: cli: drop some clone --original-xml arg redundancy
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 92b46245bd uitests: finish connection, connectauth
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson cb49648106 uitests: Finish inspection.py coverage
As much as we can. There's not any current way to actually test
the full guestfs implementation, so we exclude it all

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:04:36 -04:00
Cole Robinson 55fd4ccd23 uitests: Add connection login console lookup testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:04:36 -04:00
Cole Robinson 485dddf2ed uitests: Add connection user/pass auth testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:04:36 -04:00
Cole Robinson f6e880b195 uitests: Add connection nodedev and agent event testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:03:51 -04:00
Cole Robinson 306c6be12f uitests: Add connection tick failure testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:03:51 -04:00
Cole Robinson 14232e1aa7 connection: Don't process errors in tick_from_engine
We haven't shown error dialogs for failed connections for a long
while, so all this processing isn't accomplishing anything anymore

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:03:51 -04:00
Cole Robinson 29f866e6f3 uitests: add connection object blacklist testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-02 12:59:25 -04:00
Cole Robinson a10d746c41 gfxdetails: Update UI a bit
Refactor the internals to cleanly separate the pieces that fill in
the UI, and the pieces that react to UI state to dynamically show/hide
fields.

Improve spice GL warnings while he are here, and several other minor
fixes

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 20:10:34 -04:00
Cole Robinson 525afd1aa6 DESIGN: More examples of rejected console features
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 20:02:21 -04:00
Cole Robinson bd4b53e7da netlist: Remove some leftover print debugging
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 18:04:29 -04:00