Commit Graph

2506 Commits

Author SHA1 Message Date
Cole Robinson
9da917b8ac connection: Add get_libvirt_data_root_dir()
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 09:10:59 -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
bfe17ce627 osdict: Fix test coverage with latest libosinfo
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-13 13:49:08 -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
34662fecc9 tests: Fix with latest argcomplete
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
e924dfb389 Prep for release 4.0.0
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-02 12:44:04 -05:00
Cole Robinson
291b750831 osdict: Hardcode win11 requires UEFI
Since there's a release pending, this is a bit of future proofing
if win11 pops up in a future osinfo-db without accompanying
libosinfo firmware APIs landing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-02 10:57:36 -05:00
Cole Robinson
5640e9be5b osdict: firmware handling tweaks
* Check it for test:/// URI too
* Move the whole logic into osdict.requires_firmware_efi
* Wrap it all in an exception handler the final API breaks us
* Add some coverage exclusions since this is currently untestable

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-02 10:52:06 -05:00
Daniel P. Berrangé
5d74ca7621 virtinst/guest: use EFI firmware if osinfo-db shows lack of BIOS support
Windows 11 only supports EFI for installation, legacy BIOS is
discontinued as an option for new installs, unless you switch into
the console and run various regedit hacks in the installer.

This is not something we expect users to do, so osinfo-db will
report:

   <firmware arch="x86_64" type="efi"/>
   <firmware arch="x86_64" type="bios" supported="false"/>

for Windows 11.

When seeing 'bios' with supported=false, we need to prefer EFI
firmware no matter what.

For other OS we should stil prefer BIOS, because EFI blocks the usage of
internal qcow2 snapshots until some libvirt work is done to use the new
QMP snapshot commands.

Note this relies on a new API osinfo_os_get_complete_firmware_list
just added to libosinfo in version 1.10, so for most existing OS
distros this will be dormant functionality until they rebase to
latest libosinfo APIs.

The Windows 11 entry for osinfo-db will be the first that exposes
the metadata indicating lack of BIOS support.

Related: https://github.com/virt-manager/virt-manager/issues/310
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-03-02 10:42:12 -05:00
Cole Robinson
78e24fc986 cloudinit: Fix disabling cloud-init on first boot
`sudo` throws errors and is not even required to write the `disable`
file. Also add a message to the file that it was created by us

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
08d3068340 installer: Rename install_xml -> initial_xml
Better describes when it applies

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 10:34:52 -05:00
Cole Robinson
825ec644b8 installer: Do not force reboot with --cloud-init
Resolves: https://github.com/virt-manager/virt-manager/issues/189

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 10:32:01 -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
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
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
6c47fa56b9 xmlbuilder: Make XMLManualActions work more like XMLChildProperty
This will help us in upcoming patches add xpath subarguments to
cli device options

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 11:38:13 -05:00
Cole Robinson
e1b168c69b cli: Clean up _init_class mechanism
This will make it easier in future patches to register some objects
programatically

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 15:12:51 -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
310136337c guest: Make default graphics arch check more specific
We enable default graphics for all of ppc64, but really the only
thing we have ever tested is pseries, so make that clear.

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
e3ecae0d2a domain: cpu: Clear 'migratable' and 'check' when changing mode
Otherwise going host-passthrough -> host-model -> host-passthrough
can cause libvirt validation errors or leave unintended bits in
the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 11:04:37 -05:00
Cole Robinson
4760d11bd8 cli: Fix busted --controller example in --help
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 10:39:04 -05:00
Cole Robinson
a7682fc9eb fsdetails: Show virtio-9p vs virtiofs driver field
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:41 -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
d70d4e6e7a devices: tpm: Rework defaults
The code previously was just encoding the same defaults as libvirt,
which doesn't really add anything.

