Commit Graph

3921 Commits

Author SHA1 Message Date
Daniel P. Berrangé
fca8bcd816 docs: add manpage for virtnodedevd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
3763b624b0 docs: add manpage for virtnetworkd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
bdd57eaf66 docs: add manpage for virtlxcd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
b7e9fefcae docs: add manpage for virtinterfaced
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
cb20f222a2 docs: add manpage for virtbhyved
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
081dd65148 docs: add manpage for virtproxyd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
a992496e91 docs: tweak heading for daemon manual pages
This group will be distinct from the per-driver modular daemon mapages.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
d62d7aa854 docs: don't hardcode an ancient version in manpage examples
Subsitute in the current version so the example always reflect today's
version of reality.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
a7cafa7bc2 docs: consistently mark libvirtd as preformatted text
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Michal Privoznik
12b64f4723 docs: Mention KubeVirt in apps using Libvirt
KubeVirt uses Libvirt to manage virtual machines run in
containers. Mention this in our apps page.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-11 16:06:17 +01:00
Erik Skultety
b44f35e2cf docs: kbase: sev: Adjust the claims that virtio-blk doesn't work
Using virtio-blk with SEV on host kernels prior to 5.1 didn't work
because of SWIOTLB limitations and the way virtio has to use it over
DMA-API for SEV (see [1] for detailed info). That is no longer true, so
reword the kbase article accordingly.

For reference, these are the upstream kernel commits lifting the
virtio-blk limitation:
abe420bfae528c92bd8cc5ecb62dc95672b1fd6f
492366f7b4237257ef50ca9c431a6a0d50225aca
133d624b1cee16906134e92d5befb843b58bcf31
e6d6dd6c875eb3c9b69bb640419405726e6e0bbe
fd1068e1860e44aaaa337b516df4518d1ce98da1

[1] https://lore.kernel.org/linux-block/20190110134433.15672-1-joro@8bytes.org/

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2021-01-11 14:44:15 +01:00
Peter Krempa
d9b70d46bb docs: downloads: Establish handover of package signing
Starting from libvirt-6.6 the releases are done by Jirka. Add a formal
statement from DV handing over the signature.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-11 12:04:45 +01:00
Peter Krempa
e110743d69 docs: downloads: Move 'signatures' section to the end of the document
Keep the more important stuff outlining how to get to the sources first
since the 'signatures' section will be extended.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-11 12:04:45 +01:00
Peter Krempa
06380cb587 conf: snapshot: Add support for <metadata_cache>
Similarly to the domain config code it may be beneficial to control the
cache size of images introduced as snapshots into the backing chain.
Wire up handling of the 'metadata_cache' element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 15:27:00 +01:00
Peter Krempa
154df5840d conf: Introduce <metadata_cache> subelement of <disk><driver>
In certain specific cases it might be beneficial to be able to control
the metadata caching of storage image format drivers of a hypervisor.

Introduce XML machinery to set the maximum size of the metadata cache
which will be used by qemu's qcow2 driver.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 15:27:00 +01:00
Ryan Gahagan
943871f971 docs: add rng schema and formatdomain docs for NFS
Add documentation and schema for the new disk transport protocol.

Signed-off-by: Ryan Gahagan <rgahagan@cs.utexas.edu>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-01-08 15:06:03 +01:00
Peter Krempa
9aa1a1ea77 schema: secret: Relax requirements for usage name
There's plenty of existing documentation [1] which shows as example a
name which contains a space and a dot ('client.admin secret') as ceph
usage name.

Use a more relaxed type in the RNG schema since the usage name is
actually just a string used to look up the secret.

[1]:
https://docs.ceph.com/en/latest/rbd/libvirt/#configuring-the-vm
https://documentation.suse.com/ses/6/html/ses-all/cha-ceph-libvirt.html#ceph-libvirt-cfg-vm
Libvirt docs were correct though:
https://libvirt.org/formatsecret.html#CephUsageType

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 09:18:21 +01:00
Peter Krempa
1a3c07989b schema: Add define for object names
Objects such as domain, pool, etc re-define the regex for the format.
Add more generic types for objects with/without a slash which we'll be
able to reuse also for other objects.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 09:18:21 +01:00
Peter Krempa
e955106195 schema: Remove workaround for bug in libxml2 2.7.6
New libxml2 handles '\n' properly so the literal newline is not
necessary, because 2.9.1 is the minimum version we support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 09:18:21 +01:00
Peter Krempa
33092d716c schema: domaincommon: Remove pointless 'choice' from 'inituser'/'initgroup'
'genericName' allows arbitrary numeric strings so using an explicit
'unsignedInt' choice is pointless. The elements take an username or a
uid which is prefixed by '+', both of which are covered by
'genericName'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-08 09:18:21 +01:00
Michal Privoznik
1dd607cd9c schemas: Allow direct children of <filesystem/> to be interleaved
Now that individual child elements allow their children to be
interleaved, let's allow direct children of <filesystem/> to be
interleaved too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-06 13:44:19 +01:00
Michal Privoznik
374502867e schemas: Allow interleaving of fsBinary children
The <binary/> element of <filesystem/> can have children elements
(<cache/> and <lock/>). Allow them to be interleaved.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-06 13:44:15 +01:00
Michal Privoznik
56fe81af70 schemas: Allow fsDriver to be interleaved
Our <filesystem/> element can have <driver/> child element. But
with the way our schema is written it can't be interleaved and
has to go first.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-06 13:44:03 +01:00
Michal Privoznik
3ae6f5e10e schema: Fix TPM version rules
According to our parser (virDomainTPMDefParseXML()) the version
is an optional attribute and independent of TPM backend type.
Therefore, it's not a choice group, which is what our RNG schema
suggests.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-01-06 12:30:10 +01:00
Peter Krempa
ec554e160b manpage: virsh: Drop note that 'domrename' doesn't work with snapshots/checkpoints
As of commits 3b1244bffd and 4770a96c66 renaming of the domain works
also with checkpoints and snapshots. Update the docs.

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Han Han <hhan@redhat.com>
2021-01-06 11:46:17 +01:00
Eiichi Tsukata
cc6c49f6cd conf: Add support for keeping TPM emulator state
Currently, swtpm TPM state file is removed when a transient domain is
powered off or undefined. When we store TPM state on a shared storage
such as NFS and use transient domain, TPM states should be kept as it is.

