Commit Graph

8296 Commits

Author SHA1 Message Date
Cole Robinson
75422ec75e uitests: Make hotplug test pass on both f37 and f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
a9cf4945b1 tests: Default --uitests to --verbosity=2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 16:50:20 -04:00
Cole Robinson
6030049cd7 tests: uitests: Fix manager window repositioning test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:48:24 -04:00
Cole Robinson
7f83d23f4f tests: livetests: work around qemu media change regression
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:47:25 -04:00
Cole Robinson
909c8aa880 tests: uitests: Fix window reposition on f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 14:54:31 -04:00
Thomas Huth
102fe52165 man/virt-install: Add a note about different behavior of --boot on s390x
It is common on x86 and other architectures to install a guest from
network by using "--boot hd,network" with virt-install - as long as
the hard disk is not bootable yet, the installation will be started
via network, and once it finished, the guest can boot from hd during
the next reboot.

However, this does not work on s390x since this architecture only
supports one single boot device to be passed to the guest. Thus add
a note to the documentation to avoid that people are running again
into this common pitfall.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2032472
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-03-22 17:45:31 -04:00
Oleg Vasilev
7769548411 tests: cli: test serial file clone
Previous commit added serial file clone, now we test it.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
2023-03-22 17:44:06 -04:00
Oleg Vasilev
b2f6e95383 cloner: clone serial files
Before this, on clone the serial file would remain the same for the cloned
domain. This doesn't make much sense as the output would be an intermix of two
unrelated output sequences.

Here we apply the the same filename changing algorithm, as with disk files.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
2023-03-22 17:44:06 -04:00
Andrea Bolognani
33ff193ee9 virt-install: Document Secure Boot setups
Provide ready to use recipes for explicitly enabling and
explicitly disabling Secure Boot, as well as a pointer to
the more extensive information found on the libvirt website.

Setting loader_secure=yes is only one part of a proper Secure
Boot setup, so stop documenting it in the section about manual
firmware selection to avoid confusion.

https://bugzilla.redhat.com/show_bug.cgi?id=2112154
https://bugzilla.redhat.com/show_bug.cgi?id=2149971

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2023-02-09 11:41:00 -05:00
Andrea Bolognani
f2b5aaf458 virt-install: Recommend '--boot uefi'
Firmware autoselection is the way to go in most cases, so
recommend that instead of telling users that they should provide
all information manually.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2023-02-09 11:41:00 -05:00
Lokesh Mandvekar
a63b40aae3 Packit: initial enablement
This commit enables Packit `copr_build` tasks which will run on every PR
and build RPMS using the spec file present upstream with Source0 as
the archive created from HEAD commit of the PR.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-01-19 14:04:42 -05:00
Cole Robinson
fe86f4639f asyncjob: Remove unused import
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-01-19 11:59:20 -05:00
Cole Robinson
5c49151df9 tests: test win11 XML generation
And drop the futureproofing workaround now that it's no longer
required

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-01-19 11:54:03 -05:00
Cole Robinson
cc4a39ea94 asyncjob: Fix backtrace when no cursor theme installed
Fixes: https://github.com/virt-manager/virt-manager/issues/479

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-01-19 11:40:37 -05:00
Toshiki Sonoda
6ec00474a6 virtinstall: Hide total_size in the progress bar if it doesn't need
virt-install prints the total_size value to the progress bar even if it
is meaningless.
This value can be confusing to user, so for execute prosess that doesn't
copy files (total_size = 0B), we hide the total_size value.
For example, 'Creating domain...' doesn't need to print the total_size
value.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
2022-12-14 13:18:36 -05:00
Toshiki Sonoda
39c7a44314 virtinstall: Fix the allocating disk size printed by the progress bar
When a sparse file is created during a disk allocation,
virt-install prints not the created disk size but a sparse file size.