Instead, let's prefer type='emulator' model='tpm-crb', which
gives the most modern virtualization friendly config. When we don't
know if that will work, we mostly leave things up to libvirt to fill
in.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 08:36:28 -05:00
Cole Robinson
46d6491eae domcapabilities: Organize methods a bit
Break out the CPU secure stuff from being inline in the class, most
of the logic there is not relevant to understanding what the
domcapabilities API provides

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-17 14:15:46 -05:00
Cole Robinson
f7f390836a domcapabilities: Add has_value() helper and use it
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-17 14:00:22 -05:00
Cole Robinson
db8305ad01 guest: Default to 16 pcie root ports for q35
Add extra PCIe root ports to enable q35 device hotplug to work out
of the box. A typical modern linux guest has 7-8 PCI devices added
by default, so this gives plenty of wiggle room.

The smart thing to do would be to count the attached PCI devices
and add 4-5 extra, but that takes more work and isn't trivial.

The number can be overridden on the cli with:

  --controller q35_pcie_root_ports=X

Use =0 to go back to the old behavior.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:09:33 -05:00
Cole Robinson
ceeae705c2 guest: Use is_q35 helper in UEFI secboot check
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:06:13 -05:00
Cole Robinson
2c477f3302 domain: cpu: Use host-passthrough by default on x86
When libvirt and qemu are new enough, use host-passthrough for the
CPU default. Nowadays this is recommended over host-model for most
end user usage where migration isn't a critical feature.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
e37e27bc35 guest: Rename _add_implied_controllers -> _add_virtioscsi_controller
Since that's all it does. And clean up the style a bit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:02:58 -05:00
Cole Robinson
0cce75addc capabilities: Remove some XML parsing we don't use
These have been used in the past, but no current code touches them,
so drop the parsing infrastructure

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 12:31:52 -05:00
Cole Robinson
49f54a294b virtinst: cpu: drop host-copy support
host-copy was the old default, but it's fundamentally flawed. Since
we switched to host-model default a few years back, it's not advertised
in the docs or selectable via virt-manager any more.

Have it print a warning and invoke host-model-only

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 12:31:52 -05:00
Cole Robinson
26ecf8a5e3 virt-install: Make missing --osinfo fatal for most cases
This was previously discussed here:
https://listman.redhat.com/archives/virt-tools-list/2020-September/msg00017.html

For the x86 + hvm case, failure to specify an --osinfo/--os-variant
OS, and failure to detect an OS from install media, will now throw
a big error:

```
--os-variant/--osinfo OS name is required, but no value was
set or detected.

This is now a fatal error. Specifying an OS name is required
for modern, performant, and secure virtual machine defaults.

If you expected virt-install to detect an OS name from the
install media, you can set a fallback OS name with:

  --osinfo detect=on,name=OSNAME

You can see a full list of possible OS name values with:

   virt-install --osinfo list

If your Linux distro is not listed, try one of generic values
such as: linux2020, linux2018, linux2016

If you just need to get the old behavior back, you can use:

  --osinfo detect=on,require=off

Or export VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1
```

The thread goes into more detail, but basically, for x86 VMs at least,
it's unlikely you will _ever_ want the default 'generic' behavior,
which gives gives no virtio, no PCIe, no usb3, IDE disks, slow
network devices, etc.

Many people use virt-install in scripts and CI, and this may now
cause breakage. The environment variable is there to help them
get things back to normal as quick as possible, but it will still
noisy up their logs with the warning to hopefully get them to make
a useful change to their virt-install invocations.

This is limited to x86, since that's where most of our defaults
historically differ, and where we can depend on libosinfo to give
the most accurate device info. This may be relevant to change for
other KVM architectures in the future.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 12:25:13 -05:00
Cole Robinson
95cdbf9e8f osdict: Drop usb-tablet checking
Historically over time it's been more likely that an issue is reported
for osinfo-db missing the usb-tablet annotation. So for example we
always enable it for the default 'generic' case. We also want to
enable it for osinfo's 'unknown' case too.