Add per-TPM emulator option `persistent_sate` for keeping TPM state.
This option only works for the emulator type backend and looks as follows:

  <tpm model='tpm-tis'>
    <backend type='emulator' persistent_state='yes'/>
  </tpm>

Signed-off-by: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-06 11:44:12 +01:00
Meina Li
24ddf9d0fb docs: support qcow2 format in luks encryption volume
Signed-off-by: Meina Li <meili@redhat.com>
Reviewed-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-05 13:54:11 +01:00
Olaf Hering
1f61660ed9 docs: migration: remove xenmigr
xenmigr was for xend which was removed in in 4.3.0.

Fixes: 1dac5fbbbb
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-05 13:40:25 +01:00
Tim Wiederhake
03be543f6b docs: Fix dead link
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2021-01-05 11:25:14 +01:00
Michal Privoznik
49869e8d57 docs: Document ability to configure lease time
In v6.3.0-rc1~64 we've introduced ability to configure lease
time, but forgot to document the feature. Let's fix that.

Fixes: 97a0aa2467
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908631
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-04 15:33:30 +01:00
Tomáš Janoušek
3fef204d59 kbase: debuglogs: Fix typo in unprivileged libvirtd config path
Signed-off-by: Tomáš Janoušek <tomi@nomi.cz>
2021-01-04 14:31:44 +01:00
Tim Wiederhake
37ffe24968 schema: Allow counter element in host cpu definition
If the capabilities include a counter element, e.g.
  <counter name='tsc' frequency='2591999000' scaling='no'/>
the XML could not be validated:
  $ virsh capabilities > cap.xml
  $ virsh [hypervisor-]cpu-compare cap.xml --validate
  error: Failed to compare hypervisor CPU with cap.txt
  error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/cpu.rng
  Did not expect element counter there

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-18 17:50:49 +01:00
Tim Wiederhake
07cc8b007f schemas: Deduplicate cpuTopology in cputypes.rng
The duplicate had the "dies" attribute missing, causing
  $ virsh capabilities > cap.xml
  $ virsh [hypervisor-]cpu-compare cap.xml --validate
to fail with
  error: Failed to compare hypervisor CPU with cap.xml
  error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/cpu.rng
  Invalid attribute dies for element topology

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-12-18 17:46:41 +01:00
Michal Privoznik
4ab1e3bce7 schema: Allow lxc:namepsace children to appear individually
Since its introduction in v1.2.19-rc1~8 our schema mandates that
LXC domain namespace child elements appear either all three at
once or not at all:

     <lxc:namespace>
       <lxc:sharenet type='netns' value='red'/>
       <lxc:shareipc type='pid' value='12345'/>
       <lxc:shareuts type='name' value='container1'/>
     </lxc:namespace>

This is not mandated by our parser though. Neither by code that
later uses it (virLXCProcessSetupNamespaces()). Relax the schema.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2020-12-17 09:39:26 +01:00
Martin Kletzander
b17eb73446 docs: Slightly alter disks-uri description in virsh man
It's more accurate this way.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2020-12-16 12:19:02 +01:00
Boris Fiuczynski
53cc495179 node_device: detecting mdev_types capability on ap_matrix device
Add detection of mdev_types capability to Adjunct Processor Matrix device.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Jonathon Jongsma<jjongsma@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Shalini Chellathurai Saroja
385ade999c virsh: nodedev: filter by AP Matrix capability
Add support to filter by 'ap_matrix' capability.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Shalini Chellathurai Saroja
2f984adf2d nodedev: detect AP matrix device
Add support for AP matrix device in libvirt node device driver.

https://www.kernel.org/doc/html/latest/s390/vfio-ap.html#the-design

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Farhan Ali
d2c731c9e2 virsh: nodedev: Filter by AP card and AP queue capabilities
Add support to filter by 'ap_card' and 'ap_queue' capabilities.

Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Shalini Chellathurai Saroja
0415611fe0 nodedev: detect AP queues
Each AP card device can support upto 256 AP queues.  AP queues are
also detected by udev, so add support for libvirt nodedev driver.

https://www.kernel.org/doc/html/latest/s390/vfio-ap.html#ap-architectural-overview

Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Shalini Chellathurai Saroja
7a2b898895 nodedev: detect AP card device
Introduce support for the Adjunct Processor (AP) crypto card device.
Udev already detects the device, so add support for libvirt nodedev
driver.

https://www.kernel.org/doc/html/latest/s390/vfio-ap.html#ap-architectural-overview

Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-12-09 14:03:05 +01:00
Peter Krempa
e3922af17c conf: backup: Format index of 'store'
Similarly to other disk-related stuff, the index is useful when you want
to refer to the image in APIs such as virDomainSetBlockThreshold.

For internal use we also need to parse it inside of the status XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-12-08 15:12:34 +01:00
Michal Privoznik
4a76baceb5 docs: Fix nvdimm example wrt to <uuid/>
On PPC platform it is required that a NVDIMM has an UUID. If none
is provided then libvirt generates one during parsing (see
v6.2.0-rc1~96 and friends). However, the example provided in our
documentation is not valid XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Han Han <hhan@redhat.com>
2020-12-04 16:24:19 +01:00
Peter Krempa
abf12f071b conf: checkpoint: Don't require <domain> when redefining checkpoints
The domain definition stored with a checkpoint isn't used currently
apart from matching disks when creating a new checkpoints.

