Commit Graph

6043 Commits

Author SHA1 Message Date
Cole Robinson
467c524684 tests: Add show_nographics_warnings coverage 2018-10-13 11:50:49 -04:00
Cole Robinson
41d0f8fdf1 installer: Order install CDROM before any manual CDROMs
This is important for the virtio-win case: --cdrom media should
always be ordered first, so it's the boot preference.

https://www.redhat.com/archives/virt-tools-list/2018-September/msg00048.html
2018-10-13 10:44:09 -04:00
Cole Robinson
2e6093d6b6 create: Show inserted CDROM media in customize
This makes it easier for people to change install media afterwards
if they want:

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

But also this makes it more clear that if users want to use virtio-win,
they need to add an additional CDROM and not try to reuse the install
CDROM device
2018-10-13 10:17:50 -04:00
Cole Robinson
eaf285f772 tests: xmlconfig: Drop a lot of redundant config 2018-10-13 10:11:43 -04:00
Cole Robinson
2482e57a15 create: Fix customize boot page
Installer reworks dropped the guest.autostart flag, need to add
it back. Add Uitest for it
2018-10-13 09:46:06 -04:00
Cole Robinson
11d1cbdf06 installer: DistroInstaller -> InstallerTreeMedia
Now we have only one Installer class, and callers don't need to
worry about choosing a particular class type depending on their
needs, just pass cdrom vs. location to the installer init and
we figure out everything behind the scenes.

Besides simplifying the callers this makes the control flow a
lot easier to follow whether looking at InstallerTreeMedia or
Installer classes
2018-10-13 09:42:11 -04:00
Cole Robinson
6fb81aeb65 cli: Another searchdata.user fix 2018-10-12 18:34:42 -04:00
Cole Robinson
e4e924ea50 tests: Add libosinfo iso detection test
With another fake iso, based on stripped down centos 6.5 boot iso.
Reason we do centos 6.5 is that everything newer also compares
on volume size, and we don't want to store a huge iso in git.
2018-10-12 17:15:58 -04:00
Cole Robinson
8ff2043f2a urldetect: Drop boot.iso fetching
Since this was only used for the --cdrom $treeurl case, this is
no longer used
2018-10-12 15:54:39 -04:00
Cole Robinson
b90b8e3c07 distroinstaller: Remove --cdrom $URL boot.iso fetching
And instead treat any URL passed to --cdrom as a file to
access directly over http. Rationale for dropping this is
laid out here:

https://www.redhat.com/archives/virt-tools-list/2018-May/msg00011.html
2018-10-12 15:54:36 -04:00
Cole Robinson
4f320c2b98 distroinstaller: Remove implied cdrom installs
This is an obscure feature that I'm skeptical anyone is relying on,
and has weirdly subtle semantics that are hard to test.
2018-10-12 15:33:05 -04:00
Cole Robinson
286dbf6d51 installer: Fold PXEInstaller into base Installer class
PXEInstaller is really just 'boot off bootdev=network' which is
easy enough to model without a separate class
2018-10-12 15:15:20 -04:00
Cole Robinson
4096800f71 Remove interface UI
Discussed here: https://www.redhat.com/archives/virt-tools-list/2018-October/msg00032.html
2018-10-12 14:38:05 -04:00
Cole Robinson
23d15d7ad1 uitests: Rename console->livetest.py
It has more than console tests. let's use it as the destination for
all live VM testing
2018-10-12 13:49:53 -04:00
Cole Robinson
2e467484bf uitests: Add rbdceph and qemu search perms tests 2018-10-12 13:49:53 -04:00
Cole Robinson
e05f74c2f0 devices: disk: Fix path search changing
Accessed the wrong variable name
2018-10-12 13:49:53 -04:00
Jim Fehlig
5a7698c799 Fix selection of network volumes
When creating a new VM and selecting a volume from a network-based
storage pool such as rbd, the volume is not recognized as network-based
and is treated as a volume from a directory storage pool.

This patch adds a method to check if the volume's path points to a
network-based volume, then uses the method to avoid actions like
setting unix file permissions on the volume, which doesn't make
sense for a network-based volume.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>

(crobinso: rebase, tweak lookup logic)
2018-10-12 13:49:53 -04:00
Cole Robinson
c0314cad2e storage: Remove needless manage_path wrapper 2018-10-11 19:23:18 -04:00
Cole Robinson
d36aa7fbaf device: disk: Move last host touching to diskbackend
This just conceptually makes more sense to keep it all in
one file, and DeviceDisk is the API for the rest of the code
to deal with any host storage state
2018-10-11 19:20:46 -04:00
Cole Robinson
425f599c84 device: disk: Move all path search handling to diskbackend
Simplify it slightly by combining return output and removing
an entry point. Add some additional test cases for it
2018-10-11 19:11:16 -04:00
Cole Robinson
fb1e63c100 devices: disk: remove dead code 2018-10-11 18:00:10 -04:00
Cole Robinson
527783f37b tests: Make rbd path names more descriptive 2018-10-11 17:33:59 -04:00
Cole Robinson
1cd9d0b524 tests: scsi reservation test shouldn't check host /dev/sda
Was failing in our CI
2018-10-11 17:02:45 -04:00
Cole Robinson
5c96574512 tests: Add test-many-devices disk device=lun example 2018-10-11 16:09:55 -04:00
Lin Ma
3c44ea8810 addhardware: Add SCSI persistent reservation support for LUN Passthrough
Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Lin Ma
280b78c96a details: Add SCSI persistent reservation support for LUN Passthrough
It's a common requirement for VMs to send SCSI PR commands in VM cluster
environment. This patch adds the managed mode support of scsi persistent
reservation in details page.

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Lin Ma
eb1a67a595 cli: disk: Add options to support SCSI persistent reservation
Create the managed or the unmanaged PR object to enable SCSI persistent
reservation for LUN Passthrough

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Cole Robinson
42a96cfd59 virt-install: add --destroy-on-exit
This makes the console window behave like a raw qemu command line:
when the user closes it, the VM is hard powered off.
2018-10-11 15:24:16 -04:00
Cole Robinson
96ac896e1a cli: Remove redundant argparse dest= options 2018-10-11 12:53:03 -04:00
Cole Robinson
3e55e89453 tests: Add better virt-install console testing 2018-10-11 12:19:48 -04:00
Cole Robinson
63b4d1f154 virt-install: Encode guest defaults earlier
We need this for determining correct console tool to launch,
and probably other checks later
2018-10-11 12:19:09 -04:00
Yossi Ovadia
215d296b61 cli: add --boot rebootTimout
virt-install -n blah -r 1024 --vcpu=1 --disk=/root/vm/blah.qcow2,size=10\
 --network=bridge:br-public --pxe --boot=network,rebootTimeout=3

