1132 Commits

Author SHA1 Message Date
Lin Ma
6dfc4de125 network: add support for parsing/formatting SR-IOV VFs
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-10-09 10:22:48 +02:00
Pavel Hrdina
c9a26c84b0 urlfetcher: fix kernel/initrd paths for Ubuntu install CD
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-10-04 12:32:17 +02:00
Jia He
3def27badd Add arm64 check to urlfetcher to cater for Debian based distro
Without this check, the virt-install will report:
RuntimeError: Couldn't find hvm kernel for Ubuntu tree.

Signed-off-by: Jia He <hejianet@gmail.com>
2017-10-04 09:53:28 +02:00
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
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
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
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
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
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
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
e902fa5550 urlfetcher: force binary mode with FTP servers (bz #1462838) 2017-08-17 16:10:46 -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
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
Radostin Stoyanov
b93cc3bbc9 pycodestyle: Do not use bare 'except:'
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].

[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
Cole Robinson
1a09a05dc7 tests: Add a clone test for importing nvram directory
Need to use some callback magic to fake it like there's a file in
an existing directory
2017-07-20 17:51:06 -04:00
Cole Robinson
a9903ae0e0 connection: Remove clear_cache callback
It doesn't actually accomplish what we want for the virt-manager case,
and cache_new_pool should cover our needs now
2017-07-20 17:30:37 -04:00
Cole Robinson
4792c7cb8e connection: Add a default impl of cache_new_pool
Inserts it into the cache, and adds its associated volumes too
2017-07-20 17:30:36 -04:00
Cole Robinson
a9d9c0d035 connection: rename s/add_new_pool/cache_new_pool/g
Better describes exactly what's going on
2017-07-20 17:29:55 -04:00
Cole Robinson
5b51c98ae5 storage: Check for pool name collisions against the pool cache
Rather than using storagePoolLookupByName. This will save some API
calls, but the main benefit is that it can help shake out cache
issues.
2017-07-20 17:28:38 -04:00
Cole Robinson
55aa23b400 connection: Return copys of cached object lists
Incase any users manipulate the lists, we don't want that to affect
our caching. Could prevent future mistakes
2017-07-20 17:28:38 -04:00
Cole Robinson
4e4a6c817f connection: Rework cache function layout slightly
Have the internal polling functions not touch the connection cache.
This let's us not worry about the connection cache in the test suite,
where clear_cache wasn't 100% correct.
2017-07-20 17:28:38 -04:00
Cole Robinson
d3074141c8 cloner: Remove redundant setup() method
The functional callers use the individual setup methods, let's drop the
helper function and adjust the test suite
2017-07-20 17:27:22 -04:00
Cole Robinson
ec917e992a cloner: Drop redundant libvirt call
The disk should already have looked up the parent pool object
2017-07-19 12:59:41 -04:00
Cole Robinson
65b0331b72 cloner: Throw explicit error if NVRAM is missing
Otherwise it comes off like a coding error
2017-07-19 12:57:42 -04:00
Cole Robinson
98b5ea8b2c connection: Drop disabling of cache_object_fetch
All cases we care about either provide their own callbacks, or
explicitly want this caching, so enable it unconditionally
2017-07-19 12:57:36 -04:00
Cole Robinson
ca56f74ed7 capabilities: Fix model list caching for different archs (bz 1451113)
We could return cached x86_64 results for aarch64 VMs

https://bugzilla.redhat.com/show_bug.cgi?id=1451113
2017-07-17 11:47:01 -04:00
Cole Robinson
2eaf084b04 capabilities: Drop cpu_map.xml handling
We've had getCPUModelNames in libvirt for years now, and this
functionality isn't critical anyways, so drop the fallback
2017-07-17 11:47:01 -04:00
Cole Robinson
b5c9321b07 osxml: run abspath on passed nvram value 2017-07-17 09:16:45 -04:00
Cole Robinson
c6fdfbf3c3 cli: disk: add driver_detect_zeroes= support 2017-07-15 13:39:04 -04:00
Cole Robinson
c46218af3c devicedisk: Improve error message when max IDE devs exceeded (bz 1466238)
https://bugzilla.redhat.com/show_bug.cgi?id=1466238
2017-07-10 19:55:57 -04:00
Cole Robinson
f41844f3f2 guest: Use usb3 qemu-xhci for machvirt
This is what libvirt will default to nowadays for those configs,
so let's match it.
2017-07-10 19:46:13 -04:00
Cole Robinson
0633055fb9 guest: Drop old os type=linux back compat
We don't support libvirt versions that require this anymore
2017-07-10 09:34:38 -04:00
Cole Robinson
8d8b353b28 virtinst: Fix bare python3 style print()
We want a newline, so pass it ""
2017-07-10 09:34:22 -04:00
Cole Robinson
6d625ae45f guest: Enable spice sound on more arches
If spice is enabled, just assume sound devices will work as well
2017-06-28 16:28:25 -04:00
Cole Robinson
a07a874497 guest: If graphics enabled, add usb tablet/keyboard for machvirt 2017-06-28 16:22:23 -04:00
Cole Robinson
2cabc2e386 guest: Don't add default ps2 or xen mouse
libvirt drivers have added these by default for a long time, so
its redudnant here
2017-06-28 16:17:50 -04:00
Cole Robinson
f2de47cee2 guest: Add USB3 controller for machvirt by default
...if libvirt is new enough to do machvirt PCI by default. We can
just use usb3 since all guest OS that support aarch64 are new enough
to support it
2017-06-28 15:35:07 -04:00