As some users of the incremental backup API want to provide backups in
offline mode under their control (obviously while compying with our
documentation on how the on-disk state should be handled) and then want
to define the checkpoint for live use, supplying a <domain> sub-element
is overly complex and not actually needed by the code.

Relax the restriction when re-defining a checkpoint so that <domain> is
not necessary and add (alibistic) documentation saying that future
actions may not work if it's missing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-12-04 16:15:03 +01:00
Daniel P. Berrangé
d4745bb909 src: use singular form instead of plural, for guest disk info
Existing practice with the filesystem fields reported for the
virDomainGetGuestInfo API is to use the singular form for
field names. Ensure the disk info follows this practice.

Fixes

  commit 05a75ca2ce
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   Fri Nov 20 22:09:46 2020 +0400

    domain: add disk informations to virDomainGetGuestInfo

  commit 0cb2d9f05d
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   Fri Nov 20 22:09:47 2020 +0400

    qemu_driver: report guest disk informations

  commit 172b830435
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   Fri Nov 20 22:09:48 2020 +0400

    virsh: add --disk informations to guestinfo command

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-03 13:10:29 +00:00
Michal Privoznik
5f6a761899 coding-style: Document 100 chars limit for line length
The idea is to have it like a soft limit: if possible then break
lines, if not then have a long line instead of some creative
approach.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-02 16:36:01 +01:00
John Ferlan
ff6f8a6be0 docs: Fix link for virConnectGetStoragePoolCapabilities
The API is in the storage family not the domain family

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-12-02 16:15:43 +01:00
Andrea Bolognani
ebc241fcff docs: Update language bindings spotlight
We should highlight the language bindings that are actively
maintained, keep up with the core library's development pace,
have good API coverage and are relevant to people looking to
integrate libvirt into their projects today: based on these
criteria, it makes sense to highlight the Go binding instead
of the Java one.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-12-01 17:06:21 +01:00
Marc-André Lureau
172b830435 virsh: add --disk informations to guestinfo command
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Han Han <hhan@redhat.com>
2020-12-01 11:23:52 +01:00
Martin Kletzander
9e93d87c00 docs: Document SELinux caveats when migrating over UNIX sockets
The information about sockets having different label than the one on the file
and the way it needs to be set is very difficult to find for those who did not
come across it before.  Let's describe what needs to happen in order for the
migration to go through rather than rely on general knowledge of others.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2020-11-25 00:10:52 +01:00
Matt Coleman
ce8fb26a66 schema: add support for Windows file paths and device names
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matt Coleman <matt@datto.com>
2020-11-24 18:45:07 +00:00
Peter Krempa
5245a7ae4c docs: migration: Add a mention of VIR_MIGRATE_TLS and its enforcement for qemu
Mention the flag to enable TLS and also the knob to enforce it in the
qemu hypervisor driver.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-24 17:59:26 +01:00
Peter Krempa
f496d2de21 docs: migration: Mention that features may not work with tunnelled migration
Enumerate some features which are incompatible with tunnelled migration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-24 17:59:26 +01:00
Peter Krempa
a62bb8641a docs: migration: Fix example for unix socket migration
Fix the following issues:

1) the very long line is overflowing the code box
2) '--migrateuri' was missing for the qemu data stream
3) '--desturi' was not used making it non-obvious what the argument
   corresponds to

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-24 17:59:26 +01:00
Ryan Gahagan
8d7708ac61 virsh: Added attach-disk support for network disk
Related issue: https://gitlab.com/libvirt/libvirt/-/issues/16
Added in support for the following parameters in attach-disk:
--source-protocol
--source-host-name
--source-host-socket
--source-host-transport

Added documentation to virsh.rst specifying usage.

Signed-off-by: Ryan Gahagan <rgahagan@cs.utexas.edu>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-11-23 14:44:39 +01:00
Daniel P. Berrangé
19264c706b conf: add support for ESP SCSI controller family
The NCR53C90 is the built-in SCSI controller on all sparc machine types,
and some mips and m68k machine types.

The DC390 and AM53C974 are PCI SCSI controllers that can be added to any
PCI machine.

These are only interesting for emulating obsolete hardware platforms.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-20 12:09:51 +00:00
Michal Privoznik
87d12effbe virsh: Expose OpenSSH authorized key file mgmt APIs
The new virsh commands are:

  get-user-sshkeys
  set-user-sshkeys

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-11-18 16:18:25 +01:00
Tim Wiederhake
3fc4412c6f qemu: support kvm-poll-control performance hint
QEMU version 4.2 introduced a performance feature under commit
d645e13287 ("kvm: i386: halt poll control MSR support").

This patch adds a new KVM feature 'poll-control' to set this performance
hint for KVM guests. The feature is off by default.

To enable this hint and have libvirt add "-cpu host,kvm-poll-control=on"
to the QEMU command line, the following XML code needs to be added to the
guest's domain description:

  <features>
    <kvm>
      <poll-control state='on'/>
    </kvm>
  </features>

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-17 14:40:46 +01:00
Peter Krempa
9ce41c8896 docs: kbase: Reorder some articles in the 'Usage' section
Historically we've added them in chronological order, but certain
articles are more likely to be needed and thus are easier to find when
placed earlier.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:04 +01:00
Peter Krempa
f6b0a311aa docs: css: Modify appearance of the kbase directory page
Re-style the knowledge base to look like the 'docs.html' page.