Rather than add another check for that, let's just drop the osinfo
checking entirely. Some very old OS don't support usb-tablet, but
specifying it for those cases doesn't cause issues AFAIK, and users
can override it with `--input none` if they want.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 12:51:05 -05:00
Cole Robinson
e7249fa79f virt-install: Warn about performance for --osinfo generic too
Currently we skip the warning if the user explicitly requests
`--osinfo generic`. Upcoming changes to the defaults here will make
it tempting to specify `--osinfo generic` just to make things work,
and we want to dissuade that, so enable the warning for that case too.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 12:51:01 -05:00
Cole Robinson
9c54c116fa cli: Recommend --osinfo more over --os-variant
We are about to change the some defaults around os handling. Let's
start recommending the nicer named --osinfo more, since new error
messages are going to promote it a bit as well

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
c2fb5ad402 tests: Add grep= annotation for every invalid test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
3e794d2d96 virt-install: Turn --os-type into a no op and warning
I'm still seeing blog posts that recommend using

  --os-type linux --os-variant XXX

Which has been a no op for a long time but is mostly harmless.
Current git would make this an error condition, but that's too
disruptive IMO. Just print a warning

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
1f8afc8668 virtManager: oslist: Push users towards linuxXXXX options
Have the UI push users more towards better defaults, by discouraging
the 'generic' entry and offering the 'linuxXXXX' entries when their
distro or OS version is not in the list.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
95ba78f3e8 osdict: Simplify os list sorting
Previously we tried to use a combination of distro class and version
number to produce a correct ordering that was independent of the
osinfo short ID. The original intent was to have correct ordering
for Windows entries in the virt-manager UI, since the short ID
values are all over the place.

Nowadays that doesn't really matter, since we weed out old
unsupported entries by default. And in the mean time, our current
sort method gives some weird results like interspersing silverblue
entries with fedora entries.

Using a natural/human sort is simpler and handles things pretty well.

Change the UI to sort by the OS label too which preserves some of
the good behavior of original method

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
96a40b1143 cli: Add --os-variant list option to print OS name values
The canonical tool for this is `osinfo-query os`, which we still
reference in the man pages and in the list output.

However, we are about to make missing --os-variant fatal for common
usage, and I don't want to force users to install an extra tool just
to figure out what an acceptable --os-variant value is.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson
d1e1bc0995 devices: graphics: tweak a few log messages
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-10 10:17:15 -05:00
Cole Robinson
b4e35c0687 devices: graphics: Don't use spice default on xen
This matches what we have historically done, prior to the domcaps
change in 30382d57f. Xen will report spice in domcaps but we should
not let that change our historical default

https://listman.redhat.com/archives/virt-tools-list/2022-February/msg00006.html

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-10 10:17:10 -05:00
Cole Robinson
6baa327d67 cli: Add --tpm active_pcr_banks support
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 16:33:08 -05:00
Cole Robinson
8377b7f7b6 details: Remove 'detect zeroes' UI
After checking with qemu devs, this option is not really recommended
for common usage and doesn't get used much in practice. So I don't
think it is suitable for the UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:50:53 -05:00
Cole Robinson
381aa4050c devices: disk: Set discard=unmap by default for some cases
This recommendation came from an internal discussion. The cases are

* For block storage. This means guest requests are passed through
  to the host device, which seems a more reasonable default than
  ignoring them

* For sparse disk images we will create. discard=unmap helps preserve
  the sparseness of the disk image. If a user requests non-sparse, they
  are likely more concerned with performance than saving disk space,
  so we leave the default as is. We limit this to disk images we will
  create, since that's the easiest case to check, and it's less clear
  if we should change the behavior here for an arbitrary existing
  disk image.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:42:49 -05:00
Cole Robinson
1ab6dd50be devices: video: Use virtio default more often
This is from Gerd's suggestions here:
https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/

When the guest supports it, we should use virtio. qxl is on the way
out, and the benefits are marginal and add a security and maintenance
burden.

