Commit Graph

1916 Commits

Author SHA1 Message Date
Cole Robinson e132cb6fcd tests: test_inject: Drop --debug usage
Otherwise it scrolls output too fast and user doesn't notice the
instructions

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-04 15:06:17 -04:00
Cole Robinson 5e48307e9d virtinstall: Set VM name earlier so disks are named correctly
We need to change the flow from

  * parse all the strings
  * set capabilities defaults
  * build installer
  * fill in all guest defaults

To

  * parse boot and metadata strings
  * set capabilities defaults
  * build installer
  * set --name default
  * parse all the remaining strings
  * fill in all guest defaults

Because --disk parsing depends on --name for some path generation.
So this fixes --disk names when --name is implicitly specified by
--install or --osinfo

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson 4ca0d2c29b tests: More trailing newline fixes
The diff_compare rstrip() should never have been added, let's fix
it once and for all but dealing with missing newlines in the diff
helper

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 12:34:47 -04:00
Cole Robinson effe274a9b tests: test_urls: Update fedora links
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-03 11:44:25 -04:00
Charles Arnold 424283ad1d launch_security: Use SEV-ES policy=0x07 if host supports it 2022-08-03 08:47:35 -04:00
Lin Ma 2984c13cff cli: Add --iothreads defaultiothread.thread_pool_{min,max}
It allows to set the thread pool size to optimize spawning worker threads
for the default event loop in real time environment. For example:

--iothreads defaultiothread.thread_pool_min=8,\
defaultiothread.thread_pool_max=16

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-02 14:56:09 -04:00
Lin Ma 0d84bcfbfa cli: Add iothreadids attributes thread_pool_min and thread_pool_max
These two optional attributes allow setting lower and upper boundary for
number of worker threads for given IOThread. For example:

--iothreads iothreads=2,\
iothreadids.iothread0.id=1,\
iothreadids.iothread1.id=2,\
iothreadids.iothread1.thread_pool_min=8,\
iothreadids.iothread1.thread_pool_max=16

Signed-off-by: Lin Ma <lma@suse.com>
2022-08-01 11:32:23 -04:00
Cole Robinson 58ffe7fa7a tests: uitests: livetests: Fix LXC domain cleanup
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 10:38:01 -04:00
Cole Robinson 6287760ed0 tests: Fix memdev uuid testing with libvirt.git
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 06:46:41 -04:00
Cole Robinson a4a5c1529a tests: Fix with latest libvirt
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-07-27 17:51:21 -04:00
Cole Robinson 7ae10b5566 cli: Add --serial source.tls=on|off
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 18:06:40 -04:00
Cole Robinson 137cfdc347 cli: Add --serial source.channel
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 18:03:55 -04:00
Cole Robinson d0e6213643 cli: Add --memorybacking allocation.threads
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 17:54:50 -04:00
Cole Robinson d51541e155 Fix UI rename with firmware='efi'
Our code to duplicate nvram wasn't expecting the XML to be devoid
of an nvram path.

Resolves: https://github.com/virt-manager/virt-manager/issues/372

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 09:37:26 -04:00
Cole Robinson 280c30736f tests: Fix test skipping with old osinfo-db
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-18 17:42:44 -04:00
Cole Robinson 48f66f27fd domcaps: armv7l doesn't support tpm-tis
Libvirt domcaps can advertise armv7l support for tpm-tis, even though
it will explicitly reject that config:

https://gitlab.com/libvirt/libvirt/-/issues/329

Work around that in domcaps. Without this, UEFI arm32 VMs generate
default configs that libvirt will reject

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-17 13:09:39 -04:00
Cole Robinson 3db783dab2 tests: caps: Update with newer amd sev caps
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 14:32:02 -04:00
Cole Robinson 686603eabe tests: Add an explicit test for old host-model default
when caps does not report that libvirt is new enough to default
to host-passthrough

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 14:29:18 -04:00
Jonathon Jongsma 44355e5ed0 virt-install: add support for qemu-vdagent channel
This allows support for host/guest clipboard sharing when using vnc
guests (and possibly other graphics types in the future). This channel
is similar to the spicevmc channel, but it contains a couple additional
options to enable/disable clipboard sharing and specify the mouse mode.
In the case of spice, these settings are specified on the 'graphics'
element, but for qemu-vdagent, they are specified on the channel. For
example:

   --channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-06-13 13:49:08 -04:00
Cole Robinson 0533bb8189 tests: Fix with latest osinfo-db
linux2020 is now reporting virtio-gpu support, adjust output and
add a compat check

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:20:01 -04:00
Martin Kletzander a62e3df72f Add support for URL query with disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 08:35:50 -04:00
Cole Robinson 9ac94ef739 tests: Fix another sgio=filtered case
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-04-13 08:35:50 -04:00
Cole Robinson c61074191d tests: Drop usage of sgio=unfiltered
libvirt 8.1.0+ rejects it, so it breaks the testsuite

Fixes: #382

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-04-13 07:00:37 -04:00
Cole Robinson 3f76ceb110 tests: test_urls: test centos8 and centos9 stream
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-02 11:40:13 -05:00
Cole Robinson 767f856017 tests: test_inject: Some fixes and updates
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson 22478f307d virt-install: Add --cloud-init clouduser-ssh-key=
This sets the sshkey for the default cloud-init username

Resolves: https://github.com/virt-manager/virt-manager/issues/307

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson c8afd1f51e virt-install: Rename --cloud-init ssh-key -> root-ssh-key
Originally we thought it would be for the clouduser, but then
we changed it, and now it's ambiguous. Rename it to make the
usage clear, and add an alias to keep any users working

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson 906604c972 tests: Compare cloud-init userdata output too
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson d77efa1586 installer: Add smbios serial ds=nocloud for --cloud-init
This is a hint to cloud-init that we are passing in a nocloud
data source. This should typically just be an optimization, but
Ubuntu -kvm-disk cloud images since at least 20.04 need this to
work with -M q35:
https://bugs.launchpad.net/cloud-init/+bug/1940791