We still have room to add one more column.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:04 +01:00
Peter Krempa
9fd2e78b96 docs: xsl: Unify stylability of main container element
page.xsl was adding '<div id="content">' wrapper for the content picked
up from the <body> element from the original input file. Optionally
class="$DOCNAME" was added for some documents taken from <body>.

Since docs generated from RST by docutils have a '<div class='document'
id='$DOCNAME>' we actually don't need an extra wrapper for them.

Additionally if we standardize on one of them we can use the same styles
for both. I've picked the latter because it makes more sense to use the
document name as 'id'.

This patch:
1) Modifies the XSL trasformation to add the wrapper only if it's not
   present.

2) Modifies the XSL transformation to use 'id' for document name and
   class='document' for the wrapper element.

3) Changes docs.html/index.html/hvsupport.html to use 'id' instead of
   'class' for document name.

4) Modifies the main stylesheet to keep styling the elements properly

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:04 +01:00
Peter Krempa
5f0d7fc636 docs: kbase: Split articles into sections
Split the existing list of kbase articles into a 'Usage' category and
into 'Internals/Debugging'. This will later represent the two columns on
the web page.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Peter Krempa
24cd919aaa docs: kbase: Remove extra container from index page
The container was used to apply CSS classes to the content, so the looks
are degraded. The idea is to have a similar layout to the 'docs.html'
page with multiple columns, which will be added later.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Peter Krempa
7462301955 docs: kbase: Move index page to docs/kbase
Move docs/kbase.rst to docs/kbase/index.rst so that the directory itself
shows our index page rather than the autogenerated list of files by the
webserver.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Peter Krempa
95f059838e docs: css: Add a gray box around table of contents of RST based docs
Emphasise the table of contents visually.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Peter Krempa
f988d4320d docs: xslt: Use 'Link' rather than 'Permalink' in header links
The anchors are based on the article or chapter headers, thus they are
not 100% permanent. Especially with pages generated from RST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Peter Krempa
501ff523e7 docs: Fix title of 'docs' page
XSLT transformation generates the page title from the topmost <h1>
element which is not present in 'docs.html.in'. Add it and hide it in
the CSS.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-16 14:04:03 +01:00
Andrea Bolognani
045ecbeec6 kbase: Shorten "less verbose QEMU logging" example
Rationale for the changes:

  * access can be filtered out entirely, as nothing very
    interesting is produced by the only other component in the
    same package (access.accessdriverpolkit);

  * util.udev doesn't exist.

Related filters are also more consistently grouped together.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-11-13 18:15:38 +01:00
Jonathan Watt
1423c1d8bc docs: compiling.html: pass -d to xz to decompress
tar on macOS recognizes XZ compression automatically, but that is
not the case for GNU tar (1.32 at least).  On Fedora 33 the current
instructions result in the following error:

  $ xz -c libvirt-6.9.0.tar.xz | tar xvf -
  tar: Archive is compressed. Use -J option
  tar: Error is not recoverable: exiting now

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jonathan Watt <jwatt@jwatt.org>
2020-11-13 16:22:43 +00:00
Thomas Huth
6f0ee50be2 migration.html: Fix the spelling of the --persistent parameter
"--persist" is missing the "ent" at the end.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-11-13 15:58:52 +01:00
Thomas Huth
0b6d0e2046 migration.html: Fix the spelling of the --undefinesource parameter
There is no dash between "undefine" and "source" in this parameter.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-11-13 15:22:37 +01:00
Michal Privoznik
4895a3e55d kbase: Document minimal libvirt version for NUMA-less virtiofs
Using virtiofs without NUMA was implemented in v6.9.0-rc1~161 but
our kbase document only mentions QEMU version which may confuse
users.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-11-13 10:02:56 +01:00
Andrea Bolognani
6c1ad2735a Fix capitalization "CLang" -> "Clang"
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2020-11-12 15:01:42 +01:00
Boris Fiuczynski
0c841f9b70 node_device: detecting mdev_types capability on CSS devices
Add detection of mdev_types capability to channel subsystem devices.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-11-11 16:56:33 +01:00
Boris Fiuczynski
9c7ac83bd9 docs: rename reference MDEVCap into MDEVTypesCapPCI
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-11-11 16:56:33 +01:00
Boris Fiuczynski
23df990ce4 docs: refactor mdev_types into new paragraph
To prevent copying the mdev_types description multiple times
it is refactored into a new paragraph for easy reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-11-11 16:56:33 +01:00
Jiri Denemark
bd154804b2 schema: Add support for high TSC frequency
The unsignedInt XML schema type allows for values up to 2^32 - 1, i.e.,
using 4294967296 or greater TSC frequency would fail schema validation.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-11-11 13:08:45 +01:00
Daniel P. Berrangé
18c73a4c70 meson: drop use of .path() for python args
When using .path() for an argument to a python script meson will not
setup dependancies on the file. This means that changes to the generator
script will not trigger a rebiuld

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-09 16:32:55 +00:00
Matt Coleman
35f6c6174d docs: drop support for Windows versions prior to 2012R2
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matt Coleman <matt@datto.com>
2020-11-09 15:26:02 +00:00
Peter Krempa
f37d306f6e virsh: checkpoint-create: Add support for VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-09 12:25:50 +01:00
Peter Krempa
af7047717f man: virsh: Mention that '--size' for 'checkpoint-dumpxml' may require running vm
Separate the docs for the '--size' flag into its own paragraph and
mention that the domain may be required to be running.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-09 12:25:49 +01:00
Michal Privoznik
0995f20d0a virsh: Allow listing just domain IDs
Some completers for libvirt related tools might want to list
domain IDs only. Just like the one I've implemented for
virt-viewer [1]. I've worked around it using some awk magic,
but if it was possible to just 'virsh list --id' then I could
drop awk.

