Commit Graph

5496 Commits

Author SHA1 Message Date
Pavel Hrdina
8e0303059e cloner: get original XML with security informations
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1455491

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-18 09:04:35 +02:00
Cole Robinson
6b8f0b6e1a tests: uitests: Add a delay for nvram rename test
Seems to fail a bit otherwise
2017-09-15 19:42:40 -04:00
Cole Robinson
901dbaf4b7 details: Fix displaying isa panic device 2017-09-15 19:36:58 -04:00
Cole Robinson
cc1a0f8b0a tests: Add multi <panic> example 2017-09-15 19:33:22 -04:00
Lin Ma
40f70d4fe5 virt-install: add param cache.mode and cache.level for option '--cpu'
libvirt supports guest CPU cache by commit df13c0b, So add this feature
to virt-install to configure cpu L3 cache mode.

Currently, The valid values are 'passthrough', 'emulate' or 'disable'.
say:
  --cpu host-passthrough,cache.mode=passthrough
or
  --cpu $CPU,cache.mode=emulate,cache.level=3
or
  --cpu $CPU,cache.mode=disable

Signed-off-by: Lin Ma <lma@suse.com>
2017-09-14 18:54:01 -04:00
Lin Ma
8034748c22 virt-install: add a host cpu passthrough example to the -help output
Signed-off-by: Lin Ma <lma@suse.com>
2017-09-14 18:49:59 -04:00
Viktor Mihajlovski
d2dce02522 virtinst: Add s390x cd detection for Debian
Enable the installation from Debian s390x CD images.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2017-09-14 17:49:00 -04:00
Viktor Mihajlovski
5ce84fccf0 virtinst: Get rid of the s390x-specific cd detection function
Move the s390x-specific code into the generic cd detection function.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2017-09-14 17:49:00 -04:00
Viktor Mihajlovski
6d38c3c457 virtinst: Fix cd recognition on Ubuntu
The Ubuntu c recognition was looking for a file .disk/mini-info.
However, the correct name is .disk/info.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2017-09-14 17:49:00 -04:00
Pavel Hrdina
af91d51fc8 cli: introduce snapshot_policy parameter for disk device
This allows to configure snapshot behavior for each disk.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-12 08:58:31 +02:00
Chen Hanxiao
04e35b2d85 pycodestyle: fix all E124 warnings
Fix all E124:
     Closing bracket does not match visual indentation

   Also remove ignore options of E124

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-09-09 23:21:42 +08:00
Pavel Hrdina
ec266d3cda setup: introduce --jobs for pylint
Pylint supports configuring jobs to use multiple processes to
speed up Pylint.  Default value is 1.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 11:10:42 +02:00
Pavel Hrdina
4b108a8c75 tests: fix pylint
Commit g785352ea removed unused variable and felt unused import.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:55:47 +02:00
Pavel Hrdina
12117ba148 connection: change blacklist from array to dict
If initialization of new object fails we put it into blacklist and
newer parse it again until virt-manager is restarted.  This helps to
reduce number of failures if some object fails initialization every
time.

However, there are some cases where we put object into blacklist
incorrectly.  One of the cases is while creating new storage pool.
If the storage pool requires to be build before started but user
doesn't check to build it as well the start of the new storage pool
fails.  The issue is that at first we define that object which triggers
a lifecycle event for storage pool and queues new poll operation over
storage pools.  Before the poll operation starts the starting of the
storage pools fails and we undefine that storage pool before it is
initialized.  The initialization fails and the storage pool is never
managed from that point.

This patch modifies the blacklist to allow 3 failures before we give up
on a specific object and if the object is initialized without error
we remove it from blacklist completely.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1446486
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1093394

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:12:12 +02:00
Pavel Hrdina
f1976155cd sshtunnels: use <listen> element to get UNIX socket for graphics
Graphics devices has a new XML element to configure UNIX socket path:

  <graphics type='vnc' socket='/path/to/socket'>
    <listen type='socket' socket='/path/to/socket'/>
  </graphics>

  <graphics type='spice'>
    <listen type='socket' socket='/path/to/socket'/>
  </graphics>

