Commit Graph

7168 Commits

Author SHA1 Message Date
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
Cole Robinson
7313f9ff6a diskbackend: Add full local clone test coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 09:09:40 -05:00
Cole Robinson
e7bb021c4c diskbackend: Add lots of test coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 08:38:18 -05:00
Cole Robinson
04c0d48ef7 devices: disk: Always set a stub storage backend
This reworks the existing code to never have storage_backend = None,
instead carrying around a stub class, and resolving the actual
storage info when necessary. This makes the logic easier to follow.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:52:29 -05:00
Cole Robinson
d46b89ec09 devices: disk: Remove dead code in get_target_prefix
The goal of this was to handle the case of a new libvirt bus that
we didn't know the prefix for. I suspect all new buses will in practice
use the 'sd' prefix, so this will never trigger

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:52:29 -05:00
Cole Robinson
519fed3b91 addhardware: Remove dead virtio-scsi collision code
The way we set controller_model earlier, means all the virtio-scsi
allocation code is essentially never set. That code does still fix
a valid case of when trying to add a scsi device when there isn't
any remaining slots open, but that should be rare enough that I'm
fine telling the user to edit manually set up a controller themselves
first.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:52:29 -05:00
Cole Robinson
e1bcd42aa0 guest: Move bootorder helpers out of the osinfo code area
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson
ac202f40ac tests: uitests: Fix live hotplug test after delete rework
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson
bd4b841b10 addhardware: Remove IO and scsi reservation options
These were removed from the Details dialog previously, but I forgot
to remove them from addhardware too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson
4cb775773f devices: disk: Add change_bus()
Taken from virt-manager code. Move it here because it is strictly
an XML operation, and it will be easier to unit test

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:33 -05:00
Cole Robinson
0f295ec5dc devices: disk: Add more test coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:40:43 -05:00
Cole Robinson
5d643f8fd9 devices: disk: Drop dead code
The way the previous block is structured, this condition will
never trigger

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 20:03:50 -05:00
Cole Robinson
01ccaf03be setup: Run codespell on more files
And fix the results

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 14:31:28 -05:00
Cole Robinson
c3b4a713c1 DESIGN: Add more links to explicitly rejected requests
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 14:23:23 -05:00
Cole Robinson
d9d5caad0d virtinst: connection: Drop is_closed() helper
We have is_open, just use that

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:42:33 -05:00