While here, check domcaps that qxl or virtio are actually available.
Modern qemu has device modules, so device support may not be installed.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:42:49 -05:00
Cole Robinson
f291ad2541 devices: video: Clean up default_model a bit
Add comments for most of the cases, and break apart some nesting

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:42:49 -05:00
Cole Robinson
1498085ff9 domcapabilities: Remove redundant check
get_enum() will always succeed, so the first check is redundant

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:42:43 -05:00
Cole Robinson
16fecb482a cli: Add --memdev target.{current,block,requested}
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-27 09:57:20 -05:00
Cole Robinson
a489d69dc6 cli: Add virtio option driver.page_per_vq=on
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 17:11:56 -05:00
Cole Robinson
01f52fed97 cli: Add --launchSecurity kernelHashes=yes|no
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 17:08:27 -05:00
Cole Robinson
1a1bbe99f8 cloner: Improve error message about unimplemented rbd support
Fixes: https://github.com/virt-manager/virt-manager/issues/340

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 16:58:45 -05:00
Cole Robinson
b7e86d2fcc guest: Move uefi check into _add_default_tpm
This is closer to the same pattern used by _add_default_*

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 13:23:27 -05:00
Cole Robinson
5003f0432e details: Add os.firmware=efi in the firmware selector UI
Let users choose libvirt's os.firmware=efi setting in the UI, putting
it about the firmware path list, since it's the preferred default
these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 13:23:27 -05:00
Cole Robinson
3013889727 guest: Use os.firmware=efi for --boot uefi, if it is supported
<os firmware='efi'> is the libvirt official way to do what we
historically implement with `--boot uefi`, and UEFI setup in
virt-manager.

Let's prefer libvirt's official method if the support is advertised
in domcapabilities.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 11:59:51 -05:00
Cole Robinson
245e89ac38 guest: Rework set/get_uefi entry points
This replaces the pattern:

  Guest.set_uefi_path(Guest.get_uefi_path())

With a single entrypoint

  Guest.enable_uefi()

to immediately change the guest config to use UEFI, using our
default logic.

This will make it easier to change that logic in the future, like
using <os firmware='efi'> instead of hardcoded paths

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 11:59:42 -05:00
Cole Robinson
dfef112b2a virt-xml: Fix device lookup by integer properties
We were not correctly accounting for the internal representation of
some fields, and just trying to a string comparison. We need to be
a bit smarter than that

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 13:43:58 -05:00
Cole Robinson
9c45f4a2e9 details: Strip back 'Enable shared memory' to only cover memfd
Strip back the logic to:

* Only try to toggle source_type=memfd and access_mode=shared
* Disable the field if guest has any <numa> config
* Disable the field if domcaps does not report virtiofs and memfd

This is the simplest future proof case, though it will exclude some
legit guest configs and some libvirt+qemu back compat.

My feeling is the <numa> stuff in particular is pretty advanced, so if
users have it configured they can toggle shared memory via the XML
without too much trouble.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 12:43:32 -05:00
Lin Ma
b19f973f78 domain: cpu: Add function all_shared_memAccess_cells()
It returns true in case all of numa nodes have the "shared" memAccess
attribute defined explicitly.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Lin Ma
f223992934 domain: cpu: Add function has_private_memAccess_cells()
It returns true in case any of numa nodes has the "private" memAccess
attribute.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Lin Ma
0864a9b231 domain: memorybacking: Add function is_shared_access()
It returns true in case the memoryBacking element contains the "shared"
access mode.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Lin Ma
c55a5b2d6d domcapabilities: Add supports_memorybacking_memfd()
Linux memfd memory backend doesn't require any host setup, We prefer to
use it as the simplest memory XML adjustments to make virtiofs works.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Lin Ma
546010ff94 domcapabilities: Add supports_filesystem_virtiofs()
Check whether virtiofs is exposed in domcapabilities, We can use it as a
proxy for 'libvirt is new enough to allow bare memory access mode=shared'
as well.

Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Lin Ma
a608a8c710 domcapabilities: Get filesystem devices
Signed-off-by: Lin Ma <lma@suse.com>
2022-01-25 12:26:14 -05:00
Cole Robinson
f13c8d87fb guest: Remove the hyperv + uefi workaround for win7 + win2k8r2
Both these windows versions are now longer supported, and UEFI isn't
the default, so I don't think this hack is much needed anymore

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 12:05:45 -05:00
Daniel P. Berrangé
eb58c09f48 virtinst/guest: enable a TPM by default if UEFI is present
The bare metal world is moving to a situation where UEFI is going to be
the only supported firmware and there will be a strong expectation for
TPM and SecureBoot support.

