Commit Graph

8641 Commits

Author SHA1 Message Date
taoky
0c981eec58 tests: Add test for DeviceDisk.paths_in_use_by 2024-07-22 12:42:10 +02:00
taoky
328cabca8f hoststorage: Use DeviceDisk.paths_in_use_by for performance
When there's a pool with many vols (files), and user clicks on "Browse" in
VM's Virtual Disk details, the UI could stuck for up to several minutes.

By using DeviceDisk.paths_in_use_by() for bulk getting names, it could
show browser much faster.
2024-07-22 12:42:10 +02:00
taoky
cd8eeaf56d virtinst: disk: Add paths_in_use_by()
conn.fetch_all_vols() is slow, taking ~0.03s every time it's used. When
handling with a large number of paths, its performance is too bad and
could stuck UI for a very long time.

DeviceDisk.paths_in_use_by is added to help handle many paths with
only one call to conn.fetch_all_vols().
2024-07-22 12:42:10 +02:00
Pavel Hrdina
8a0e22397d tests: add s390x default test case
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-07-02 15:40:51 +02:00
Pavel Hrdina
43f581c26c virtinst: add graphics to risc-v virt VMs by default
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-07-02 15:40:51 +02:00
Pavel Hrdina
faebce406b virtinst: add graphics to aarch64 virt VMs by default
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-07-02 15:40:51 +02:00
Xianglai Li
9ede5d22d5 Add test cases for loongarch
Add some basic test cases for loongarch.

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-06-18 12:09:14 +02:00
Xianglai Li
ea3cae4dc9 Add some default device support for loongarch
Add adaptations for loongarch with the following features:
Default video Support
UEFI prefer
Usb tablet and usb keyboard
rng and memballoon
sound device
Usb controller

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-06-18 12:09:14 +02:00
Xianglai Li
d2cf01b3eb Add loongarch support
Define the judgment function of
loongarch architecture.

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-06-18 12:09:14 +02:00
Andrea Bolognani
eee8d09dfe cli: Deprecate --cpu host
While the shorthand saves a tiny bit of typing, it is confusing
to people coming from QEMU, where -cpu host is the equivalent
of our --cpu host-passthrough. It's better to stick with the
unambiguous names used by libvirt.

Besides, the GUI already uses "host-model" throughout, so
advocating its use in the CLI too increases the internal
consistency.

https://issues.redhat.com/browse/RHEL-40003

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-06-11 16:35:26 +02:00
Andrea Bolognani
8b5f73e96b cli: Don't suggest --cpu host
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-06-11 16:35:26 +02:00
Andrea Bolognani
0530df767a man: Don't suggest --cpu host
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-06-11 16:35:26 +02:00
scarf
ba3a098c3b virtinst: disk: strip away file:// protocol 2024-06-10 17:43:35 +02:00
Pavel Hrdina
5fcf506e08 tests: skip mdev tests for libvirt older than 10.4.0
The test driver was broken for some time and our mdev tests were failing
on most libvirt versions. Recently this was fixed in libvirt 10.4.0 so
skip these tests unless we have new enough libvirt.

This requires extracting some mdev devices from many-devices test case.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-06-06 14:11:34 +02:00
Jonathon Jongsma
6a85d79a31 xmleditor: make gtksourceview optional
The only thing that GtkSourceView gives us is syntax highlighting and
auto-indent. When this library is not available, we can still offer xml
editing with a plain textview with very little lost functionality.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2024-06-06 10:25:26 +02:00
Andrea Bolognani
a91e23c858 install: Use virtio-scsi for unattended installations
This won't make any difference on x86, where either SATA or IDE
is used depending on the machine type, but on other architectures
we want virtio-scsi for a reasonable chance that the guest OS
will recognize the disk.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
7f8230a158 guest: Prefer UEFI for riscv64
Most existing disk images expect UEFI; those that don't, require
either using direct kernel boot or manually providing a firmware
image, both of which imply user intervention.