Therefore, we fix to print the created disk size during disk allocation
instead of the size of the sparse file by updating the meter with the
self.capacity.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
2022-12-14 13:07:26 -05:00
Cole Robinson
4114fa1aa8 progress: Fix showing correct final total
Reproducer:
Reproducer:
./virt-install --connect test:///default \
               --location tests/data/fakemedia/fake-f26-netinst.iso

Before:
Starting install...
Retrieving 'vmlinuz'                            |    0 B  00:00:00 ...
Retrieving 'initrd.img'                         |    0 B  00:00:00 ...

After:
Starting install...
Retrieving 'vmlinuz'                            |    9 B  00:00:00 ...
Retrieving 'initrd.img'                         |    9 B  00:00:00 ...

progress.end() currently only reports the total amount of bytes
that were last written to the UI. It should report the total amount
that's been passed to update().

Reported-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-12-14 13:01:48 -05:00
Cole Robinson
b5d6dfaa0d tests: Update to latest kvm domcaps
And add some test coverage exclusions, needed for previous patches

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-12-14 12:45:05 -05:00
Lin Ma
c313209455 tests: Add domcaps coverage for usb-redir/spicevmc channel checks
Signed-off-by: Lin Ma <lma@suse.com>
2022-12-14 12:44:54 -05:00
Lin Ma
180154d752 guest: Query availability of spicevmc channels in domcaps
Signed-off-by: Lin Ma <lma@suse.com>
2022-12-14 12:44:54 -05:00
Lin Ma
8cc6ee8da3 guest: Query availability of usb redirdevs in domcaps
Signed-off-by: Lin Ma <lma@suse.com>
2022-12-14 12:44:54 -05:00
Cole Robinson
cbc5b89707 Clean up FileChooser usage a bit
* 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>
2022-12-14 12:31:17 -05:00
Cole Robinson
67832d3097 addhardware: Fix backtrace when controller.index is None
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>
2022-12-13 13:49:35 -05:00
Weijia Wang
75a25e3766 tests: cpio: set owner to 0:0 2022-12-13 13:45:16 -05:00
Cole Robinson
bb1afaba29 Fix pylint/pycodestyle warnings with latest versions
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-12-13 11:23:45 -05:00
Lin Ma
4a2df06483 diskbackend: Drop support for sheepdog
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>
2022-11-07 10:10:00 -05:00
Cole Robinson
15ddeae6cb cli: support --boot loader.stateless=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-10-17 11:54:37 -04:00
Cole Robinson
1d64a678d3 virt-install: Reuse cli.fail_conflicting
For the --unattended + --cloud-init conflict

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-22 10:16:19 -04:00
Cole Robinson
999ccb85e3 virt-install: --unattended and --cloud-init conflict
Make it an explicit error, otherwise unattended is preferred and
cloud-init is ignored

https://bugzilla.redhat.com/show_bug.cgi?id=2117157

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-21 16:47:26 -04:00
Cole Robinson
b0d0516736 cloner: Sync <uuid> and <sysinfo> system uuid
Otherwise libvirt errors like:

ERROR    UUID mismatch between <uuid> and <sysinfo>

https://bugzilla.redhat.com/show_bug.cgi?id=2038040

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-21 16:21:10 -04:00
Cole Robinson
a254ece0f0 virt-install: --help required options are wrong
Nowadays it could be as simple as `virt-install --install fedora36`.

Trying to represent the interdepencies here is not worth it, but
let's keep a simple string around to avoid the default parser
usage string, which is huge

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-21 16:10:55 -04:00
Lin Ma
fbdf051626 cli: --cpu: Add maxphysaddr.{mode,bits} options
This commit added support for cpu physical address bits control, It's
useful for VMs with huge amount of ram.

E.g.
--cpu Cascadelake-Server,maxphysaddr.mode=emulate,maxphysaddr.bits=46

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-20 10:03:11 -04:00
Lin Ma
c22a876e9a tests: Add a compat check for linux2020 in amd-sev test case
It avoids amd-sev test failure if using older osinfo-db.

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-20 09:59:27 -04:00
Cole Robinson
e94786c066 virtinstall: fix regression with --boot and no install method
Anything passed to --boot should imply --install no_install=yes
in the absence of other --install options. This is historically
what we've done but we regressed in 4.1.0