With this in mind, if we're enabling UEFI on a VM, it makes sense to
also provide a TPM alongside it.

Since this requires swtpm to be installed we can't do this
unconditionally. The forthcoming libvirt release expands the domain
capabilities to report whether TPMs are supported, so we check that.

The user can disable the default TPM by requesting --tpm none

https://github.com/virt-manager/virt-manager/issues/310
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-21 17:49:15 -05:00
Cole Robinson
7e1f886aa9 cli: Clean up nodedev address functions a bit
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-21 13:20:46 -05:00
Cole Robinson
7986ffa80b nodedev: Move the CLI string format lookup to cli.py
This address string decomposing is strictly and virt-* cli feature.
Move it to cli.py to make that explicit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-21 13:20:46 -05:00
Cole Robinson
d0664bc521 nodedev: Separate out lookupNodedevByName
This will facilitate upcoming cleanups + bugfixes

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-21 13:20:46 -05:00
Daniel P. Berrangé
5622854d8c virtinst: refactor setting of default vcpus count
The sync_vcpus_topology method will sometimes set the self.vcpus prop,
but other times leave it unset. This is confusing an unhelpful
behaviour. Both callers have logic to set the self.vcpus prop
to a default value of sync_vcpus_topology failed to do so. It makes
more sense to just pass this default value in.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:39 -05:00
Daniel P. Berrangé
883419c214 virtinst: allow to force create topology from scratch
When setting CPU defaults we want to force create the topology even if
the user has not specified anything. In particular this allows for
overriding the QEMU defaults, to expose vCPUs as cores instead of
sockets which is a much saner default for Windows.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:39 -05:00
Daniel P. Berrangé
9a578e1ac5 virtinst: prefer cores when exposing topology to the guest
In real world silicon though it is rare to have high socket/die counts,
but common to have huge core counts.

Some OS will even refuse to use sockets over a certain count.

Thus we prefer to expose cores to the guest rather than sockets as the
default for missing fields.

This matches a recent change made in QEMU for new machine types

  commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408
  Author: Yanan Wang <wangyanan55@huawei.com>
  Date:   Wed Sep 29 10:58:09 2021 +0800

    machine: Prefer cores over sockets in smp parsing since 6.2

Closes: https://github.com/virt-manager/virt-manager/issues/155
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
e1c8866163 virtinst: validate that the CPU topology is sane
The product of sockets * dies * cores * threads must be equal to the
vCPU count. While libvirt and QEMU will report this error scenario,
it makes sense to catch it in virt-install, so we can test our local
logic for setting defaults for topology.

This exposes some inconsistent configurations in the test suite.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
609007c9ca virtinst: make CPU topology defaulting take account of dies
Any missing values in the topology need to be calculated based on the
other values which are set.

We can take account of fact that 'total_vcpus' treats any unset values
as being 1 to simplify the way we set topology defaults.