By default, in case of (first) pxe boot failure the VM will simply
stop trying.
By adding the above, VM will re-try pxe boot. ( useful when DHCP not
replys on first attempt.

Libvirt support it and VM XML will look as follow : ( 'bios rebootTimeout'
will be created under OS section. )

  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.5.0'>hvm</type>
    <boot dev='network'/>
    <bios rebootTimeout='3'/>
  </os>

(crobinso: fix it, add test case)
2018-10-11 11:24:07 -04:00
Chen Hanxiao
70f9817bdc pylint: fix simplifiable-if-statement issue
pylint complain:
    The if statement can be replaced with 'var = bool(test)'

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-10-11 11:19:49 -04:00
Cole Robinson
c83e083dde statsmanager: Skip old CPU stats for offline VM
We will handle any info() calls for status syncinging in domain.tick()
2018-10-10 17:34:21 -04:00
Cole Robinson
3d11cff6e2 statsmanager: Drop self.config prop caching
gsettings/dconf is meant for this usecase, it's fine to hit it
multiple times, we are doing it already anyways with the stats
record checking
2018-10-10 17:25:47 -04:00
Cole Robinson
390adc4e58 module_trace: Support --trace_libvirt=all|mainloop
'all' means log even API calls that are invoked from threads
2018-10-10 17:20:25 -04:00
Cole Robinson
155ddcfc17 conn: Move allstats polling before VM polling
So new VMs already have their stats cached
2018-10-10 17:19:44 -04:00
Cole Robinson
a9f9b1be24 statsmanager: Don't run allstats if UI disables all stats 2018-10-10 17:19:32 -04:00
Cole Robinson
ac2652a1fa statsmanager: make timestamps more accurate
And reorg our cache of allstats output to be easier to deal
with and not keep virDomain references
2018-10-10 17:19:21 -04:00
Cole Robinson
a88a28d0b8 statsmanager: Absorb more domain stats handling 2018-10-10 17:19:21 -04:00
Cole Robinson
f553cb67c2 statsmanager: Move VM stats calls back to domain.tick
Otherwise if we hit an error in connect.tick, connection can be
automatically closed in the UI, plus other parts of the code
were implicitly depending on this ordering, like VM rename support
2018-10-10 08:11:25 -04:00
Cole Robinson
5f1acb0c1a statsmanager: clean up
* Absorb support checks from vmmDomain
* Move the allstats handling out of the old wrapper functions
* Misc formatting fixes
2018-10-10 07:35:41 -04:00
Cole Robinson
c30c1b8f6d statsmanager: Fix it with LXC
LXC doesn't support allstats API, and there were a number of issues
in that case.
2018-10-10 07:35:41 -04:00
Simon Kobyda
68a5abe279 statsmanager: new class for VM/conn stats polling
Class will work above connection. Right know, it is possible to
provide stats for domains only, but could be expanded.
To retrieve stats, you can use get_vm_stats(vm).

This class uses new virConnectGetAllDomainStats call, which reduces
number of calls needed to poll stats.
Stats are refreshed with every connection tick.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>

(crobinso: squash commits, move statsmanager to its own file,
           fix pylint)
2018-10-10 07:35:37 -04:00
Cole Robinson
fcfc1df35e tests: initrdinject: Add a debian test case 2018-10-09 15:41:43 -04:00
Cole Robinson
71626b1dd2 initrdinject: Remove RHEL4 support
It's end of life, let's move on
2018-10-09 14:18:36 -04:00
kgawda
c797071be3 Add missing argument in message translation
Add missing "--location" in PL translation of "CDROM media does not print..."
2018-10-09 12:03:53 -04:00
Cole Robinson
511e4855e3 po: Update pl translations 2018-10-09 12:03:16 -04:00
Cole Robinson
88cacb0295 setup: Remove configure --openssh-askpass
For one, we don't offer to install it anymore because we dropped
packagekit stuff. But even having a single package here isn't
really the whole story because different desktops have their
own askpass providers, like Fedora has openssh-askpass for GNOME,
but ksshaskpass for KDE

So drop it all, make the error more generic, and point people
to setting up SSH keys too
2018-10-08 13:59:13 -04:00
Cole Robinson
211ddf3a85 connectauth: polish up the user/pass auth dialog 2018-10-08 13:47:16 -04:00