Commit Graph

7996 Commits

Author SHA1 Message Date
Cole Robinson
758eb74ba3 Replace deprecated imp usage with importlib
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-04 16:04:44 -04:00
Cole Robinson
79da19ad07 Fix some pylint, exclude some new warnings
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-04 16:04:33 -04:00
Hugues Fafard
cb97f6001b cli: --cpu: code cleanup & reordering
Shuffling bits of code around, adding comments and grouping CLI options
to make the code easier to read and understand at a glance.

Brings the ordering of XML options in line with libvirt's own output as
implemented in `src/conf/cpu_conf.c` and `src/conf/numa_conf.c`.
2021-10-04 15:10:10 -04:00
Hugues Fafard
6a2bc142eb cli: --cpu: add support for NUMA interconnects
This includes support for the following options:
* numa.interconnects.latency[0-9]*.initiator
* numa.interconnects.latency[0-9]*.target
* numa.interconnects.latency[0-9]*.cache
* numa.interconnects.latency[0-9]*.type
* numa.interconnects.latency[0-9]*.value
* numa.interconnects.latency[0-9]*.unit
* The same suboptions for `numa.interconnects.bandwith[0-9]*`

Note that the cache= attribute is only explicitly defined for <latency>
nodes in the documentation. However, since <latency> and <bandwidth>
nodes are otherwise identical, the docs also don't explicitly forbid it
for <bandwidth> nodes, and libvirt happily accepts XML that does specify
it for for <bandwidth> nodes, this implements the cache= attribute for
<bandwidth> elements as well.
2021-10-04 15:08:39 -04:00
Hugues Fafard
fbcb7539c3 cli: --cpu: add support for NUMA caches
This includes support for the following options:
* numa.cell[0-9]*.cache[0-9]*.level
* numa.cell[0-9]*.cache[0-9]*.associativity
* numa.cell[0-9]*.cache[0-9]*.policy
* numa.cell[0-9]*.cache[0-9]*.size.value
* numa.cell[0-9]*.cache[0-9]*.size.unit
* numa.cell[0-9]*.cache[0-9]*.line.value
* numa.cell[0-9]*.cache[0-9]*.line.unit
2021-10-04 15:08:38 -04:00
Hugues Fafard
42bb522f0d cli: --cpu: make numa.cell[0-9]*.discard an on/off type option 2021-10-04 15:08:38 -04:00
Hugues Fafard
bf3bd824c1 cli: --cpu: add support for unit of NUMA memory size
This adds support for the `numa.cell[0-9]*.unit` option.
2021-10-04 15:08:38 -04:00
Hugues Fafard
7d49d95a0f cli: --cpu: add support for specifying dies in topology
This adds support for the `topology.dies` option.
2021-10-04 15:08:38 -04:00
Hugues Fafard
1166bb3d8d cli: --cpu: add support for check & migratable options
Note that the `migratable` option is only allowed by libvirt for
`mode=passthrough` or `mode=maximum`.
2021-10-04 15:08:38 -04:00
Hugues Fafard
bcd97dd01a cli: --cputune: add support for cachetune montiors
This adds support for the following options:
* `cachetune[0-9]*.monitor[0-9]*.level`
* `cachetune[0-9]*.monitor[0-9]*.vcpus`
2021-10-04 13:31:54 -04:00
Hugues Fafard
563a97f022 cli: --cputune: add scheduling options
This includes support for the following options:
* `emulatorsched.scheduler`
* `emulatorsched.priority`
* `iothreadsched.iothreads`
* `iothreadsched.scheduler`
* `iothreadsched.priority`
2021-10-04 13:31:54 -04:00
Hugues Fafard
95721ae8d7 cli: --cputune: cleanup 2021-10-04 13:31:54 -04:00
Hugues Fafard
5cfbbf5701 cli: --cputune: add support for host cpu usage quotas
This includes support for the following options:
* `shares`
* `period`
* `quota`
* `global_period`
* `global_quota`
* `emulator_period`
* `emulator_quota`
* `iothread_period`
* `iothread_quota`
2021-10-04 13:31:54 -04:00
Chris Kerr
ddcdd39dcb urlfetcher: Make check_output call compatible with Python 3.6
Fixes: #291