This ensures that topology defaulting takes account of dies.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
9bb86f5186 virtinst: move method for calculating vCPU count from topology
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
c1491ae142 virtinst: set dies in topology to 1
It is always permitted to set dies==1 regardless of architecture or
machine type. The only constraint is around setting values > 1, for
archs/machines that don't support the dies concept.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
7b68fe1a5e virtinst: take account of 'dies' when calc vcpu count from topology
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé
95eb8dda9b virtinst: add missing 'dies' parameter for --vcpus
Although using --cpu topology.XXX is the preferred way to set topology,
it is still possible via the --vcpus parameter. For consistency, this
should support the full set of parameters, so dies needs to be added.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Cole Robinson
9e133de21a diskbackend: Restrict format->driver_type even more
We should only be returning a driver_type value for volumes that
report support_format(), meaning they support file type formats like
qcow2. Any other reported format should be ignored

Dropping the check for 'unknown' value changes one test case a bit,
but it hardcodes raw which is what libvirt gives us anyways, so it's
okay

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-19 14:21:48 -05:00
Simon Kobyda
2676640979 Disk pool volumes should be always attached as "raw" disks
Usually, when storage volume is attached as a disk and disk xml is filled with
default values, the "<driver type=...>" value is copied from volume's
"<format type=...>".  This makes sense for volumes of storage pool of type
"dir", where format types include "raw, qcow2...".

However, the same approach cannot be used for the storage pool of type "disk".
In that case, format types include "none, linux, fat16, fat32...". Such formats
cannot be used for disk's "<driver type=...>".

Therefore, when generating disk XML for volume of storage pool type "disk",
driver type should always be "raw".
2022-01-19 14:11:46 -05:00
Cole Robinson
45eb83f93a osdict: Remove outdated 'no cover' annotation
The test suite does cover this line

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-19 13:45:46 -05:00
Daniel P. Berrangé
d9044419ac virtinst: fix return type in guess_os_by_iso
Accidentally changed in

  commit 302ef1f096
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Fri Nov 26 18:51:49 2021 +0000

    virtinst/osdict: add a property for the OsinfoDb object

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-19 13:44:54 -05:00
Cole Robinson
92c0c4e1a7 tests: Fix test coverage after osdict changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-17 14:51:36 -05:00
Daniel P. Berrangé
9423f6680a virtinst/osdict: remove internal cache of OS objects
Now that we've removed all internal aliases, there is no longer any
reason to keep a cache of OS objects internally. We can directly
query the DB when we need it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-17 14:51:36 -05:00
Daniel P. Berrangé
6b584b183f virtinst/osdict: refactor setup of generic fallback OsinfoOs
Introduce a property for accessing the generic fallback Os object, which
will be useful in future refactoring.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-17 14:51:36 -05:00
Daniel P. Berrangé
302ef1f096 virtinst/osdict: add a property for the OsinfoDb object
This simplies the code a little bit by avoiding visible indirection
via the loader every time.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-17 14:51:36 -05:00
Daniel P. Berrangé
35ef83d628 virtinst/osdict: remove osinfo legacy aliases
The code comment suggests removing the aliases after a year. It has
now been three years, so it is time for them to go.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-17 14:51:36 -05:00
Cole Robinson
499badbdf4 object: nodedev: support isActive state
This was added to libvirt in the past few years, and we may want it
for mdev addhardware UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-17 14:37:06 -05:00
Jonathon Jongsma
9766beea04 cli: add 'ioapic.driver' to --features
Add the ability to set the ioapic driver using the --features argument:

    $ virt-install --features ioapic.driver=qemu ...

This results in the following xml:

  <features>
    ...
    <ioapic driver="qemu"/>
  </features>