1: https://www.redhat.com/archives/virt-tools-list/2019-May/msg00014.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-11-09 11:28:23 +01:00
Boris Fiuczynski
b5f8c358a3 schema: refactor mdev_types out of PCI nodedev schema
Refactor mdev_types into standalone define for later reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-11-04 19:15:17 +01:00
Brian Turek
ae110dc58b qemu: add docs for 'fmode' and 'dmode' options
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options.

Signed-off-by: Brian Turek <brian.turek@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-04 18:25:57 +01:00
Brian Turek
1d446bd465 qemu: add 'fmode' and 'dmode' options
Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the
'filesystem' node in the domain XML. These options control the creation
mode of files and directories, respectively, when using
accessmode=mapped.

Signed-off-by: Brian Turek <brian.turek@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-04 18:25:55 +01:00
Aleksandr Alekseev
d467144cf2 doc: document new filters and not documented ones
Signed-off-by: Aleksandr Alekseev <alexander.alekseev@virtuozzo.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-11-04 17:21:45 +01:00
Peter Krempa
b9759291c5 docs: page.xsl: Improve generation of paragraph anchor links
Use the 'parent' axis to check whether the parent is a div with
class='section' rather than looking for 'toc-backref' anchor to see
whether to generate one of the headerlink alternatives. Both hare
docutils-specific thus apply to docs generated from RST documents.

This adds the links for pages generated from RST documents which don't
have a table of contents (and thus lack the 'toc-backref' anchors) and
thus fixes pages such as hacking.html and news.html to have reasonable
links which can be shared.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-02 14:14:07 +01:00
Jonathon Jongsma
53aec799fa Include vdpa devices in node device list
The current udev node device driver ignores all events related to vdpa
devices. Since libvirt now supports vDPA network devices, include these
devices in the device list.

Example output:

virsh # nodedev-list
[...ommitted long list of nodedevs...]
vdpa_vdpa0

virsh # nodedev-dumpxml vdpa_vdpa0
<device>
  <name>vdpa_vdpa0</name>
  <path>/sys/devices/vdpa0</path>
  <parent>computer</parent>
  <driver>
    <name>vhost_vdpa</name>
  </driver>
  <capability type='vdpa'>
    <chardev>/dev/vhost-vdpa-0</chardev>
  </capability>
</device>

NOTE: normally the 'parent' would be a PCI device instead of 'computer',
but this example output is from the vdpa_sim kernel module, so it
doesn't have a normal parent device.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2020-10-26 02:39:29 -04:00
Jonathon Jongsma
08f8fd8413 conf: Add support for vDPA network devices
This patch adds new schema and adds support for parsing and formatting
domain configurations that include vdpa devices.

vDPA network devices allow high-performance networking in a virtual
machine by providing a wire-speed data path. These devices require a
vendor-specific host driver but the data path follows the virtio
specification.

When a device on the host is bound to an appropriate vendor-specific
driver, it will create a chardev on the host at e.g.  /dev/vhost-vdpa-0.
That chardev path can then be used to define a new interface with
type='vdpa'.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2020-10-20 14:46:52 -04:00
Peter Krempa
6c7e6caf43 schema: domain: Allow space in XML schema for bridge source
vmware's network names can contain space and they are used as bridge
source. Modify the schema to allow it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-20 09:05:10 +02:00
Peter Krempa
590423ca0f schema: domain: Add definition for the 'vmware' private namespace
The 'vmware' private namespace wasn't present in our schema definition
making all XMLs having the <datacenterpath> element invalid.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-20 09:05:10 +02:00
Peter Krempa
6ecd479d01 schema: nwfiter: Allow leading/trailing whitespace in 'variable-name-type'
The reference string parser tolerates some leading/trailing whitespace
for the reference strings as witnessed by
tests/nwfilterxml2xmlin/iter-test3.xml

Allow them in the schema so that the test passes schema validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-20 09:05:10 +02:00
Peter Krempa
4d57aee9ad schema: nwfilter: Allow all accepted values for 'ipsetflags'
The parser for the 'ipsetflags' accepts the 'src' and 'dst' values
stripping case. Express the same in the schema to pass validation of any
accepted string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-20 09:05:10 +02:00
Peter Krempa
73cdeed502 docs/manpages/meson.build: Use template code for XSLT processing
Replace the reimplementation of the XSLT processing custom target with
an identical copy form docs/meson.build and a comment to keep them in
sync.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:51 +02:00
Peter Krempa
9ce9d794f5 docs/kbase/meson.build: Use template code for XSLT processing
Replace the reimplementation of the XSLT processing custom target with
an identical copy form docs/meson.build and a comment to keep them in
sync.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:51 +02:00
Peter Krempa
80c927b6f9 docs/internals/meson.build: Use template code for XSLT processing
Replace the reimplementation of the XSLT processing custom target with
an identical copy form docs/meson.build and a comment to keep them in
sync.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:51 +02:00
Peter Krempa
4ced77a309 docs: meson.build: Prepare for use of identical code for XSLT processing of htmls
Meson unfortunately doesn't give us any means to share the code using
xsltproc to output HTMLs processed by our template. This means we will
have to resort to copy&paste engineering.

To make things simpler, let's use the same block of code in
docs/meson.build but also any of the subdirs which generate htmls.

This will be achieved by making it configurable and wrapping it in a
comment that instructs anybody editing it to keep it identical.

We need to be able to configure the template file used and installation
directory. The rest of the processing is same as we do in
docs/meson.build.

This code will then be copied to subdirs to refactor the current
approach used there.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:50 +02:00
Peter Krempa
fa84e3c46a docs: meson.build: Generate HTML files directly by meson
Since we no longer reformat the XSLT-transformed files, there's no need
to use an external script any more.

Unfortunately this hid errors from 'xsltproc' as return value was not
checked and the stderr was piped into xmllints stdin. The result was
that any invalid input file would result into an empty output file.