Fixes: https://github.com/virt-manager/virt-manager/issues/359

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson 51663a2c8c installer: Rework how we alter install and final XML
The Guest object passed in by the user is no longer altered in place,
instead we act on copies of the original XML. We need to rework how
unattended/cloudinit device altering works a bit to handle this.

There's some XML churn because working on parsexml gives different
output ordering, but this is expected.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:13:35 -05:00
Cole Robinson e0c5d74e82 domain: launch_security: simplify defaults and validation
* libvirt fills in cbitpos and reducedPhysBits for us
* libvirt errors if type is missing
* libvirt errors if host/qemu doesn't support sev

So drop it all. This simplifies testing because we don't need
sev domcaps in place just to generate the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-28 08:45:18 -05:00
Cole Robinson 1aaa28e26a tests: uitests: Add coverage for when spice is missing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 14:23:09 -05:00
Cole Robinson 365d1f5d56 diskbackend: Set relative path for media change
Via the virt-manager UI we aren't converting relative path to
absolute path, even though we do it internally when needed.

We were benefiting from this in the test suite in some ways, so we
need to adjust tests to strip out the dev dir on XML comparison

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson 59595aebb7 uitests: details: Break out table cell click helper
We may want to move this to generic code at some point

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson 1f20ef7e07 tests: testdriver: Have all pools use pool- prefix
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:13 -05:00
Cole Robinson 435c7181f1 tests: testdriver: Rename default-pool -> pool-dir
And move the path to not be rooted in /dev, which doesn't make
sense for a directory pool, and triggers some special /dev handling
in virtinst that we don't want in the common testing path.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:03:04 -05:00
Cole Robinson 6a21b38ae8 tests: testdriver: Rename disk-pool -> pool-logical
It _is_ type=logical, so make it clear in the naming. Plus we
already have a type=disk pool named pool-disk

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 12:55:48 -05:00
Cole Robinson d6b74a83d1 cli: Add xpath.* subargs to XML options
This adds the power of --xml to individual device options. For example
this makes it easier to make custom XML changes for a single --disk
device from both virt-install and virt-xml

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 11:46:54 -05:00
Cole Robinson b275e3c266 cli: Add --boot refresh-machine-type=yes
This is a virt-xml option to refresh a VM to use the latest machine
type version for the machine type it's currently using. Ex:

pseries-2.11 -> pseries
pc-q35-5.0 -> q35

This is useful for when qemu deprecates and removes the machine type
out from under you, or to pick up bug fixes.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 14:11:56 -05:00
Cole Robinson 1d9aed678e Revert "guest: Add default graphics for aarch64"
This reverts commit 20d3bf9484.

Indeed graphics does work on aarch64, but for example, fedora
server aarch64 installs don't output any graphical output and only
put data on the serial console. So we would need to be more specific
about how we enable this if we make the change.
2022-02-26 14:11:56 -05:00
Cole Robinson 0611302448 sound: Use ich9 more generally for PCIe, not just q35
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 14:11:56 -05:00
Cole Robinson 9a93f9c949 guest: Default num_pcie_root_ports to 14
qemu 6.1, fairly new when we added this option, has an unfortunate
bug with >= 15 root ports, so we choose 14 instead of our original 16
https://gitlab.com/qemu-project/qemu/-/issues/641

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 14:11:56 -05:00
Cole Robinson 2a3ff3609b Use pcie_root_ports for arm and riscv machvirt
Libvirt defaults to PCIe for arm32/aarch64 and riscv -M virt too.

Rename q35_pcie_root_ports to num_pcie_root_ports and extend the
logic to those archs too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 14:11:56 -05:00
Cole Robinson cd5c34a3f3 cli: Add basic --audio type=XXX,id=Y support
Closes: #264

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-24 14:18:41 -05:00
Cole Robinson 363fca413c virt-install: Require --osinfo for non-x86 HVM case too
It's generally not as valuable for non-x86 where we don't have the
history of supporting non-virtio OSes, but as time goes on it will
likely become more relevant for non-x86 arches, so let's make this
change now to get ahead of it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 11:40:35 -05:00
Cole Robinson 5ebd4313f2 tests: consolidate some arch compare tests
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 11:31:42 -05:00
Cole Robinson 9c0a132f2a fsdetails: Point users to Memory screen if shared memory not enabled
If the user selects virtiofs when editting or adding a new VM, and
we don't detect that they have shared memory enabled, show
a warning label in the UI pointing them to the Memory screen.

It would be nicer if we did this for them, but to get that totally
correct would require both duplicating libvirt's shared memory
detection logic, and some surgery to the addhw wizard. This is good
enough for now

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:44:29 -05:00
Cole Robinson d65d31cea2 devices: filesystem: Fix default virtiofs accessmode
We shouldn't use accessmode=mapped here, libvirt rejects it.
Let libvirt fill in a working default

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:41 -05:00
Cole Robinson 3fd71ea72f tests: cli: A bunch of cleanup
- Move most xml suboption testing to many-devices test
- Clarify every specific bit we are testing in the singleton tests
- Consolidate/drop/reduce a lot of tests

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:41 -05:00
Cole Robinson fd181cecc3 virtManager: Split out tpmdetails.py and tweak it
Split out tpmdetails.py, following the pattern of fsdetails.py. This
adds more UI editing fields for an already attached TPM.

Move the model and version under an 'Advanced options' expander,
since we should be getting this correct by default.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:22 -05:00