Commit Graph

7814 Commits

Author SHA1 Message Date
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
Fabiano Fidêncio
20d3bf9484 guest: Add default graphics for aarch64
As already done for a few architectures, let's add the default
graphics when using aarch64.

This has been tested on a NVIDIA Jetson Xavier NX SBC.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
2021-06-08 10:37:56 -04:00
Cole Robinson
30382d57f1 graphics: Check domcaps for whether spice is available
This has been reported for the libvirt qemu driver since v1.3.5,
released June 2016. But we need to keep some fallback logic for
the test driver, and to keep the testsuite happy

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-08 10:36:19 -04:00
Cole Robinson
5e7a899a8e tests: Regenerate mdev output
There's some whitespace difference on my machine

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-06-08 10:36:17 -04:00
Shalini Chellathurai Saroja
0e15cd51df virt-manager: enable MDEV support
Enable virt-manager GUI to support add, edit, remove, hot-plug and
hot-unplug of mediated devices (like DASDs, APQNs and PCIs) in virtual
server.

It is not possible to edit MDEV when a virtual server is in
running state, as this is not supported by libvirt.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-06-08 09:58:50 -04:00
Shalini Chellathurai Saroja
9d4002ee0f tests: verify MDEV support
Add tests to verify add, edit and remove features of mediated
devices.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-06-01 17:07:36 -04:00
Shalini Chellathurai Saroja
f87e96d3d4 hostdev: use method get_mdev_uuid()
Use method get_mdev_uuid() to retrieve the UUID of MDEV node device
object.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-06-01 17:07:36 -04:00
Shalini Chellathurai Saroja
9363e1e692 virt-xml: add support for mediated devices
Provide support to add/remove MDEV in a guest domain, which is in
shut-off or running state (hotplug/unplug). Also support update of
already existing MDEV device, when the guest domain is in shut-off
state. Please note that libvirt does not support update of MDEV
device, when the guest domain is in running state.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-06-01 17:07:36 -04:00
Cole Robinson
0f6b73d4f1 github: Update issue template
Reword, and link to the graphical debugging wiki page
https://github.com/virt-manager/virt-manager/wiki/Debugging-VM-graphical-display-issues

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-28 15:47:10 -04:00
Han Han
38dd57284f cli: --feature: Support kvm.poll-control.state
Implement kvm.poll-control.state to `virt-install --feature`. It requires
libvirt >= v6.10.0.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2021-05-28 15:43:38 -04:00
Han Han
a1ddd23c89 virtinst: Support transient.shareBacking option
Implement "<transient shareBacking=yes/>" to virtinst to allow a transient disk
to be shared across VMs. It is introduced to libvirt since:

75871da0ec    qemu: Allow <transient> disks with images shared accross
VMs

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2021-05-26 19:04:07 -04:00
Han Han
8ef556773d virtinst: Implement support for transient disks
Since libvirt v6.9, the element <transient/> is to configure a disk
which discards its changes while VM was active. Support this element
by cmdline option `--disk ...,transient=on`.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2021-05-26 19:04:07 -04:00
Han Han
dfd40733f1 virtinst: Support rotation_rate attrib in target
Support rotation_rate attrib which is introduced since libvirt v7.3.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
2021-05-23 17:39:55 -04:00
Cole Robinson
e8272763fc ci: Fix RPM install
This should fix new dep issues as well

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-23 15:25:49 -04:00
Cole Robinson
f929bc7b8b ci: Add tqdm to dep list
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-23 14:23:59 -04:00
Cole Robinson
12d40bdf62 setup: Mostly convert to setuptools
distutils is slated for removal in python3 eventually:
https://www.python.org/dev/peps/pep-0632/

Mostly switch to setuptools. There's still an issue with the way
that we extend the 'build' command that doesn't seem to have a
setuptools equivalent, but we can hack around it if needed.

Closes: #252

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-23 14:23:59 -04:00
Cole Robinson
ed863a66a1 pylint: Another fix for gtk3 version detection
We can't depend on file ordering apparently. Use pylint's
init-hook feature instead

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 16:21:17 -04:00
Cole Robinson
fe7f4db6e7 host: Use libvirtobject.run_status
Fixes uitest coverage when the host doesn't have any inactive
non-domain objects

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 16:17:02 -04:00
Cole Robinson
bed31a6a27 virtinst: Use consistent format for meter filename strings
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
2024068be8 progress: convert to tqdm
tqdm is an external library that provides a progress bar
implementation. Switch to it and drop our internal copy of the
old urlgrabber progressbar

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
6659889319 progress: Some internal API cleanup
* Simplify start() and end() function signature
* Drop use of 'basename' and standardize on 'text'
* Add vmmMeter.is_started()
* Add vmmMeter.set_text()
* Fix asyncjob UI to show text in the progress bar

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
167d2f2f8e delete: Ensure storage_errors is always declared
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
a53f35e425 viewers: Absorb resizeguest support check
This let's us move the gtkvnc import back
to be solely in viewers.py

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
08d1a6a2dd urlfetcher: Delete the 'isoinfo' ISOReader
We didn't delete this in the last commit, mostly to make it easier
to revert this commit if it turns out we need to support both isoinfo
and xorriso. Right now I don't know of any reason why that should
be necessary but time will tell.

If we do go that route it will take more work to teach urlfetcher
to dynamically detect the presence of one or the other, along with
similar tweaks.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
f793986378 urlfetcher: Add xorriso ISOReader implementation
xorisso is the still maintained isoinfo alternative, and may be
the only iso reading tool in RHEL9, so we need to support it.
Make it the default for our spec file and test suite too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
b13b5e0f5e urlfetcher: Factor out ISOReader class
This contains all the isoinfo command logic. This will be used
to add an xorriso backend as well

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
a8e978dd38 pylint: Another fix for gtk3 version detection
We need to place require_version calls earlier and before
any code that might import Gtk/Gdk

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson
99a2818d0e tests: test_urls: Update some URLs
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 13:04:06 -04:00
Cole Robinson
3785abc6f0 installer: Prefer xorrisofs over genisoimage/mkisofs
Apparently it's the most likely version to exist in distros these
days. Particularly the other options may not be shipped in stock
RHEL9

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 13:04:06 -04:00
Cole Robinson
b891018d48 pylint: Ignore consider-using-with
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 13:03:47 -04:00
Cole Robinson
61a4c00835 tests: uitests: Add mock test for VNC autoresize
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-19 16:46:30 -04:00
Daniel P. Berrangé
499739cee3 details: enable resizing of displays with new GtkVnc
The 1.2.0 release of GtkVnc introduces support for remote desktop
resize. This is also supported in QEMU >= 6.0.0 when using virtio-gpu.

This introduces support for resize without forcing a new min version of
GtkVnc by just checking for existance of the new API. We don't attempt
to check if the current QEMU instance supports resize, as we gracefully
degrade - the guest simply won't resize and will be rendered as before.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-19 16:30:00 -04:00
Shalini Chellathurai Saroja
965480e8bc virt-install: add mediated device
Add support to install a virtual server with passed-through mediated
device. Mediated device can be created using vGPU attached to
vfio_pci driver or DASD attached to vfio_ccw driver or APQNs attached
to vfio_ap driver.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
2021-05-18 18:36:03 -04:00