Since the script's only purpose was to prevent additional temporary
files at the time we were reformatting the output in a pipeline we no
longer need this.

Moving the generation directly into the meson definition makes it more
obvious what's happening and saves readers from having to parse what's
going on. A free bonus is that errors are now properly caught and
reported.

This patch converts the main docs/ directory for now with cleanup of
other comming later.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:50 +02:00
Peter Krempa
46b5e9a92e docs: meson.build: Limit html files depending on 'aclperms.htmlinc'
Only 'acl.html' output file includes that file so there's no need to
make everything depend on it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:50 +02:00
Peter Krempa
0cb10f23a0 docs: migration: Fix syntax
One of the paragraphs added in f51cbe92c0 was not terminated thus
making it invalid XML/XHTML.

This was not caught by the build system as 'scripts/meson-html-gen.py'
unnecessarily obscures and hides errors from 'xsltproc'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-10-19 12:40:50 +02:00
Peter Krempa
8142950a7f schema: domain: Accept VMware disk sources for the disk
Accept the 'datastore' variant of disk source specification used by our
VMware driver.

https://libvirt.org/drvesx.html#datastore

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
2020-10-19 12:03:06 +02:00
Erik Skultety
2508d10f67 conf: domain: sev: Make 'cbitpos' & 'reducedPhysBits' attrs optional
These XML attributes have been mandatory since the introduction of SEV
support to libvirt. This design decision was based on QEMU's
requirement for these to be mandatory for migration purposes, as
differences in these values across platforms must result in the
pre-migration checks failing (not that migration with SEV works at the
time of this patch).

Expecting the user to specify these is cumbersome and the same XML
cannot be re-used across different revisions of SEV. Since
we have SEV platform information saved in QEMU capabilities, we can
make the attributes optional and should fill them in automatically
in the QEMU driver right before starting it.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/57

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-10-19 11:03:39 +02:00
Michal Privoznik
da20178709 docs: Document camelCase preference for XML elements and attributes
Recently I've merged a patch that used hyphens in an attribute
name. I fixed it later, but turned out we don't document our
preference which is camelCase.

Suggested-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-10-19 10:18:27 +02:00
Tim Wiederhake
4bd0633211 docs: Expand on recommendation in hypervisor-cpu-baseline description
On some architectures, e.g. aarch64 and s390x, the output of
`virsh capabilities` is not suitable for use in
`virsh hypervisor-cpu-baseline`. Expand the description of the
man page to make this explicit.

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

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-10-15 11:39:17 +02:00
Michal Privoznik
0c5bb37f76 docs: Clarify free_page_reporting attribute
The 'reporting' suffix of the attribute makes it sound like we
could be reporting something to user. While in fact, this is
purely virtio membaloon <-> QEMU business. Clarify the docs to
make it clear.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-15 10:57:33 +02:00
Michal Privoznik
76db9e8bcd lib: s/free-page-reporting/freePageReporting/
In fee8a61d29 a new attribute to <memballoon/> was introduced:
free-page-reporting. We don't really like hyphens in attribute
names. Use camelCase instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-15 10:57:11 +02:00
Jiri Denemark
cb6c2fa4ed docs: Mention GPG key used for signing releases
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-10-14 17:33:27 +02:00
Halil Pasic
5d787acbf0 Reflect in virtiofs.rst that virtiofs can be used without NUMA
Reflect in the virtiofs documentation that virtiofs can now be used
even without NUMA. While at it, be more precise where and why shared
memory is required.

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-13 19:04:47 +02:00
Nico Pache
fee8a61d29 Document and parser support for the Virtio free page reporting feature.
This will add the proper documentation and parser support for the free page
reporting feature that is introduced in QEMU 5.1.

Signed-off-by: Nico Pache <npache@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-13 17:01:38 +02:00
Roman Bogorodskiy
065eb39b41 docs: bhyve: document virtio-9p support
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-12 15:26:00 +04:00
Tim Wiederhake
b31aa165e8 doc: Fix element name in description of "feature"
Actual change is "s/``elements``/``feature`` elements/", rest is
reflow.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2020-10-09 15:38:05 +02:00
Tim Wiederhake
cc5b1a562d docs: Remove references to "cpu_map.xml" in the documentation
"cpu_map.xml" was moved to a directory "cpu_map" and split up into
several files.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2020-10-09 15:38:05 +02:00
Matt Coleman
c0939b4e56 hyperv: implement connectGetVersion
Hyper-V version numbers are not compatible with the encoding in
virParseVersionString():
https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virutil.c#L246

For example, the Windows Server 2016 Hyper-V version is 10.0.14393: its
micro is over 14 times larger than the encoding allows.

This commit repacks the Hyper-V version number in order to preserve all
of the digits. The major and minor are concatenated (with minor zero-
padded to two digits) to form the repacked major value. This works
because Microsoft's major and minor versions numbers are unlikely to
exceed 99. The repacked minor value is derived from the digits in the
thousands, ten-thousands, and hundred-thousands places of Hyper-V's
micro. The repacked micro is derived from the digits in the ones, tens,
and hundreds places of Hyper-V's micro.

Co-authored-by: Sri Ramanujam <sramanujam@datto.com>
Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-09 09:27:20 +02:00
Mauro Matteo Cascella
25fc56ed77 docs/submitting-patches: add reference to DCO
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-09 09:12:39 +02:00
Roman Bogorodskiy
5c86821a87 docs: bhyve: style improvements
- Wrap long lines in "domxml-to-native" example so it fits
   content width,
 - For changeset revision links, use "FreeBSD changeset rN" or
   "changeset rN" instead of just "rN" to make it more readable.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-08 15:52:57 +04:00
