summaryrefslogtreecommitdiff
path: root/virtManager
Commit message (Collapse)AuthorAgeFilesLines
* asyncjob: Remove unused importCole Robinson2023-01-191-1/+0
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* asyncjob: Fix backtrace when no cursor theme installedCole Robinson2023-01-191-3/+1
| | | | | | Fixes: https://github.com/virt-manager/virt-manager/issues/479 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Clean up FileChooser usage a bitCole Robinson2022-12-1410-141/+117
| | | | | | | * 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>
* addhardware: Fix backtrace when controller.index is NoneCole Robinson2022-12-131-1/+1
| | | | | | | | | | | | When creating a new VM, in the customize wizard we can't depend on index= value being set (virtinst doesn't do it for example). For example, this causes a backtrace when adding two virtio-scsi controllers via the Customize wizard, or adding an extra virtio-scsi controller to an aarch64 CDROM install. Reported-by: Charles Arnold <carnold@suse.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Fix pylint/pycodestyle warnings with latest versionsCole Robinson2022-12-134-7/+7
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* diskbackend: Drop support for sheepdogLin Ma2022-11-071-2/+0
| | | | | | | The sheepdog project is no longer actively developed, Libvirt removed the support for sheepdog storage backend since v8.8.0, Let's drop it. Signed-off-by: Lin Ma <lma@suse.com>
* fsdetails: Fix an error with source.socket of virtiofsLin Ma2022-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Using the source.socket of virtiofs needs a virtiofsd daemon launched outside of libvirtd, So the filesystem UI doesn't support it yet. If users need it they can set it manually in the XML editor. But if we view the filesystem info of such a VM on the details page, It fails with this error message: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/details/details.py", line 1713, in _refresh_page self._refresh_filesystem_page(dev) File "/usr/share/virt-manager/virtManager/details/details.py", line 2241, in _refresh_filesystem_page self.fsDetails.set_dev(dev) File "/usr/share/virt-manager/virtManager/device/fsdetails.py", line 193, in set_dev self.widget("fs-source").set_text(dev.source) TypeError: Argument 1 does not allow None as a value This patch fixes above issue by leaving the 'source path' info blank in case of source.socket. In this case, Considering that showing 'target path' info without source info is kind of meaningless, So this patch leaves the 'target path' info blank as well. Signed-off-by: Lin Ma <lma@suse.com>
* xmlutil: Take unindent_device_xml from details.pyCole Robinson2022-08-031-22/+2
| | | | | | We will use this in virt-xml soon Signed-off-by: Cole Robinson <crobinso@redhat.com>
* vmwindow: Customize window should not be 'deletable'Cole Robinson2022-08-011-0/+1
| | | | | | | | | This forces the user to use the 'Cancel' button, which gives a warning about the install being aborted Resolves: https://github.com/virt-manager/virt-manager/issues/416 Signed-off-by: Cole Robinson <crobinso@redhat.com>
* connection: De-duplicate ui and cli version loggingCole Robinson2022-08-011-5/+0
| | | | | | | Remove the open coded version logging in cli.py and virt-manager connection.py, and move it into virtinst connection open Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Fix UI rename with firmware='efi'Cole Robinson2022-06-201-9/+27
| | | | | | | | | 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>
* details: Go back to old Channel naming formatCole Robinson2022-06-131-2/+4
| | | | | | | | | 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>
* virt-manager: add support for qemu-vdagent channelJonathon Jongsma2022-06-132-3/+14
| | | | | | | | | | | | | | | | | | | | | 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>
* virtmanager: Remove executable bitCole Robinson2022-04-131-0/+0
| | | | | | rpmbuild complains about it Signed-off-by: Cole Robinson <crobinso@redhat.com>
* viewers: Fix import error when spice is missingCole Robinson2022-03-011-2/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* addhardware: add "none" video typeTudor Brindus2022-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | In some setups, it is useful to have Spice input, clipboard, audio, etc., but not video, for instance when doing GPU passthrough -- one can interact inside the VM via Spice rather than USB passthrough, and use a plugged-in monitor or alternate VM viewers like Looking Glass[1] for video. It is already possible to specify a "none" video device by manually typing into the "Model" combobox and hitting "Apply". Yet, this is unintuitive. Despite being documented everywhere GPU passthrough is brought up, in the Looking Glass community we still get ~daily support requests from users who couldn't figure out how to disable Spice video. This patch makes "None" an explicit option in the video model combobox, in the hopes that this is more straightforward for users to get right. [1]: https://looking-glass.io/ Signed-off-by: Tudor Brindus <contact@tbrindus.ca>
* details: viewers: Fix variable override from outerscopeCole Robinson2022-02-281-2/+2
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* tests: uitests: Add coverage for when spice is missingCole Robinson2022-02-272-7/+13
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* diskbackend: Set relative path for media changeCole Robinson2022-02-271-0/+4
| | | | | | | | | | 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>
* details: Only show channel state for qemu ga channelCole Robinson2022-02-241-3/+8
| | | | | | | | | | 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>
* ui: Remove use of deprecated GtkAlignmentCole Robinson2022-02-204-9/+7
| | | | | | | Mostly this is replaced with widget padding, and GtkBox for generic containers Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Clean up gtk STOCK and various image usageCole Robinson2022-02-1912-92/+40
| | | | | | | | | - 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>
* storagepool: Fix backtrace in cleanup pathCole Robinson2022-02-191-1/+1
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* fsdetails: Point users to Memory screen if shared memory not enabledCole Robinson2022-02-191-0/+11
| | | | | | | | | | | | | 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>
* fsdetails: Show virtio-9p vs virtiofs driver fieldCole Robinson2022-02-191-5/+18
| | | | Signed-off-by: Cole Robinson <crobinso@redhat.com>
* fsdetails: Hide 'Type:' field for qemu driverCole Robinson2022-02-191-0/+3
| | | | | | The qemu driver only accepts type=mount Signed-off-by: Cole Robinson <crobinso@redhat.com>
* fsdetails: Drop 'Mode:' UICole Robinson2022-02-191-25/+1
| | | | | | | | 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>
* virtManager: Split out tpmdetails.py and tweak itCole Robinson2022-02-194-125/+208
| | | | | | | | | | 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>
* details: Have 'copy host CPU' mean 'host-passthrough'Cole Robinson2022-02-161-5/+8
| | | | | | | | | 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>
* virtManager: oslist: Push users towards linuxXXXX optionsCole Robinson2022-02-121-3/+14
| | | | | | | | 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>
* osdict: Simplify os list sortingCole Robinson2022-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | Previously we tried to use a combination of distro class and version number to produce a correct ordering that was independent of the osinfo short ID. The original intent was to have correct ordering for Windows entries in the virt-manager UI, since the short ID values are all over the place. Nowadays that doesn't really matter, since we weed out old unsupported entries by default. And in the mean time, our current sort method gives some weird results like interspersing silverblue entries with fedora entries. Using a natural/human sort is simpler and handles things pretty well. Change the UI to sort by the OS label too which preserves some of the good behavior of original method Signed-off-by: Cole Robinson <crobinso@redhat.com>
* addhardware: tweak mdev inactive UICole Robinson2022-02-122-18/+19
| | | | | | | | - Move tooltip to the tree row instead of the finish button - Some style cleanups - Add a hack so we can hit it in the test suite Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virt-manager: prevent attach of inactive nodedevsShalini Chellathurai Saroja2022-02-111-3/+27
| | | | | | | | | | | | | | | With virt-manager application, it is possible to add inactive node devices(eg: mediated device) in host system to guest system. But it is impossible to start a guest system with inactive node devices. Also, it is not yet possible to start a node device with virt-manager application. So, the user cannot use the inactive node devices. This patch disables the "finish" button and provides a tip, when inactive node devices are selected. So, it is not possible to add inactive node devices to the guest system. Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
* Revert "virt-manager: prevent attach of inactive nodedevs"Cole Robinson2022-02-111-39/+3
| | | | | | This reverts commit 216dc6e4e12a628ceebfd692075b3a36b7be97d8. This was not meant to be pushed, the patch is still under review
* Update domain title/description on corresponding eventMichal Privoznik2022-02-091-0/+1
| | | | | | | | | | | If a domain is edited outside of virt-manager (e.g. via virsh edit) then this is reflected in the GUI (in the domain HW details tab). However, if domain title or description is updated outside of virt-manager (virsh desc) then this change is not reflected. This is simply because the corresponding event emitted by libvirt is not listened to. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
* virt-manager: prevent attach of inactive nodedevsShalini Chellathurai Saroja2022-02-031-3/+39
| | | | | | | | | | | | | | | With virt-manager application, it is possible to add inactive node devices(eg: mediated device) in host system to guest system. But it is impossible to start a guest system with inactive node devices. Also, it is not yet possible to start a node device with virt-manager application. So, the user cannot use the inactive node devices. This patch disables the "finish" button and provides a tip, when inactive node devices are selected. So, it is not possible to add inactive node devices to the guest system. Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
* details: Remove 'detect zeroes' UICole Robinson2022-02-032-22/+2
| | | | | | | | 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>
* createvm: Tweaks to new UEFI prefCole Robinson2022-01-313-10/+8
| | | | | | | | | | | * 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>
* virt-manager: Add firmware preferences for creating a new VMCharles Arnold2022-01-313-1/+36
| | | | | | | | 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
* Revert "details: console: drop hardcoding background color as black"Cole Robinson2022-01-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aaabb44ac73dfaaa49f5d70be689d9e433801121. I figured out how to trigger this: it's when scaling is enabled. To maintain VM aspect ratio, we have to constrain the size of the viewer widget. When the widget is smaller than the VM window, the viewport widget is visible. This change made the viewport the default theme color, rather than black. Problem is, in the non-scaling case, we don't shrink the viewer widget but let it expand to fill the whole area. This is necessary to get the 'Autoresize VM with window' option to work, but is also simpler in the cdoe. The viewport widget is not visible, and gtk-vnc and spice-gtk paint the non VM owned areas as black. AFAICT that's not configurable in any way. So after this change we have differing behavior for scaled and non-scaled cases, which is confusing and visually kinda comes off as a bug. So this reverts back to the old behavior and explains all this in a comment.
* details: Add os.firmware=efi in the firmware selector UICole Robinson2022-01-262-30/+43
| | | | | | | | 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>
* guest: Use os.firmware=efi for --boot uefi, if it is supportedCole Robinson2022-01-261-1/+1
| | | | | | | | | | | <os firmware='efi'> is the libvirt official way to do what we historically implement with `--boot uefi`, and UEFI setup in virt-manager. Let's prefer libvirt's official method if the support is advertised in domcapabilities. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* guest: Rework set/get_uefi entry pointsCole Robinson2022-01-261-6/+6
| | | | | | | | | | | | | | | | | | This replaces the pattern: Guest.set_uefi_path(Guest.get_uefi_path()) With a single entrypoint Guest.enable_uefi() to immediately change the guest config to use UEFI, using our default logic. This will make it easier to change that logic in the future, like using <os firmware='efi'> instead of hardcoded paths Signed-off-by: Cole Robinson <crobinso@redhat.com>
* netlist: Revive portgroup UICole Robinson2022-01-254-7/+49
| | | | | | | | | | | | 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>
* device: netlist: Rework source row data structureCole Robinson2022-01-251-37/+39
| | | | | | | Put non-UI bits into a class, rather that stuff them into gtk columns. Simplifies adding bits here Signed-off-by: Cole Robinson <crobinso@redhat.com>
* details: Strip back 'Enable shared memory' to only cover memfdCole Robinson2022-01-251-26/+9
| | | | | | | | | | | | | | | | | Strip back the logic to: * Only try to toggle source_type=memfd and access_mode=shared * Disable the field if guest has any <numa> config * Disable the field if domcaps does not report virtiofs and memfd This is the simplest future proof case, though it will exclude some legit guest configs and some libvirt+qemu back compat. My feeling is the <numa> stuff in particular is pretty advanced, so if users have it configured they can toggle shared memory via the XML without too much trouble. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* details: Move 'shared mem' editing and tooltip logic to domain.pyCole Robinson2022-01-252-63/+66
| | | | | | | We will eventually want to share this with the addhw wizard, so it should live in a shared space. Signed-off-by: Cole Robinson <crobinso@redhat.com>
* details: Add new checkbox to control shared memory accessLin Ma2022-01-252-1/+68
| | | | | | | | | | | | | | | | | | | | | | 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>
* guest: Remove the hyperv + uefi workaround for win7 + win2k8r2Cole Robinson2022-01-251-1/+0
| | | | | | | Both these windows versions are now longer supported, and UEFI isn't the default, so I don't think this hack is much needed anymore Signed-off-by: Cole Robinson <crobinso@redhat.com>
* virtManager: nodedev: Handle failure to lookup drm parentCole Robinson2022-01-211-2/+9
| | | | | | | | | | | | Apparently nodedev drm XML can link to a parent device that we can't look up? We shouldn't be trying to do the full address string compare anyways, so just try the name lookup, which would improve the error here too Fixes: #328 Signed-off-by: Cole Robinson <crobinso@redhat.com>