The `text=` keyword was added in Python 3.7 "as a more readable
alias for `universal_newlines=`". This commit switches to the
old form of the name, for backwards compatibility with Python 3.6,
the default Python3 version on Ubuntu 18.04 and RHEL 8.

When support for Python 3.6 is no longer needed, this change can
be reverted.
2021-10-04 13:13:18 -04:00
Pavel Hrdina
0953e1aea1 cli: introduce --resource fibrechannel.appid option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2021-09-14 17:08:35 +02:00
Cole Robinson
be05135867 libvirtobject: rename autostart tweaks
* Silence some pylint
* set_autostart failure shouldn't reset the old name

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-31 19:21:09 -04:00
coreyberla
b2835da3c8 libvirtobject: reapply autostart setting after rename
Fixes: #204
2021-07-31 19:20:51 -04:00
coreyberla
f3127e0029 domain: Don't rename domain if newname isn't different 2021-07-31 16:36:39 -04:00
Cole Robinson
aaabb44ac7 details: console: drop hardcoding background color as black
Submitted in https://github.com/virt-manager/virt-manager/pull/241

I couldn't get this code to change the output, tested with VNC and
spice-gtk on Fedora 34 gnome-shell x11 and XFCE. Maybe it's something
theme related. But either way this doesn't seem to be useful for the
default case anyways, so let's drop it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-31 16:27:15 -04:00
Cole Robinson
520b3a3b35 cli: --filesystem: add binary.sandbox.mode and source.socket
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-30 13:15:29 -04:00
Cole Robinson
a214018af3 cli: --vsock: add generic virtio options support
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-30 13:09:08 -04:00
Cole Robinson
4a31f5cc12 README.md: clarify mailing list patch usage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-30 12:02:13 -04:00
Cole Robinson
8754a59d92 urlfetcher: Silence xorisso stderr output
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-30 10:45:07 -04:00
Cole Robinson
27525f4bab pylint: More attempts to silence gi warnings with -j option
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-29 11:45:06 -04:00
Hugues Fafard
6cc7987627 Finish reordering stuff and cleaning up
Finishes shuffling bits of code around to make the options better
grouped in the code so it's easier to read and understand what's what at
a glance.
2021-07-29 11:44:57 -04:00
Hugues Fafard
edf6c3ff2e cli: --boot: Completed options for container boot
Adds support for `initenv[0-9]*.name` and `initenv[0-9]*` suboptions.
2021-07-29 11:44:57 -04:00
Hugues Fafard
7bc4ba81ff cli: --boot: Completed options for direct kernel boot
Adds support for `acpi.table` and `acpi.table.type` suboptions.
2021-07-29 11:44:57 -04:00
Hugues Fafard
0a856179a5 cli: --boot: Completed options for host-based bootloader
Adds support for `bootloader_args` suboption
2021-07-29 11:44:57 -04:00
Hugues Fafard
a24cdd1964 cli: --boot: Completed options for guest-based bootloader
Adds support for `bootmenu.timeout` suboption.
2021-07-29 11:44:57 -04:00
Hugues Fafard
f067435e2a cli: --input: make source.repeat on/off type option 2021-07-28 14:49:52 -04:00
Hugues Fafard
b987613106 cli: --boot: add support of firmware features
libvirt 7.2.0 introduced support for a list of firmware features
that should or should not be present. Libvirt takes these into
account when auto-selecting a firmware. Currently supported features
are `enrolled-keys` and `secure-boot`.
2021-07-28 09:46:16 -04:00
Hugues Fafard
9028d728f8 cli: --input: add support for evdev inputs
This adds support for evdev inputs which were introduced in 7.4.0,
as well as passthrough inputs and some other misc options to complete
the --input command.