Resolves: https://github.com/virt-manager/virt-manager/issues/426

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-20 09:54:01 -04:00
Cole Robinson
1cb0be4002 virtinstall: split no_install conditional apart to track code coverage
Each bit here is part of the CLI API, we need to be sure we are
covering each one. Extend the test suite to hit one case we are missing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-20 09:47:49 -04:00
Cole Robinson
1b87e3e54c tests: testdriver: Add filesystem socket example
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-17 10:29:31 -04:00
Cole Robinson
4b15073572 cli: Drop unnecessary --disk prop aliases
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-17 10:27:36 -04:00
Lin Ma
58f5e36da7 fsdetails: Fix an error with source.socket of virtiofs
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>
2022-08-17 10:24:10 -04:00
Cole Robinson
7295ebfb02 tests: cli: Fix test output after previous commit
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-17 10:21:31 -04:00
Lin Ma
11a887ece5 cli: --disk: Add driver.metadata_cache options
Properly setting the metadata cache size can provide better performance
in case of using big qcow2 images.

This patch introduces two driver options:
* driver.metadata_cache.max_size
* driver.metadata_cache.max_size.unit

E.g. --disk ...,driver.type=qcow2,\
     driver.metadata_cache.max_size=2,\
     driver.metadata_cache.max_size.unit=MiB

BTW, Metadata cache size control is currently supported only for qcow2.
Regarding how to properly caluclate the cache size of qcow2, Please refer
to qemu's documentation.

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-17 09:57:29 -04:00
Cole Robinson
8ca7c91697 Prep for release 4.1.0
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-04 15:53:33 -04:00
Cole Robinson
661408bcc7 po: Refresh translation template
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-04 15:14:20 -04:00
Gogo Gogsi
7177223716 Translated using Weblate (Croatian)
Currently translated at 38.2% (555 of 1451 strings)

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

Translated using Weblate (Croatian)

Currently translated at 8.6% (125 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/hr/
2022-08-04 15:07:50 -04:00
Kisaragi Hiu
95779a6350 Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 99.7% (1447 of 1451 strings)

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

Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 99.7% (1447 of 1451 strings)

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

Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 98.7% (1433 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/zh_TW/
2022-08-04 15:07:50 -04:00
Ettore Atalan
bd7adae146 Translated using Weblate (German)
Currently translated at 82.1% (1192 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/de/
2022-08-04 15:07:50 -04:00
김인수
73a12f8c98 Translated using Weblate (Korean)
Currently translated at 100.0% (1451 of 1451 strings)

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

Translated using Weblate (Korean)

Currently translated at 100.0% (1451 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ko/
2022-08-04 15:07:50 -04:00
Morten Abildgaard
1953847807 Translated using Weblate (Danish)
Currently translated at 18.3% (266 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/da/
2022-08-04 15:07:50 -04:00
R Toda
69ce106681 Translated using Weblate (Japanese)
Currently translated at 96.7% (1404 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ja/
2022-08-04 15:07:50 -04:00
Gustavo Costa
2d3812bd43 Translated using Weblate (Portuguese (Brazil))
Currently translated at 95.5% (1386 of 1451 strings)

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

Translated using Weblate (Portuguese (Brazil))

Currently translated at 95.5% (1386 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/pt_BR/
2022-08-04 15:07:50 -04:00
Alexey Rubtsov
e05fd9d1f7 Translated using Weblate (Russian)
Currently translated at 95.8% (1391 of 1451 strings)

Translation: virt-manager/virt-manager
Translate-URL: https://translate.fedoraproject.org/projects/virt-manager/virt-manager/ru/
2022-08-04 15:07:50 -04:00