Tim Wiederhake
94bac7c866 schema: Make element "topology" in host CPU definition optional
This element is not always present, see e.g.
x86_64-cpuid-Xeon-X5460-host.xml, x86_64-cpuid-Pentium-P6100-host.xml,
or x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2020-10-08 10:15:31 +02:00
Tim Wiederhake
9702659807 virsh: Add "validate" argument to [hypervisor-]cpu-compare
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-07 11:26:27 +02:00
Tim Wiederhake
5d325240c6 schema: Add schema for guest or host cpu definition
`virsh cpu-compare` and `virsh hypervisor-cpu-compare` both accept
guest and host cpu definitions. This schema is able to validate both
possibilities.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-07 09:18:07 +02:00
Tim Wiederhake
dfa5231934 schema: Move guest cpu definition to cputypes.rng
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-07 09:18:07 +02:00
Tim Wiederhake
e7ef77a7ac schema: Move host cpu definition to cputypes.rng
This also inlines the defintions for "cpufeature", "cpuspec",
"featureName" and "pagesHost", as "cpu" was the only user.

Doing so avoids a naming collision when cputypes.rng is included in
other schemas in a later patch.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-07 09:18:07 +02:00
Tim Wiederhake
0e907b8216 schema: Unify apostrophe and quotation mark usage
Quotation marks were used ~ 7000 times, apostrophes ~ 3000 times.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-07 09:18:07 +02:00
Cole Robinson
1bd16c6cf7 docs: formatdomain: add spicevmc <redirdev> example
spicevmc is the most common <redirdev> usage. This adds an XML example
for it.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-10-05 10:07:29 -04:00
Cole Robinson
4b90bb1f46 docs: formatdomain: fix net downscript 'since'
It was added in 6.4.0, not 5.1.0

Fixes: 61ba6f09b1

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-10-05 10:07:29 -04:00
Cole Robinson
10151470c8 docs: formatdomain: fix incorrect 'Vsock' heading indent
Currently it is visually at the same indent as <seclabel>. This
fixes it to be grouped it with <devices>

Fixes: d4abb7b45d

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-10-05 10:07:29 -04:00
Cole Robinson
b35947e635 docs: formatdomain: remove doubled filesystem <driver>
libvirt doesn't reject this but only one <driver> element takes
effect.

Drop the instance that is already referenced in the previous example

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-10-05 10:07:29 -04:00
Daniel P. Berrangé
a7464a3f01 docs: use "::" instead of ".. code-block::"
The former is a short hand for the latter and is already widely used in
the docs. Using the short hand avoids incompatibility with the alternate
impl of rst2html5.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-05 13:05:47 +01:00
Daniel P. Berrangé
0ea50f0148 docs: fix misc spelling errors reported by codespell
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-05 10:28:37 +01:00
Ján Tomko
c1f3a628d0 docs: glib-adoption: add string arrays and objects
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:44 +02:00
Ján Tomko
674f6dcb9d docs: glib-adoption: add links to GLib documentation
Make life a bit easier for people unfamiliar with GLib.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:44 +02:00
Ján Tomko
900e54ed2e docs: glib-adoption: split into sections
Although all the mentioned functions deal with
allocation, replacing the pure allocation
functions is easier than converting code to
use GArrays.

Split them out to encourage usage of GLib
allocation APIs even at the cost of them
being combined with VIR_*ELEMENT APIs.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:44 +02:00
Ján Tomko
080ab92587 docs: glib-adoption: remove stuff we alredy removed
https://www.redhat.com/archives/libvir-list/2020-May/msg00299.html

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:44 +02:00
Ján Tomko
5ba795ae68 docs: build glib-adoption.html
We switched to meson in the meantime so the conversion
to HTML has to be explicitly requested.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:44 +02:00
Ján Tomko
753374bab8 Revert "docs: Drop glib-adoption.rst"
Cleaning up after Andrea as he requested:
https://www.redhat.com/archives/libvir-list/2020-May/msg00405.html

This reverts commit 842d3712ed

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-02 14:10:40 +02:00
Masayoshi Mizuma
596c659b4e qemu: validate: Allow <transient/> disks
Extract the validation of transient disk option. We support transient
disks in qemu under the following conditions:

 - -blockdev is used
 - the disk source is a local file
 - the disk type is 'disk'
 - the disk is not readonly

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Tested-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
2020-10-01 09:55:02 +02:00
Roman Bogorodskiy
9c2ba74ad6 docs: bhyve: document sound device and VNC bits
* Document sound device support,
 * Document VNC password configuration and framebuffer resolution.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-09-29 18:50:08 +04:00
Pino Toscano
f4e3beaffd gitdm: add more individual contributors
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-09-25 16:00:06 +02:00
Peter Krempa
d6ac9b22d3 docs: manpages: Strip table of contents from manpages
After meson conversion the man pages started to contain the table of
contents.

In autoconf we prevented this by a 'grep -v ::contents' in the command
building the manpages.

A more cultured solution is to strip out the 'contents' docutils element
directly.

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-09-23 16:20:36 +02:00
Andrea Bolognani
cf81c85bf5 tests: Don't advertise VIR_TEST_EXPENSIVE to users
Right now, the logic that takes care of deciding whether expensive
tests should be run or not is not working correctly: more
specifically, it's not possible to use something like

  $ VIR_TEST_EXPENSIVE=1 ninja test

to override the default choice, because in meson.build we always
pass an explicit value that overrides whatever is present in the
environment.

We could implement logic to make this work properly, but that
would require some refactoring of our test infrastructure and is
arguably of little value given that running

  $ meson build -Dexpensive_tests=enabled

