Commit Graph

513 Commits

Author SHA1 Message Date
Cole Robinson
d79d4633c8 snapshots: Don't save outdated screenshot data
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>
2024-09-25 10:18:38 +02:00
Cole Robinson
683b486c46 ui: snapshots: Fix button placement when resizing 'New' dialog
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-23 19:31:36 -04:00
Pavel Hrdina
5488ff4773 virtManager: add support to create external snapshots
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>
2024-03-25 13:21:50 +01:00
nose-gnome
bb86721352 ui: details: Increased scrolledview6's height request
Increased the height of scrolledview6 to make viewing applications  easier in os info
2024-03-02 14:19:28 -05:00
nose-gnome
04cc489529 ui: details: fix Applications width.
In OS info the applications tree view was too narrow to read the contents, so I enabled expanding horizontally for scrolledwindow6
2024-03-02 14:19:28 -05: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
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
Cole Robinson
015367fd85 ui: tpmdetails: Mark a uitests string as non-translatable
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson
34543b3ecd ui: Remove use of deprecated GtkAlignment
Mostly this is replaced with widget padding, and GtkBox for generic
containers

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 09:53:17 -05:00
Cole Robinson
382391eadb Clean up gtk STOCK and various image usage
- 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>
2022-02-19 15:33:42 -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
fd079a6132 fsdetails: Drop 'Mode:' UI
We only ever show mapped vs squashed, and the difference is pretty
advanced, so if users need it they can use the XML editor. Upcoming
virtiofs support will also make handling this field more complicated

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:41 -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
fc9a22afe0 oslist: fix window size in New VM wizard
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
1f8afc8668 virtManager: oslist: Push users towards linuxXXXX options
Have the UI push users more towards better defaults, by discouraging
the 'generic' entry and offering the 'linuxXXXX' entries when their
distro or OS version is not in the list.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -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
Charles Arnold
0a1dd8b822 virt-manager: Add firmware preferences for creating a new VM
Possible values are BIOS (default) and UEFI.
The firmware used is determined by libvirt unless a specific firmware is
selected from the Customize dialog.

See https://bugzilla.redhat.com/show_bug.cgi?id=1997882
2022-01-31 13:55:00 -05:00
Cole Robinson
f4aea0dca0 ui: Resave all files with latest glade
It creates a lot of churn.

Adjust phantom grid rows + columns while we are at it, not sure why
those counts are suddenly wrong

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-27 13:34:26 -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
ab9cdb55e0 details: shared mem UI tweaks
- Change label to 'Enable shared memory'
- Add accelerator
- Tweak table row fill

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 12:26:14 -05:00
Lin Ma
b4189a925b details: Add new checkbox to control shared memory access
The virtiofs in domcapabilities is used as a proxy to tell us whether
libvirt is new enough to allow bare memory access mode=shared', So We
enable/disable this checkbox according to it.

When we configure shared memory access, If the 'memfd' is available in
domcaps, We configure VM to use it as memory backend because it doesn't
need addtional host setup for vhost-user devices, Otherwise use 'file'
as backend.

If all of numa nodes explicitly defined memAccess=shared, We mark this
checkbox as checked even if virtiofs isn't exposed in domcapabilities.
In this case:
- It doesn't matter what the value of access mode of memoryBacking is
  because access mode of memoryBacking will be overridden per numa node
  by memAccess attribute.
- Although the checkbox is disabled, the checked checkbox presents actual
  status about shared memory access to users.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Cole Robinson
6659889319 progress: Some internal API cleanup
* Simplify start() and end() function signature
* Drop use of 'basename' and standardize on 'text'
* Add vmmMeter.is_started()
* Add vmmMeter.set_text()
* Fix asyncjob UI to show text in the progress bar

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
fe8722e763 createnet: Remove some unnecessary max_length annotations
Fixes: #238

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-04-06 13:35:15 -04: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
2b864a9294 fsdetails: Remove the combo vs label dynamic
If something would normally be shown only in a label, just
hide the row entirely. This was interesting for viewer XML
properties before we had the XML editor, but now it doesn't
add much

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-13 12:53:10 -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
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
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
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
Cole Robinson
748639702e preferences: Unconditionally add usbredir devs for spice
Remove the preference option to disable this. This was added with
the initial usbredir support because I was afraid people would
complain. They did complain, but only about the auto redir behavior
of the spice client. We still have a toggle to disable that behavior

If people don't want usbredir devices, I'm comfortable telling
them to remove them manually, or use virt-install

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Pino Toscano
8fbb985a8c i18n: improve title of connection dialog
Instead of using the title of the dialog and prepending the connection
label, create a new title as a single string. This way it is possible to
translate this title as single sentence.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Pino Toscano
519d409718 i18n: fix string puzzle in volume creation dialog
Use a single label to show the single sentence describing the available
space on the storage pool. This avoids the use of 3 different labels,
partially translated separately, and whose content cannot be moved.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 14:25:59 -04:00
Cole Robinson
7ec7b63f02 ui: Mark some uitests strings as non-translatable
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 19:12:24 -04:00
Cole Robinson
64222783d2 addhardware: Allow settings USB removable setting
We need to update addstorage when the user changes the bus setting

Fixes: #148

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 18:12:13 -04:00
Cole Robinson
6657e23a7a details: Revive maxmem and memory hotplug
This was removed in 7547905d79 but I've changed my mind about
dropping it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 17:59:51 -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
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
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
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
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
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
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
ba33a6c99d details: Remove explicit video heads and ram reporting
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>
2020-09-01 17:32:50 -04:00
Cole Robinson
1a3a89d949 uitests: finish delete.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 15:59:39 -04:00
Cole Robinson
30e021bd3d uitests: finish createvm.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 14:23:24 -04:00
Cole Robinson
c36f232370 uitests: Finish console.py and viewers.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 10:34:44 -04:00