Using UEFI by default means that at least images belonging to
the first group, of which more are going to pop up as the
ecosystem matures further, can work out of the box.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
6fca91f286 tests: Add more riscv64 tests
Cover additional scenarios: direct kernel boot, use of cloud-init,
installation from CDROM and unattended installation.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
3b09701f6b tests: Use SPICE graphics on riscv64
Provides more coverage, specifically the sound part.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
9ec5852591 tests: Switch to --osinfo for riscv64
It's the preferred name, and it's shorter to boot.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
0612dca8ee tests: Drop precompare_check from riscv64
We're using data from a much newer version of libvirt now.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Andrea Bolognani
094a81201a tests: Update riscv64 capabilities
The new capabilities reflect the status of riscv64
virtualization as of Fedora 40, which comes with libvirt
10.1.0 and QEMU 8.2.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2024-05-30 22:10:05 +02:00
Cole Robinson
1261666cf4 ci: Add test-against-libvirt-git.yml
Periodic job to run the test suite against libvirt.git

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-08 10:34:12 -04:00
Cole Robinson
ca25b41adc ci: clarify comment about what fedora packages we test against
it hasn't been virt-preview for a long while

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-07 16:46:40 -04:00
Cole Robinson
738a8d9f54 uitests: Fix with GtkFileChooserNative
Bring back the `Open` label for `Browse Local` option, but
preserver the SAVE dialog behavior (can enter a manual path)

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-07 15:55:48 -04:00
Michael Weghorn
db1b2fbce3 Use GtkFileChooserNative
Use GtkFileChooserNative [1] instead of GtkFileChooserDialog [2]
to integrate better with the platform (e.g. use the portal
implementation when run with GTK_USE_PORTAL=1, resulting in
the KDE Frameworks implementation being used when
xdg-desktop-portal-kde is in use). Quoting from
the GtkFileChooserDialog doc [2]:

> If you want to integrate well with the platform you should use the
> GtkFileChooserNative API, which will use a platform-specific dialog if
> available and fall back to GtkFileChooserDialog otherwise.

Also replace the use of GTK_STOCK_CANCEL [3] and GTK_STOCK_OPEN [4]
which were deprecated in GTK 3.10:

Both, the `accept_label` and `cancel_label` params of
`Gtk.FileChooserNative.new` can be `None` to use the default
text ("Open", "Cancel"). [5]