and as you can see SPICE uses only the new XML element.  For VNC the
old 'socket' attribute is for backward compatibility.

In order to connect to SPICE graphics on remote host using SSH tunnel
we need to get the UNIX socket path from <listen> element.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:11:42 +02:00
Pavel Hrdina
d718f1a516 graphics: introduce listens.socket parameter
Add support to configure socket path for socket listen type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:11:42 +02:00
Pavel Hrdina
fe6c5067c0 graphics: introduce listens.{type|address|network} parameters
Using "listens.*" allows better configuration of listen elements for
graphics devices.  Currently the only way how to configure a listen
type is to abuse "listen" parameter and there is no way how to configure
exact "network".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:11:42 +02:00
Pavel Hrdina
ccaef8c16a graphics: set default port only for correct listen types
The default port and tlsPort should be configured only if no listen
type was specified or the listen type is "address" or "network".
For other listen types the port and tlsPort doesn't make sense.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:11:42 +02:00
Pavel Hrdina
f14b1f88a0 domain: only the first device from each group is bootable
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1488480

This also fixes an issue with floppy not showing at all, the proper
boot.dev name is 'fd' but we were looking for 'floppy'.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:11:04 +02:00
Pavel Hrdina
abcff9e230 domain: use migrateToURI3() for tunneled migration
The migrate3() API doesn't support tunneled migration.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:10:39 +02:00
Pavel Hrdina
5d0296d438 domain: use correct name for variables in migration code
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:10:39 +02:00
Pavel Hrdina
9f191da5c5 devicepanic: add all models supported by libvirt
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00
Pavel Hrdina
48604bfb37 devicepanic: don't set default iobase
This is not required and it's correctly handled by libvirt and QEMU.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00
Pavel Hrdina
36230c9a18 devicepanic: use model instead of address.type
There are multiple models of the panic device, the address type is only
one and is valid only for "isa" model.

To not break the virt-install/virt-xml the command line parser needs to
be updated.  Before this patch there was only one parameter that
configured the "iobase".  Now the first parameter configures a model
but to keep it backward compatible it follows these rules:

1. there is only one parameter and it matches known model:

  --panic isa

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

2. there is only one parameter and it doesn't match any model:

  --panic 0x505

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

3. there are two parameters:

  --panic isa,iobase=0x505

  <panic model='isa'>
    <address iobase='0x505' type='isa'/>
  </panic>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00