This is required in order to install a guest with >255 cpus. Such a
configuration requires an iommu with extended interrupt mode enabled,
which in turn requires IOMMU interrupt remapping to be enabled, which in
turn requires a split I/O APIC.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-01-11 18:26:06 -05:00
Cole Robinson
cdd7061f8e pylint: Fix some deprecation warnings and minor bits
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-11 12:32:23 -05:00
Cole Robinson
7f56717006 osdict: Remove dead code after get_kernel_url_argument usage
This would still be used for old osinfo (mid 2019), and only for
the case of installing 7+ year old RH distros. I think we can safely
delete it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-11 12:32:22 -05:00
Daniel P. Berrangé
019c621b62 virtinst: fix check for UEFI in SEV setup
The code was only checking the manual approach to enabling UEFI, not the
modern automatic approach.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-11 12:04:39 -05:00
Cole Robinson
ed7b8769c4 nodedev: Improve error with unknown address strings
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-11 11:39:29 -05:00
Andrea Bolognani
ed39fd79eb installerinject: Add error detection for initrd injection
Any of the commands involved in injecting files into an initrd
could fail, and if that happens we should interrupt the
installation instead of proceeding as if nothing had happened.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2022-01-04 09:39:21 +00:00
Pino Toscano
0038d750c9 osinfo: use the OS kernel-url-argument if available
Each OS may specify which kernel argument is needed to specify the
installation source; use it as primary source, falling back to the
current logic. This should help supporting new OSes OOTB.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2021-12-10 16:30:50 +00:00
Andrea Bolognani
2e2d3b84bc installerinject: Use root:root instead of +0:+0 as owner
Commit c6b5f22fa6 started passing the --owner argument to
cpio when injecting files into the initrd to comply with the
more strict requirements introduced by systemd starting with
Fedora 30.

However, cpio only started accepting the +uid:+gid syntax in
version 2.12, which means that the fix actually broke the
initrd inject functionality completely in RHEL 7 and other
distros that don't include a recent enough cpio.

Use the user:group syntax instead, which is understood by
all versions of cpio, including non-GNU ones.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2021-12-03 09:12:27 +00:00
Jonathon Jongsma
0c146b2503 Handle new nodedev name for mediated devices
libvirt recently changed the nodedev names for mediated devices due to
the fact that mdevctl supports defining multiple mediated devices with
the same UUID as long as only one is active at a time. This means that
the nodedev name changed from the format 'mdev_$UUID' to the format
'mdev_$UUID_$PARENT'.

Unfortunately, virt-install was parsing the nodedev name to extract the
UUID of a mediated device. This fails with the new name format.
Fortunately, in libvirt 7.3.0, a <uuid> field was added to the xml
schema for mdev devices, so we can simply use this instead, and fall
back to the name parsing if it doesn't exist.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-11-10 14:58:07 +00:00
Cole Robinson
67695d00cf virt-xml: Don't regenerate defaults if both hotplugging and defining
For example, if both hotplugging and defining a new NIC, where we
generate the mac address, we need to use the initial generated device
XML for both operations, and not generate different MAC addresses
for each stage.

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

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-12 15:15:08 -04:00
Cole Robinson
c0f8da69b6 devices: interface: Add support for testing different mac addresses
Some test scenarios need to make sure different mac addresses would
_not_ be used in normal operations, but the test suite always generates
the same value. Add some hacks to let the test suite override the
default behavior and use incrementing addresses

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-12 15:14:06 -04:00
Cole Robinson
68ca651d85 xmlbuilder: Make embedded device XML print correctly
If you call get_xml() on a device that's part of a Guest class,
the last element has correct indent but not the first element.

Steal the indent from the last element and prepend it to the returned
XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-12 15:10:39 -04:00
Cole Robinson
2e7b7745aa tests: mock virt-xml hotplug success
The libvirt test driver doesn't support hotplug. Add an env variable
to ignore failure, so we can get better test coverage here

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-12 15:10:12 -04:00
Cole Robinson
17f0c83cf9 cloudinit: Rename variable to make codespell happy
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-04 16:32:17 -04:00
lisongmin
7da5daff92 cli: --cloud-init add network-config option 2021-10-04 16:31:39 -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
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
8754a59d92 urlfetcher: Silence xorisso stderr output
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-07-30 10:45:07 -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
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
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
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
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
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