virtManager/createvm.py:982:8: W0128: Redeclared variable 'ignore' in assignment (redeclared-assigned-name)
tests/uitests/lib/app.py:12:0: C0411: third party import "from gi.repository import Gio" should be placed before "import dogtail.rawinput" (wrong-import-order)
Signed-off-by: Chen Hanxiao <chenhx.fnst@cn.fujitsu.com>
This uncovered some areas in details.py we weren't handling that
the search view unselects the current selection
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Move the VM status and viewer open checks into the default page
path as well, otherwise opening the details dialog for an offline
VM attempts to connect to the inactive VM console and logs backtraces
Signed-off-by: Cole Robinson <crobinso@redhat.com>
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>
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>
- 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>
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>
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>
* 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>
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>
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>
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>
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>
* 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>
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>
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>
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>
RAM is rarely changed from the default
heads does not have any explicit virt-manager support
and both are viewable from the XML editor.
So remove the explicit fields for them
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This works fine for the StatusIcon backend, but for the appindicator
backend which communicates every menu changes over dbus this is
super slow. Instead update the menu in place when objects change
state or disappear
https://bugzilla.redhat.com/show_bug.cgi?id=1779362
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This was added in 2014 per user request but we never exposed it in the
UI. This is fairly advanced needs from the console viewer IMO and is
better left to console specific tools like virt-viewer, per our
DESIGN.md
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Make it explicit that all uses of this is actually the object
name. We already leaked this abstraction in several places so better
to make it explicit. This also communicates to users that this is a
field that is not immutable so it shouldn't be used as a unique key
Signed-off-by: Cole Robinson <crobinso@redhat.com>
And not connkey. connkey == name, and name can change with object
rename, so it's a bad pattern to propagate that connkey can be used
as a static lookup key for objects. This begins unwinding it
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Otherwise early 'change' signals can give inconsistent
behavior WRT default 'advanced' expander state
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This code path was never hit because it came after caps.guest_lookup
which errors in this case. We need to check things earlier
Signed-off-by: Cole Robinson <crobinso@redhat.com>
In all modern local cases we will be using openFD to get a direct
file descriptor from the VM, so this code should never be triggered
nowadays
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Break it into disable-libguestfs, fake-systemd-success, and
firstrun-uri suboptions, and adjust using code to match
Signed-off-by: Cole Robinson <crobinso@redhat.com>
And also the embedded label, our default behavior covers
this well enough for what is likely to be an obscure case
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Privatize a bunch of stuff
* Make public API explicit
* Add a few minor public APIs to avoid accessing internal state
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This was added in cb182f7e3 in Mar 2017 to work around a bug in
qemu 2.9. This bug only affects the case of virt-manager running
locally with that version, which after three years should be rare
to non-existent. Remove the workaround
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Privatize a lot of stuff
* Separate out many callbacks as thin wrappers around the real code
* Simplify registering EDIT_ handlers
* Organize things better
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is pretty obscure, and if it's problematic then libvirt
or qemu should be throwing an error or otherwise reporting it
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Unset rendernode when spicegl is de-selected
* Set rendernode by default when spicegl is first selected
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Always force a network selection. If we have to fall back to
manual bridge UI because nothing else exists, show a warning.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This case should be exceedingly rare, and we already show
a visual warning about 'no network'. So let's drop this
Signed-off-by: Cole Robinson <crobinso@redhat.com>
The versions we are warning about are all over 4 years old, and
these warnings were initially just informative to help users know
when the config wasn't going to work. Drop most of it. Still warn
in the UI when a VM misconfig will prevent spice GL from working
Signed-off-by: Cole Robinson <crobinso@redhat.com>