Adjust the only caller (in `vmmVMWindow#_takeScreenshot`)
that was passing an explicit label/icon name for the
accept button to pass `_("_Save")` as label, rather than
the also deprecated Gtk.STOCK_SAVE [6].
(GtkFileChooserDialog has special handling for Gtk.STOCK_SAVE
etc., but that's not generally the case for native dialogs).

Rename the method param from `choose_button` to `choose_label`
to make clearer that this is a label.

[1] https://docs.gtk.org/gtk3/class.FileChooserNative.html
[2] https://docs.gtk.org/gtk3/class.FileChooserDialog.html
[3] https://docs.gtk.org/gtk3/const.STOCK_CANCEL.html
[4] https://docs.gtk.org/gtk3/const.STOCK_OPEN.html
[5] http://pygobject-doc.gitee.io/pgi-docs/Gtk-3.0/classes/FileChooserNative.html#Gtk.FileChooserNative.new
[6] https://docs.gtk.org/gtk3/const.STOCK_SAVE.html

Fixes #315
2024-04-07 15:54:47 -04:00
Pino Toscano
231a3dbc87 build: use setuptools.command.build when available
Setuptools 62.4.0 adds setuptools.command.build to transparently replace
the old distutils equivalent; hence, use it when available to fully
switch away from distutils.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-04-07 14:29:48 -04:00
Pino Toscano
4f4e73d017 build: use super()
... rather than explicitly calling the parent class; this will make
further changes easier.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-04-07 14:29:48 -04:00
Cole Robinson
17d9f339d1 Tweak for codecov v4 2024-04-07 14:27:17 -04:00
dependabot[bot]
68efec21a7 ci: bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-07 14:27:17 -04:00
Pino Toscano
8f8a1b9b43 ci: checkout the code after installing git-core
This makes sure that the actions/checkout action uses git to fetch the
sources (and thus resulting in a git repository), rather than using the
REST API (and get a simple directory with sources).

This may be useful to certain services (e.g. newer version of
codecov-cli) as they need to have the sources as proper git repository.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-04-07 14:27:17 -04:00
Pino Toscano
14c5684f25 ci: split base dependency and build dependency installation
Split the installation of the base dependencies & the RPM build
dependencies in two steps, so they can be reordered as needed later on.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-04-07 14:27:17 -04:00
Pino Toscano
3f79e76e58 ci: install git-core as well
It will be needed by codecov/codecov-action v4.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-04-07 14:27:17 -04:00
Cole Robinson
e21129aebe ci: Rename CI workflow to Test on fedora:latest
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-06 16:14:46 -04:00
Cole Robinson
dce9de481f hostdev: Fix error when mdev type_id is missing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-06 15:54:09 -04:00
Cole Robinson
8b6db203f7 tests: Fix host-copy XML with libvirt 10.1.0
New `clusters` changes XML output

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-06 15:48:46 -04:00
tuksgig
4ffbc0d904 Allow serial console resize to beyond 80 columns.
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.
2024-03-26 17:34:50 +01:00
Pavel Hrdina
e95ca453c4 virtManager: ignore agen livecycle event for shutoff VMs
This event is mainly to refresh the VM XML to figure out the state of
virtio channels and that should happen only for running VMs.

This affects external snapshot behavior in virtManager. If the VM is
offline and user deletes external snapshot libvirt needs to start QEMU
process to delete the snapshot. The QEMU process is started with stopped
CPUs so it is visible as online and paused. It also emits the agent
lifecycle event but there is no other domain lifecycle event so after
the snapshot deletion the VM stays paused in virtManager even if it is
already offline in libvirt.

To mitigate this behavior we can ignore agent lifecycle event for
shutoff VMs.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-25 13:21:50 +01: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
Pavel Hrdina
f1ba012e8f virtManager: domain: allow disk only snapshots
This is used for external snapshots when the VM is offline.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-25 13:21:50 +01:00
Pavel Hrdina
d8565ac533 virtinst: snapshot: add memory file attribute
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-25 13:21:50 +01:00
Pavel Hrdina
3cde1acbb6 virtinst: add external snapshot capability
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-25 13:21:50 +01:00
Pino Toscano
dadb9a0d6f po: sort LINGUAS
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2024-03-04 06:26:27 +01:00
eirik song
55b4c1bc9e Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (1453 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/zh_CN/
2024-03-04 06:23:39 +01:00
김인수
1be248e645 Translated using Weblate (Korean)
Currently translated at 100.0% (1453 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ko/
2024-03-03 20:09:43 +01:00
Rafael Fontenelle
e4e406e386 Translated using Weblate (Portuguese (Brazil))
Currently translated at 95.8% (1393 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/pt_BR/
2024-03-03 20:09:43 +01:00
Temuri Doghonadze
9c4b789510 Translated using Weblate (Georgian)
Currently translated at 93.1% (1353 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ka/

Translated using Weblate (Georgian)

Currently translated at 88.3% (1283 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ka/
2024-03-03 20:09:43 +01:00
Geraldo S. Simião Kutz
c8c37cb0cd Translated using Weblate (Portuguese (Brazil))
Currently translated at 95.8% (1392 of 1453 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/pt_BR/
2024-03-03 20:09:43 +01:00
Cole Robinson
a6b62a20b6 systray: Cleanups and improvements for --show-systray
- Add UI coverage
- Drop redundant systray_instance caching
- Tweaks help test and docs
- Show an error if the systray doesn't embed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 14:18:04 -05:00
Cole Robinson
2043847ade uitests: More handling for slow startup on f39
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 14:18:04 -05:00