Pavel Hrdina
9655f7dfaf virtManager: remove panic iobase from GUI
This is advanced configuration and it's not required to configure
at all to have a working panic device.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00
Pavel Hrdina
5f819aff97 virtinst: remove address configuration from panic device
The panic device has an address element but it's not the same as for
other devices.  Panic device can have only one address type "isa" with
only one additional attribute "iobase".  That attribute is configured
by separate argument.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-09-09 10:09:46 +02:00
Cole Robinson
170a169fcc test_urls: Remove dead link 2017-09-08 16:58:45 -04:00
Cole Robinson
785352ea60 tests: Fix pylint 2017-09-08 16:55:49 -04:00
Andrew Wong
7fe62cedd5 virtinst: In DebianDistro and UbuntuDistro, detect Install CDs 2017-09-08 16:55:49 -04:00
Andrew Wong
08b269c25e virtinst: In DebianDistro and UbuntuDistro, refactor code for checking manifest and info files 2017-09-08 16:55:49 -04:00
Cole Robinson
f0e36d52e7 tests: bypass cache hacking for test:///default
To allow us to test the standard code in some cases. Would have caught
the previous issue
2017-08-30 10:36:37 -04:00
Cole Robinson
ec0d3072c0 virtinst: connection: Fix error caching new pool
$ virt-install --connect test:///default --name foo --ram 64 --import --disk /tmp/idontexist.img
ERROR    Error: --disk /tmp/idontexist.img: 'vols'
2017-08-30 10:34:17 -04:00
Cole Robinson
427592bc7b tests: test_urls: Add debian s390x example 2017-08-29 11:57:45 -04:00
Viktor Mihajlovski
f248088cc8 virtinst: adjust media paths for s390x
The install kernel and intrd files are located in <url-prefix>/generic
of the Debian and Ubuntu s390x install trees. Further they follow a
different naming scheme than on x86. Adjust the url fetching accordingly.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2017-08-29 11:57:40 -04:00
Cole Robinson
9cffcef66e tests: test_urls: Update
And only have one ftp test, since ftp is sloooow
2017-08-29 11:57:14 -04:00
Cole Robinson
d71ef83942 tests: test_urls: Rework to better handle multiple archs 2017-08-29 11:57:14 -04:00
Chen Hanxiao
b44aa0e3bb pycodestyle: fix all E131 warnings
Fix all E131:
     Continuation line unaligned for hanging indent

   Also remove ignore options of E131

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-26 20:03:21 +08:00
Cole Robinson
e902fa5550 urlfetcher: force binary mode with FTP servers (bz #1462838) 2017-08-17 16:10:46 -04:00
Christian Ehrhardt
e76b904656 engine: improve message about missing binaries
The message when failing to connect can be misleading as package names
will differ per Distribution as well as not apply for e.g. self built
binaries.
This changes the message in a way to be more generic not implying literal
package names.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2017-08-16 17:32:18 -04:00
Chen Hanxiao
c92aade081 pycodestyle: fix all E203 warnings
Fix all E203 whitespace before ':'
   Also remove E203 ignore option of pycodestyle

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2017-08-11 00:01:38 +08:00
Cole Robinson
34c80e56cd Prep for release 1.4.2 2017-08-08 18:14:48 -04:00
Cole Robinson
5183971bc6 README.md: mention virt-* cli tools 2017-08-08 15:58:38 -04:00
Cole Robinson
cf522bfc0c engine: Remove manual line wrapping of connect error messages
This was needed once upon a time when the UI was wrong, but it
wraps correctly now
2017-08-07 18:17:00 -04:00
Cole Robinson
9e7426b64f engine: Drop offer to install askpass package (bz 1354304)
Dealing with packagekit across desktops and in a consistent
manner is a pain. This code path is rarely exercised and difficult
to test, so just fallback to giving a hint error message and
let the user install if they care.
2017-08-07 17:41:52 -04:00
Cole Robinson
cc72f74f97 packageutils: Ensure packages argument is a list
It's easy to screw this up from the callers, and gives weird
interactions with apper
2017-08-07 17:27:30 -04:00
Cole Robinson
4cdae27cb2 engine: With --test-first-run, don't try default URI detection
default URI detection gets testing via the 'connect' dialog, this
makes it easier to test the fallback when no packages are locally
present
2017-08-07 17:27:30 -04:00
Cole Robinson
08a7eaed4d config: If --test-first-run, fill in some default package names
Simplifies testing the feature from git
2017-08-07 17:25:55 -04:00
Cole Robinson
69449d7b94 virt-manager: Remove needless cli option renaming 2017-08-07 17:22:03 -04:00
Laurent Bigonville
cd20536143 Use gtk-stop icon for the "Stop" action
When stopping the pools or the interfaces use the gtk-stop icon.

Currently this is inconsistant with the virtual network tab.

https://bugzilla.redhat.com/show_bug.cgi?id=1352974
2017-08-03 13:06:02 -04:00
Cole Robinson
c4826444e9 storage: Fix 'srcname' referenced before assignment (bz #1474766)
https://bugzilla.redhat.com/show_bug.cgi?id=1474766
2017-08-03 12:38:37 -04:00