Commit Graph

7182 Commits

Author SHA1 Message Date
Han Han 2310ac4123 docs: Add disk io mode io_uring
Support the io_uring io mode, introduced since Libvirt v6.3.0.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2020-07-04 18:05:27 -04:00
Han Han 0af0f8fa2f disk: Remove unused constant IO_MODE_THREADS
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2020-07-04 18:05:27 -04:00
Daniel Henrique Barboza ae3e92f0f5 tpm.py: make MODEL_SPAPR the default when running in ppc64
Users are fond of using "--tpm /dev/tpm0" to create a TPM device
for their VMs. ppc64 users, however, are experiencing errors because
the default TPM model is 'tpm-tis', which does not work in ppc64, and
they need to specify 'model=tpm-spapr' to work around that.

This patch makes the default TPM model change to 'tpm-spapr' when
running virt-install on a ppc64 host. A new test was added in test_cli.py
to test this new condition. This also keeps the 100% coverage of
the tpm.py file.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
CC: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza 721108002d netlist.py: remove the extra 'None' return in get_network_selection()
Commit v2.2.1-200-g4c3c53f7 ("virtManager: Remove network portgroup
UI") removed 'portgroup', the fourth value of the returned tuple in
get_network_selection(), and all related code that was using this
extra value.

That change forgot to change the line where, if no rows are found, a
tuple with "None" values is returned. The "None" tuple is still
returning 4 "None" values. Since no remaining code is checking for
a fourth value, this is benign and has no impact in the logic.

'pylint' does not seem to care though, and it is complaining about
'unbalanced-tuple-unpacking' because, in the condition mentioned above,
a fourth "None" value is returned and no one is bothering checking for
it.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza ec87485852 test_xmlconfig.py: use single quote strings in testDiskNumbers
codespell complains that one of the asserts is a typo:

tests/test_xmlconfig.py:92: ba  ==> by, be

Using single quote strings in that assert will make codespell
pass. For consistency, let's change all the strings in the
test to be single quoted.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza 21f1c90c2b codespell_dict.txt: add 'msdos' string
This will avoid codespell flagging 'msdos' as a typo.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza 29963ac986 virtinst/progress.py: change 'fo' to make codespell happy
'codespell' returns errors on this file in the format of:

virtinst/progress.py:527: fo  ==> of, for

This has to do with the 'fo' instance variable of the TextMeter
class. The code was introduced in commit v1.2.1-131-gd5d6cfff,
when parts of the urlgrabber code were copied to avoid dependency
on python-urlgrabber.

Looking at how 'fo' is used, an alternative would be rename it to
'output', so let's make codespell and ourselves happier with less
lint errors.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza bdb2bed3e9 virtinst: trivial codespell fixes
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Daniel Henrique Barboza 97eda595d3 virtManager/clone.py: codespell fix
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-07-04 17:56:57 -04:00
Cole Robinson 371bcb547a spec: Switch to latest Fedora bytecompile macros
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 15:06:53 -04:00
Hugo Gualandi 3941b7f723 Fix Send Key translation in pt_BR
Enviar Chave -> Enviar Tecla
2020-05-27 15:03:18 -04:00
Cole Robinson 7d6b5d86cd po: Add fur.po and id.po from zanata
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 15:02:40 -04:00
SlurmMcKenzie 3cd64ca0ea po: de: Fix translation
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 15:02:28 -04:00
Cole Robinson b9f4e6e5fa po: Update from zanata
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 14:56:21 -04:00
Cole Robinson b4181e7d77 tests: test_urls: Update
* latest SL is detected as centos again
* ubuntu URLs have moved, bump them forward

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-27 14:42:37 -04:00
Fabiano Fidêncio b55b7e9462 urldetect: Deal with ubuntu 20.04 legacy installer
Ubuntu 20.04 has a new installer, which is yet not supported by
virt-install / osinfo-db, and this made ubuntu switch their URLs
for the old installer to current/legacy-images/... instead of
current/images/...

Let's adapt URL detect so it can deal with this new "legacy"
style.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-05-27 14:42:37 -04:00
Tony James 4cdf2dc37d Fix typo in virt-install man page 2020-05-27 14:26:48 -04:00
Han Han f34f73622d rng: add builtin rng backend model
The builtin rng backend uses getrandom syscall to generate random, no
external rng source needed, introduced from libvirt v6.1.0.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2020-04-21 13:05:42 -04:00
Cole Robinson f6eee380a2 preferences: Fix dialog when invalid keygrab is set
https://bugzilla.redhat.com/show_bug.cgi?id=1810106

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-13 12:44:47 -04:00
Cole Robinson e79b550419 Fix pylint with latest pylint version
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-30 16:04:12 -04:00
Stefan Berger cd1713c6f2 tpm: add SPAPR (ppc64) device model
Add support for the tpm-spapr device model for pSeries VMs.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-03-30 15:59:37 -04:00
Cole Robinson 1afdc7ae32 createvm: Rework to track all Guest/Installer params explicitly
Rather than build a guest and installer instance depending on where
we are in the UI, track each input property in an explicit class, so
we can rebuild the guest/installer on demand with data accumulated
up to that point.

This makes the flow easier to follow and simplifies a lot of hacks we
have to do when backing up through the wizard, because we are trying
to unwind changes from an existing object, rather than just blowing
it away and easily reassembling it with updated info.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson eb605cccd8 tests: uitests: More createvm testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson 01eb65bd61 tests: Don't report UID/GID in fake caps data
Otherwise uitests can have different behavior depending on host state

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson 150b6ac95e virt-install: Add --reinstall=DOMAIN option
This allows using virt-install's install logic on an existing VM

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 09:03:02 -05:00
Cole Robinson 9385e8689b cli: Move some domain helpers from virt-xml to cli
We will need these elsewhere for upcoming patches

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 08:41:46 -05:00
Cole Robinson 8732b2d52b virtinst: installer: Add _make_cdrom_device helper
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 08:41:46 -05:00
Cole Robinson 5c64d35756 tests: uitests: Add a NewVM failure test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson b24892448c tests: Add armv7l domcaps data, and use it
Rather than using a hacked x86 domcaps data

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson c0c69b1708 tests: uitests: Make NewVMManual more robust
There's a timing issue with changing pages

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson bea5e56c26 virtinst: connection: Add is_privileged
Replace the is_session and is_system distinction with variants
of is_privileged. This matches what libvirt uses internally, and
will help with supporting qemu:///embed at some point

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 9a0d49a718 virtinst: uri: Rework MagicURI to work with passed in fakeuri
Rather than individual options for each possible hypervisor,
and annotations like 'remote' or 'session', just have it take a
fake URI to mock

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 1b6e33e8b9 tests: osdict: Finish coverage
Requires libosinfo git which has a bug fix to help trigger
post install code in osdict.py

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson f380d43e58 cli: Print more info about console commands
Googling for 'Graphics requested but DISPLAY is not set' shows there's
some confusion about virt-install's behavior in this area. This gives
more output in several related cases about what commands we are
running and the state of the VM

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 226c25b07d CONTRIBUTING: Add note that test coverage shouldn't regress
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 67ef81895e virtManager: Convert to CSS for most color usage
* Add CSS data in config.py and install it
* Strip out all hardcoded colors and use style class annotations
* Fix colors to be more theme appropriate to fix dark theme look

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 1ad470c021 inspection: Some cleanups
* Simplify the queue data, just push in VM data to refresh
* Do less work in threads
* Slight rework of updating inspection data in the VM

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-01 22:02:59 -05:00
Cole Robinson 53aba9204d connection: Fix stats polling
Commit 419f8cd31b messed up the dopoll rework, which meant we
never called stats polling on the master object list. Fix it, but
do so by unwinding the redundant internal _update routines

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-01 21:28:07 -05:00
Cole Robinson 489ef8fb7c DESIGN: Reference that SPICE multihead was explicitly rejected
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-30 16:19:23 -05:00
Cole Robinson 9ddf2799a8 tests: More work to make dir search test host independent
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-30 16:18:20 -05:00
Cole Robinson 8e7745f5e1 tests: Don't check against host UID
We are using static test suite data to compare against resolved
host username

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-30 10:15:21 -05:00
Cole Robinson 82be5dccad cli: Add --disk type= support
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 19:17:54 -05:00
Cole Robinson 8c0704a921 diskbackend: Treat /dev paths on remote connections as 'block'
Currently if the path isn't managed on a remote connection we
treat it as file. Add this simple heuristic to improve the common
case.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 19:07:27 -05:00
Cole Robinson 5573aeb441 createnet: Fix XML editor error when dhcp fields are empty
We need to handle the case when ip == None

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:53:31 -05:00
Cole Robinson 635073eef5 createnet: Drop row coloring validation
Because we are a single screen now, just let libvirt perform
the validation for us

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:53:31 -05:00
Cole Robinson d15eafc9d6 ui: manager: Don't allow de-selecting rows
We should always have something selected, there's not really any
point to allow de-selecting a row that I can think of, and it brings
up some weird menu UI.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson 140a1f3b15 cloner: Drop ability to clone a paused VM
Generally this doesn't work with qemu metadata locking nowadays,
and it was never a safe idea to begin with, because disk contents
could be in an inconsistent state.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson 1e1cd4c564 cloner: Clear domain <title> as well
Otherwise in virt-manager the two VMs will be identical

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson 3859725739 createvm: Fix showing 'Import' disk UI
We were triggering the wrong install page number, after adding
the Manual Install option

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:38 -05:00
Cole Robinson b671c7cf41 libvirtobject: Always define even if XML isn't different
This should be a rare occurence, and it ensures that the UI reflects
the latest XML

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 18:34:28 -05:00