Commit Graph

90 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Cole Robinson
12517e0a28 tests: Fix --sound audio.id test
libvirt validates this, but we don't support <audio> devices yet,
so find another way

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-04-06 17:06:41 -04:00
Jonathan Schwender
f9a0c3ccb2 cli: --cputune: add vcpusched[0-9]* config
This adds the following suboptions to configure <cputune>:

- vcpusched.vcpus
- vcpusched.scheduler
- vcpusched.priority

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2021-02-16 16:37:15 -05:00
Cole Robinson
d304a9b205 tests: More bhyve UEFI testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-02-15 13:39:16 -05:00
Roman Bogorodskiy
6c7080a39b virtinst: bhyve: properly configure loader
Bhyve requires explicit loader configuration. So query
domain capabilities, try to find the "official"
firmware and configure all the necessary loader options.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2021-02-15 13:27:48 -05:00
Roman Bogorodskiy
2d254f2815 tests: cli: start testing bhyve
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
2021-02-15 13:27:48 -05:00
Cole Robinson
db44332791 tests: Fix virt-xml test case
This would have caught the bug Roman just fixed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-02-10 10:27:35 -05:00
Cole Robinson
56cb813d42 cli: Add --tpm persistent_state=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-01-24 18:54:54 -05:00
Cole Robinson
2862f1be98 cli: Add --memballoon freePageReporting=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-01-24 18:49:55 -05:00
Cole Robinson
5c1ace02c9 cli: Add --sound audio.id=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-01-24 18:48:09 -05:00
Cole Robinson
d3517ded62 cli: Add --filesystem fmode, dmode
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-01-24 18:46:47 -05:00
Cole Robinson
41eda8a431 tests: Remove now redundant LANG overrides
We added a central one in the previous commit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-12-07 14:32:27 -05:00
Igor Ryzhov
ac9316cce1 virtinst: add support for controller target subelement
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-21 14:47:22 -05:00
Cole Robinson
4cfb3aeff1 cloner: more detailed error messages about supported network vols
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-11 19:06:32 -05:00
Cole Robinson
1a1e4580c0 cloner: Explicitly reject 'network' disks we don't know how to clone
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-03 13:03:03 -05:00
Cole Robinson
fa322588b4 tests: Drop most unittest usage from virtinst tests
Kill usage of the TestCase class, move more to pytest standard
style

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:46 -04:00
Cole Robinson
b79ee9565f tests: Rename test_xmlconfig.py to test_misc.py
That's what it is now, just a collection of misc virtinst tests

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:33 -04:00
Cole Robinson
0ac9ff3488 tests: Drop a bunch of redundant xmlparse/xmlconfig tests
For the few bits we are hitting specific code paths, break them
out or fold them into other test cases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:46:08 -04:00
Cole Robinson
1b93c17564 cli: Add --controller vectors=X
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 13:45:07 -04:00
Pino Toscano
76593f8a08 virtinst: use fail_conflicting
Make use of the new helper for showing a standard error message for two
conflicting cli options. This also catches one untranslatable message.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 15:38:42 -04:00
Cole Robinson
9fdbccec2b Fix pylint raise-missing-from
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-15 12:36:27 -04:00
Cole Robinson
a242894182 cli: Add --os-variant require=on|off
If specified, this errors if no OS name was detected or manually set.
So --os-variant detect=on,require=on will error if no OS is detected.

name= can be used as a fallback, so test and document this case

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:36:12 -04:00
Cole Robinson
17f47a44c5 cli: --os-variant: add explicit suboptions
This adds the following --os-variant suboptions

* name=, short-id=
* id=
* detect=on|off

Functionally this does not change behavior, just adds explicit
sub options for behavior we already support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:15:20 -04:00
Cole Robinson
67703ec7a5 cli: Add --osinfo as alternate name for --os-variant
The --os-variant option naming is pretty crappy and mostly a historical
artifact. Ideally this would be named just `--os` but I'm afraid that
would cause confusion with libvirt's <os> XML

Add --osinfo as an alternate commandline naming. If we ever want to
transition documented use of --os-variant it will help to have the
alternative around for a few releases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 18:12:41 -04:00
Cole Robinson
428948a690 cli: Add disk type=nvme source properties
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 09:58:39 -04:00
Cole Robinson
ffc48af4ee cli: Add --disk source.file, source.dir, source.dev
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 09:58:39 -04:00
Cole Robinson
8560138cf2 cli: Add --xml xpath option for virt-install and virt-xml
The --xml option allows users to request raw XML edits to virt-install
or virt-xml generated XML. This gives users a bit of a workaround
incase we don't have proper support for some XML property. The --xml
option can gain more features in the future if it makes sense, like
setting XML namespaces for example.

Basic usage is like: virt-install --xml ./@foo=bar ...

Which will change the generated <domain> XML to have

<domain foo='bar' ...

virt-xml works similarly. It can only be combined with --edit currently.
This only works with xpaths rooted against the entire document.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 15:04:37 -04:00