IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Drop our hardcoded model lists, and just ask libvirt to fill in
a model for us. Add an entry to the combo box so users can type
in a non-default value if they want one.
Long term libvirt should be providing all this info to us via
domcapabilities
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Trying to size the window based on VM desktop resolution does
not do the correct thing when host fractional scaling is enabled
and using spice.
The best we can do here is ask the viewer widget for its
preferred size
Signed-off-by: Cole Robinson <crobinso@redhat.com>
_adjust_viewer_size has one remaining function: when scaling and
resizeguest is disabled, do
viewer.set_size_request(*desktop_resolution), so the viewer fills
out the scrolled window and scrollbars show up.
After playing with this all a bunch, I discovered two things
* spice already behaves the way we want, so we don't need to
manually intervene. so all that is unnecessary
* vnc has an option to behave the way we want, via the
set_force_size knob
So instead lets rip it all out, and implement the VNC piece by
toggling set_force_size based on whether scaling+resizeguest is
enabled.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Move shared init to `_set_display`
* Move per class init to `_init_display`
* Move per class signal setup to `_connect_display_signals`
* Make base class call cleanup of child class via `_close`
* Drop unnecessary spice `_display_channel` handle
Signed-off-by: Cole Robinson <crobinso@redhat.com>
this doesn't change any behavior, but it makes things cleaner
by not overloading the size-allocate signal
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This does not seem to be required anymore. We get notified on
viewer size-allocate already, which seems like enough.
Rename the function to _adjust_viewer_size which is more accurate
to what it does, and adjust the callers
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This mattered when we were doing widget adjustments to maintain
scaling ratio. But nowadays it seems totally redundant: we are
basically trying to set an allocation that already happened via
the normal chain of widget events, so it's a no-op.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Checking for resolution = None is a roundabout way to check if
the console was already opened. Make that more clear
Signed-off-by: Cole Robinson <crobinso@redhat.com>
+ Don't check for redirdev devices, let the spice widget tell
us if things aren't configured correctly.
+ Remove some duplication
Signed-off-by: Cole Robinson <crobinso@redhat.com>
We can not reliably use VM desktop resolution for host widget
sizes when the host is using desktop scaling, so don't even try.
This fixes the black bars around the VM console when scaling=never
and autoresize is disabled
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Spice has maintained aspect ratio for us forever.
GtkVnc was added in previous commit, provided since May 2021.
If user is running on an old GtkVnc, they just get potentially
stretched out viewing when scaling is enabled, so the fallback
scenario is no big deal IMO
Signed-off-by: Cole Robinson <crobinso@redhat.com>
We can use this signal to be notified when VM resolution changes.
Log when we actually detect a resolution change
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Current code will take a screenshot when the 'New Snapshot'
dialog is initially launched, and then use that cached content
as the screenshot for the snapshot... which may be totally out
of date by the time the user enters all the snapshot info.
Instead, drop the snapshot preview UI in the 'New Snapshot' wizard
entirely, and use a screenshot that is fetched after the user actually
clicks 'Finish'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Fix console config validation for an edge case where both libvirt and
Spice/VNC TCP connection are on localhost. Transport over TCP does not
necessarily mean that libvirt connection is to a remote host.
Compare libvirt and graphics device addresses to localhost individually.
Raise an error only when guest device is bound to localhost but libvirt
connection is non-local (remote).
Validation that prevents fully local TCP seems to go back all the way to
bc13c302de ("console: Warn if qemu+tcp URI and listen == 127.0.0.1").
Signed-off-by: Sami Loone <sloone@forcepoint.com>
Currently, View->Consoles disables the menu items for serial devices
when the VM is offline. This changes that behavior. This is useful,
since it allows you to pre-select serial console before starting the
VM, which can help ensure you don't miss any serial boot output.
It also makes the UI interaction more intuitive.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reproducer:
+ Start VM with 1 graphical and 1 serial console
+ Select serial console
+ Power off VM
+ Open console menu, select 'Graphical' option
+ See errors
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reproducer:
+ Enable libguestfs inspection
+ Open app and VM details 'Overview' window
+ After some time, the `Apply` button is mysteriously activated
+ Trying to switch away from the page will give 'Unapplied errors'
warning box
When libguestfs inspection completes, it triggers a signal which
will refresh the OS info details.py page. Which is fine, but we
should be limiting it to only refreshing the page if its the currently
visible one. Otherwise the `Apply` button can be activated, which
messages up app navigation
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Replace Gtk.Box.add() with Gtk.Box.pack_start() to place the VTE terminal widget. This enables horizontal expansion/filling the terminal widget when resizing the serial console window.
Add new 2 rows into the snapshotsnew windows, one to select if the
snapshot mode is `internal` or `external` and memory state location when
making external snapshot for running VM.
We will check if libvirt fully supports external snapshots by consulting
host capabilities and add `external` to snapshot mode only if it is
supported.
For external snapshots the memory state is stored in separate file but
libvirt doesn't have any default location so virtManager will get path
to all usable disks and create a dropdown menu for it, but user is still
allowed to modify that path to use whatever path they prefer.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
- Rework the ConsolePages abstraction to carry the Gtk.Menu. makes
it all less messy
- Make the console menu the single source of truth for console
embeddability, and error message reporting
- Small misc cleanups here and there
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Currently, when there are multiple graphics devices, the first graphics
device is always selected as the graphical console. For the following
configuration:
<graphics type="egl-headless">
<gl rendernode="/dev/dri/renderD128"/>
</graphics>
<graphics type="spice" autoport="yes">
<listen type="address"/>
<image compression="off"/>
<gl enable="no"/>
</graphics>
virt-manager will report an error:
Cannot display graphical console type 'egl-headless'
The patch will iterate through all graphics devices to try to select the
first embeddable graphics device as graphical console.
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Liming Sun <sunliming@kylinos.cn>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Now open_graphics_fd() always opens the 1st graphic device, when
there are multiple graphic devices (e.g. spice + egl-headless),
we need to specify the index number for libvirt.
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Ming Xie <xieming@kylinos.cn>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
* Move browse_reason handling entirely into storagebrowser.py
* Open code some of the browse_local logic at the few callers
Signed-off-by: Cole Robinson <crobinso@redhat.com>
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>
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>
This is the only one that we get notified when the XML changes,
so it's the only one we can be certain is up to date. Users have
gotten confused about out of date spice info here:
https://bugzilla.redhat.com/show_bug.cgi?id=2027867
Signed-off-by: Cole Robinson <crobinso@redhat.com>
- Remove most use of deprecated stock icons. Without it the UI will
be a lot more ugly in Fedora 36
- Remove deprecated ImageMenuItem usage, convert to regular MenuItem
- Remove most embedded button images
Signed-off-by: Cole Robinson <crobinso@redhat.com>
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>
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>