is very fast, so let's just stop telling users about the variable
instead and call it a day.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2020-09-23 11:30:05 +02:00
Andrea Bolognani
1d46f03a55 docs: Document global_{period,quota} schedinfo fields
These fields have existed for a very long time but they were
never documented in virsh(1).

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

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2020-09-23 11:29:14 +02:00
Fabian Freyer
2968e5ff3a bhyve: add support for setting fbuf resolution
The resolution of the VNC framebuffer can now be set via the resolution
definition introduced in 5.9.0.

Also, add "gop" to the list of model types  the <resolution/>
sub-element is valid for.

Signed-off-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-22 17:19:26 +04:00
Daniel Henrique Barboza
63af8fdeb2 qemu: revert latest pSeries NVDIMM design changes
In [1], changes were made to remove the existing auto-alignment
for pSeries NVDIMM devices. That design promotes strange situations
where the NVDIMM size reported in the domain XML is different
from what QEMU is actually using. We removed the auto-alignment
and relied on standard size validation.

However, this goes against Libvirt design philosophy of not
tampering with existing guest behavior, as pointed out by Daniel
in [2]. Since we can't know for sure whether there are guests that
are relying on the auto-alignment feature to work, the changes
made in [1] are a direct violation of this rule.

This patch reverts [1] entirely, re-enabling auto-alignment for
pSeries NVDIMM as it was before. Changes will be made to ease
the limitations of this design without hurting existing
guests.

This reverts the following commits:

- commit 2d93cbdea9
  Revert "formatdomain.html.in: mention pSeries NVDIMM 'align down' mechanic"

- commit 0ee56369c8
  qemu_domain.c: change qemuDomainMemoryDeviceAlignSize() return type

- commit 07de813924
  qemu_domain.c: do not auto-align ppc64 NVDIMMs

- commit 0ccceaa57c
  qemu_validate.c: add pSeries NVDIMM size alignment validation

- commit 4fa2202d88
  qemu_domain.c: make qemuDomainGetMemorySizeAlignment() public

[1] https://www.redhat.com/archives/libvir-list/2020-July/msg02010.html
[2] https://www.redhat.com/archives/libvir-list/2020-September/msg00572.html

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-09-22 12:25:34 +02:00
Roman Bogorodskiy
f787df9947 conf: add 'isa' controller type
Introduce 'isa' controller type. In domain XML it looks this way:

    ...
    <controller type='isa' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
               function='0x0'/>
    </controller>
    ...

Currently, this is needed for the bhyve driver to allow choosing a
specific PCI address for that. In bhyve, this controller is used to
attach serial ports and a boot ROM.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-09-21 20:01:12 +04:00
Pavel Hrdina
de3289e2b5 remove HAL node device driver
There was one attempt a year ago done by me to drop HAL [1] but it was
never resolved. There was another time when Dan suggested to drop HAL
driver [2] but it was decided to keep it around in case device
assignment will be implemented for FreeBSD and the fact that
virt-manager uses node device driver [3].

I checked git history and code and it doesn't look like bhyve supports
device assignment so from that POV it should not block removing HAL.

The argument about virt-manager is not strong as well because libvirt
installed from FreeBSD packages doesn't have HAL support so it will not
affect these users as well [4].

The only users affected by this change would be the ones compiling
libvirt from GIT on FreeBSD.

I looked into alternatives and there is libudev-devd package on FreeBSD
but unfortunately it doesn't work as it doesn't list any devices when
used with libvirt. It provides libudev APIs using devd.

I also looked into devd directly and it provides some APIs but there are
no APIs for device monitoring and events so that would have to be
somehow done by libvirt.

Main motivation for dropping HAL support is to replace libdbus with GLib
dbus implementation and it cannot be done with HAL driver present in
libvirt because HAL APIs heavily depends on symbols provided by libdbus.

[1] <https://www.redhat.com/archives/libvir-list/2019-May/msg00203.html>
[2] <https://www.redhat.com/archives/libvir-list/2016-April/msg00992.html>
[3] <https://www.redhat.com/archives/libvir-list/2016-April/msg00994.html>
[4] <https://svnweb.freebsd.org/ports/head/devel/libvirt/Makefile?view=markup>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-17 18:19:26 +02:00
Lin Ma
b1cc6f93dd docs: virsh: Document the IO mode 'io_uring'
Signed-off-by: Lin Ma <lma@suse.de>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-17 12:26:00 +02:00
Peter Krempa
931c1d128d syntax-check: Don't forbid curly braces around single line condition body
This syntax rule doesn't make much sense, especially if there are so
much exceptions to it. Just remove it and adjust the coding style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-09-15 15:20:23 +02:00
Pino Toscano
66732236a4 esx: implement domainInterfaceAddresses
Implement the .domainInterfaceAddresses hypervisor API, although only
functional for the VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT source.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-15 10:00:48 +02:00
Boris Fiuczynski
ab655afa18 virsh: nodedev: ability to filter CSS capabilities
Allow to filter for CSS devices.

Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2020-09-15 09:06:24 +02:00
Boris Fiuczynski
05e6cdafa6 node_device: detect CSS devices
Make channel subsystem (CSS) devices available in the node_device driver.
The CCS devices reside in the computer system and provide CCW devices, e.g.:

  +- css_0_0_003a
      |
      +- ccw_0_0_1a2b
          |
          +- scsi_host0
              |
              +- scsi_target0_0_0
                  |
                  +- scsi_0_0_0_0

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2020-09-15 09:06:15 +02:00
Pino Toscano
3c79c08299 esx: implement domainGetHostname
Implement the .domainGetHostname hypervisor driver API to get the
hostname of a running guest (needs VMware Tools).

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-09-14 08:11:43 +02:00
Lin Ma
0bdd5299a0 docs: virsh: Drop duplicate spelling for dompmwakeup
Signed-off-by: Lin Ma <lma@suse.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-09-12 12:49:32 +02:00