New suboptions:
* source.evdev
* source.dev
* source.repeat
* source.grab
* source.grabToggle
* model
2021-07-27 16:04:15 -04:00
Cole Robinson
4793bdaef7 tests: Only run --memdev uuid= test on new enough libvirt
The error was only introduced in later libvirt

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-27 16:04:15 -04:00
Hugues Fafard
20d2376b18 cli: --shmem: added support for shared memory devices
This includes support for the following suboptions:
* name              (<shmem name=X>)
* role              (<shmem role=X>)
* model.type        (<shmem><model type=X/>)
* size              (<shmem><size>X)
* size.unit         (<shmem><size unit=X/>)
* server.path       (<shmem><server path=X/>)
* msi.vectors       (<shmem><msi vectors=X/>)
* msi.ioeventfd     (<shmem><msi ioeventfd=X/>)
2021-07-27 15:55:00 -04:00
Cole Robinson
4017e761c2 tests: Fix --memdev uuid= test
latest libvirt rejects everything we can trigger here

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-27 15:54:50 -04:00
Cole Robinson
6e9b6bff30 cli: --memdev: add uuid= option
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-27 13:01:14 -04:00
Hugues Fafard
ddcca8f585 cli: --disk: add support for driver.queues config 2021-07-27 08:38:09 -04:00
Hugues Fafard
c2f629fc03 cli: --cputune: add iothreadpin[0-9]* config
This adds the following suboptions to configure the
<domain><cputune><iothreadpin> list:

* iothreadpin[0-9]*.iothread
* iothreadpin[0-9]*.cpuset
2021-07-27 08:28:10 -04:00
Hugues Fafard
f0f7ae2d1c cli: --cputune: add emulatorpin.cpuset config
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2021-07-26 14:12:36 -04:00
Cole Robinson
10515ea167 gfxdetails: Default to configured graphics type, not always spice
So if the user chooses a different value from Preferences, or
app is built with a different value, default to that in Add Hardware

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-01 11:24:43 -04:00
Cole Robinson
eb6b79396b Remove shebangs from library paths
These don't really serve any purpose any longer

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-22 19:54:37 -04:00
Cole Robinson
c2ed7ad4ec spec: Remove shebang fixup
redhat-rpm-config brp-mangle-shebangs added in 2018 will do
/usr/bin/env python3 -> /usr/bin/python3 automatically for us

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-22 19:48:19 -04:00
Michal Privoznik
351667a354 virtinst: Support missing NVDIMM knobs
There are two domain XML knobs specific to NVDIMMs that
virt-install doesn't allow to set: <pmem/> and <alignsize/>.
Implement them.

Closes: https://github.com/virt-manager/virt-manager/issues/267
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-06-22 12:47:28 -04:00
Jonathon Jongsma
b1ba9009de spec: use %autosetup
Make sure potential patches get applied by using %autosetup instead of
plain %setup

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-06-22 12:47:28 -04:00
Liu Yiding
e4a9ff7df4 cloner: mark transient_shareBacking disk as shareable
libvirt 7.4.0 added support for sharing base image of <transient/> disks,
multiple VMs can share the same image
https://libvirt.org/news.html#v7-4-0-2021-06-01

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
2021-06-22 12:47:28 -04:00
Cole Robinson
5f12f63549 spec: Move docs to virt-manager-common
And use %license tag

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-15 08:48:06 -04:00
Cole Robinson
58837a7641 tests: Add full test coverage for progress text output
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-09 16:52:12 -04:00
Cole Robinson
078178f476 progress: Drop tqdm and revert back to local urlgrabber copy
I thought tqdm was available everywhere, but it does not seem like
it will be in RHEL9. Revert back to the old urlgrabber copy, now
stored in virtinst/_progresspriv.py. If we ever want to try tqdm
again, we can just revert this commit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-09 16:52:11 -04:00
Cole Robinson
18b017f148 domain: Force jobinfo values to be ints
We only want our meter abstraction to handle int values now

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-09 16:51:48 -04:00
Cole Robinson
f2a04f1abc createvm: Fix text progress with virt-bootstrap
It looks awkward after the text tweaks. Drop the semblance of
progress reporting

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-09 16:51:46 -04:00