Commit Graph

2971 Commits

Author SHA1 Message Date
Michal Privoznik
d947fa8a08 conf: Introduce firmware attribute to <os/>
The idea is that using this attribute users enable libvirt to
automagically select firmware image for their domain. For
instance:

  <os firmware='efi'>
    <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
    <loader secure='no'/>
  </os>

  <os firmware='bios'>
    <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
  </os>

(The automagic of selecting firmware image will be described in
later commits.)

Accepted values are 'bios' and 'efi' to let libvirt select
corresponding type of firmware.

I know it is a good sign to introduce xml2xml test case when
changing XML config parser but that will have to come later.
Firmware auto selection is not enabled for any driver just yet so
any xml2xml test would fail right away.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 15:29:44 +01:00
Michal Privoznik
cdd592553a virDomainLoaderDefParseXML: Allow loader path to be NULL
Except not really. At least for now.

In the future, the firmware will be selected automagically.
Therefore, it makes no sense to require the pathname of a
specific firmware binary in the domain XML. But since it is not
implemented do not really allow the path to be NULL. Only move
code around to prepare it for further expansion.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 15:29:43 +01:00
Andrea Bolognani
73bc4f185e docs: Document configuration quirks for virtio devices
Some devices (namely virtio-scsi, virtio-gpu, virtio-keyboard,
virtio-tablet and virtio-mouse, plus virtio-crypto which is
not supported by libvirt) don't follow the same rules as all
other virtio devices, which is something that ought to be
documented.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-11 09:53:55 +01:00
Cole Robinson
7a05c739c2 news: document virtio-{non-}transitional feature
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-08 10:53:51 -05:00
Daniel P. Berrangé
27b6ca7d9c docs: remove Google+ link from page footer
Google is shutting down Google+, with no replacement, in the very near
future so we are losing the Libvirt community group there.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-07 11:46:16 +00:00
Pavel Hrdina
9dadc73029 caps: drop requiredSourceElements from storage pool capabilities
Capabilities should not duplicate data that are obvious from our
documentation and will not change with different QEMU binaries
or the way how we compile libvirt.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-03-07 12:01:09 +01:00
John Ferlan
3fd1a15968 docs: Add news article
Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2019-03-06 11:12:48 -05:00
John Ferlan
784cd46fb8 docs: Add description for Storage Pool Capabilities
Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2019-03-06 11:12:48 -05:00
John Ferlan
5dded8c806 docs: Add schema for storage pool capabilities
Define a schema for the storage pool capabilities along with
a test to show the general format.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2019-03-06 11:12:48 -05:00
John Ferlan
05fade52fe docs: Fix a few storage.html.in typos
Fix the ZFS Valid Volume Format Types label and add the
Valid pool format types for Vstorage pools.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2019-03-06 11:12:48 -05:00
Andrea Bolognani
9eaa2a61c5 docs: Fix version number
virtio-(non-)transitional device models have been introduced
in 5.2.0, not 5.1.0.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-03-05 17:09:47 +01:00
Cole Robinson
448a094717 qemu: Support scsi controller model=virtio-{non-}transitional
Add <controller type='scsi' model handling for virtio transitional
devices. Ex:

  <controller type='scsi' model='virtio-transitional'/>

* "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional"

The naming here doesn't match the pre-existing model=virtio-scsi.
The prescence of '-scsi' there seems kind of redundant as we have
type='scsi' already, so I decided to follow the pattern of other
patches and use virtio-transitional etc.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
47f94f4591 qemu: Support virtio-serial controller model=virtio-{non-}transitional
Add controller type='virtio-serial' model handling for virtio
transitional devices. Ex:

  <controller type='virtio-serial' model='virtio-transitional'/>

* "virtio-transitional" maps to qemu "virtio-serial-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-serial-pci-non-transitional"

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
2593a1bd1a conf: Add <input model='virtio-{non-}transitional'/>
<input> devices lack the model= attribute which is used by
most other device types. To eventually support
virtio-input-host-pci-{non-}traditional in qemu, let's add
a standard model= attribute. This just adds the domain_conf
wiring

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
6e64899284 qemu: Support vsock model=virtio-{non-}transitional
Add <vsock> model handling for virtio transitional devices. Ex:

  <vsock model='virtio-transitional'>
    ...
  </vsock>

* "virtio-transitional" maps to qemu "vhost-vsock-pci-transitional"
* "virtio-non-transitional" maps to qemu "vhost-vsock-pci-non-transitional"

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
0f5958f5c5 qemu: Support memballoon model=virtio-{non-}transitional
Add new <memballoon> model values for virtio transitional devices. Ex:

  <memballoon model='virtio-transitional'/>

* "virtio-transitional" maps to qemu "virtio-balloon-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-balloon-pci-non-transitional"

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
947448e212 conf: Add <filesystem model='virtio-{non-}transitional'/>
<filesystem> devices lack the model= attribute which is used by
most other device types. To eventually support
virtio-9p-pci-{non-}traditional in qemu, let's add a standard
model= attribute. The accepted values are:

- virtio
- virtio-transitional
- virtio-non-transitional

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
e063707556 qemu: Support rng model=virtio-{non-}transitional
Add new <rng> model values for virtio transitional devices. Ex:

  <rng model='virtio-transitional'>
    ...
  </rng>

* "virtio-transitional" maps to qemu "virtio-rng-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional"

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:41 -05:00
Cole Robinson
ef41ff4219 conf: Add <hostdev model='virtio-{non-}transitional'/>
qemu vhost-scsi devices map to XML roughly like:

    <hostdev mode='subsystem' type='scsi_host'>
      <source protocol='vhost' wwpn=X/>
    </hostdev>

To support vhost-scsi-pci-{non-}traditional in qemu, we
need to to extend the SCSI Host hostdev XML to handle
model= value. This matches the XML model= format used
for mediated devices. This is just the domain_conf bits
and some XML test cases.

Use of virtio-X naming here does not match the hostdev
protocol=vhost nor does it match the qemu vhost-X device
naming, however it's more consistent with all other
model= names in this area, and also matches the
inconsistency of <vsock> devices which use model=virtio
but map to vhost-vsock on the qemu commandline

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:40 -05:00
Cole Robinson
4d964373b5 qemu: Support interface model=virtio-{non-}transitional
Add new <interface> model handling for virtio transitional devices. Ex:

<interface>
  <model type='virtio-transitional'/>
</interface>

* "virtio-transitional" maps to qemu "virtio-net-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-net-pci-non-transitional"

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:40 -05:00
Cole Robinson
25d05051b3 conf: Add <disk model='virtio-{non-}transitional'/>
<disk> devices lack the model= attribute which is used by
most other device types. bus= mostly acts as one, but it
serves other purposes too like determing what target=
prefix to use, and for matching against controller type=
values.

Extending bus= to handle additional virtio transitional
devices will complicate apps lives, and it isn't a clean
mapping anyways. So let's bite the bullet and add a new
<disk model=X/> attribute, and wire up common handling
for virtio and virtio-{non-}transitional

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-03-04 11:08:40 -05:00
Peter Krempa
58afa434d7 maint: Post-release version bump to 5.1.0
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2019-03-04 12:42:24 +01:00
Daniel Veillard
cc9c141b08 Release of libvirt-5.1.0
* docs/news.xml: updated for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
2019-03-04 10:58:02 +01:00
Eric Blake
d542b45490 news: More 5.1 updates
Mention my snapshot bug fixes, and the corresponding virsh command-line
parse tweak I added while working on the snapshot bug fixes.

Signed-off-by: Eric Blake <eblake@redhat.com>
2019-03-01 08:24:12 -06:00
Andrea Bolognani
6097d1c8d2 news: Trivial style fixes
Some of the recent entries deviated from the established
style used throughout the file, so let's fix them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-02-28 15:24:23 +01:00
Michal Privoznik
fb3b41d225 news: Update for 5.1.0 release
Not exhaustive list of new features, improvements and bugfixes.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2019-02-28 14:26:59 +01:00
Eric Blake
d152c727c6 snapshots: Avoid term 'checkpoint' for full system snapshot
Upcoming patches plan to introduce virDomainCheckpointPtr as a new
object for use in incremental backups, along with documentation on
how incremental backups differ from snapshots.  But first, we need
to rename any existing mention of a 'system checkpoint' to instead
be a 'full system snapshot', so that we aren't overloading
the term checkpoint.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2019-02-26 15:48:58 -06:00
Roman Bogorodskiy
a042c94880 news: document bhyve msrs feature
Describe bhyve's ignoring unknown MSRs access feature
introduced by commit e9528f41c6.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-02-24 13:38:23 +04:00
Roman Bogorodskiy
e9528f41c6 bhyve: implement ignore unknown MSRs feature
Implement the MSRs ignore unknown reads and writes feature
that's specified using:

  <features>
    ...
    <msrs unknown='ignore'>
    ...
  </features>

in the domain XML.

In bhyve, it's just passing '-w' command line argument to the bhyve(8)
executable.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-02-24 13:20:51 +04:00
Roman Bogorodskiy
b71de701b8 conf: introduce 'msrs' feature
Introduce the 'msrs' feature element that controls Model Specific
Registers related behaviour. At this moment it allows only
single tunable attribute "unknown":

 <msrs unknown='ignore|fault'/>

Which tells hypervisor to ignore accesses to unimplemented
Model Specific Registers. The only user of that for now is going
to be the bhyve driver.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-02-24 12:33:42 +04:00
Ján Tomko
060e07c3ca Remove remaining references to kqemu
We dropped support in commit 8e91a40 (November 2015), but some
occurrences still remained, even in live code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2019-02-19 08:33:50 +01:00
Cole Robinson
e00771dfc3 docs: storage: owner/group default to libvirtd UID/GID
Commit fafcc818f changed the docs to say that when creating a
pool directory or file volume with no owner/group specified, they
will be inherited from the parent directory. This isn't correct
now and doesn't seem to have ever been correct

In reality default owner/group is whatever UID/GID libvirtd is
running as

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-02-08 12:37:06 -05:00
Erik Skultety
5846179a2e docs: Update the AMD SEV's spec URL
Luckily, the new URL still points to the same location, the only change
is in the document name where an escaped space (%20) was replaced by an
underscore.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2019-02-08 12:50:30 +01:00
Nikolay Shirokovskiy
74dfa15abe dosc: schema: fix usb source address device attribute format
Device attribute does not have dotted "portAddr" format. Instead it
has single number format described but "usbAddr" which corresponds
to device parsing code in virDomainHostdevSubsysUSBDefParseXML.

Looks like [1] mistakenly changed device format for hostdev devices.
And [2] copy-n-paste this for hostdev network interfaces.

[1] 31710a53 Modify USB port to be defined as a port path
[2] 3b1c191f conf: parse/format type='hostdev' network interfaces

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2019-02-06 10:48:48 +03:00
Andrea Bolognani
ae3955f486 news: Fix typo
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-02-04 09:23:16 +01:00
Roman Bogorodskiy
1879568744 docs: bhyve: warn about bhyve:commandline risks
Document that using bhyve:commandline is not fully
supported and may cause issues.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 22:08:55 +04:00
Laine Stump
62adfa6755 docs: update news.xml for firewalld zone changes
Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 12:57:42 -05:00
Laine Stump
30a6f91686 network: allow configuring firewalld zone for virtual network bridge device
Since we're setting the zone anyway, it will be useful to allow
setting a different (custom) zone for each network. This will be done
by adding a "zone" attribute to the "bridge" element, e.g.:

   ...
   <bridge name='virbr0' zone='myzone'/>
   ...

If a zone is specified in the config and it can't be honored, this
will be an error.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 12:57:13 -05:00
Laine Stump
ae05211a36 network: set firewalld zone of bridges to "libvirt" zone when appropriate
This patch restores broken guest network connectivity after a host
firewalld is switched to using an nftables backend. It does this by
adding libvirt networks' bridge interfaces to the new "libvirt" zone
in firewalld.

After this patch, the bridge interface of any network created by
libvirt (when firewalld is active) will be added to the firewalld
zone called "libvirt" if it exists (regardless of the firewalld
backend setting). This behavior does *not* depend on whether or not
libvirt has installed the libvirt zone file (set with
"--with[out]-firewalld-zone" during the configure phase of the package
build).

If the libvirt zone doesn't exist (either because the package was
configured to not install it, or possibly it was installed, but
firewalld doesn't support rule priorities, resulting in a parse
error), the bridge will remain in firewalld's default zone, which
could be innocuous (in the case that the firewalld backend is
iptables, guest networking will still function properly with the
bridge in the default zone), or it could be disastrous (if the
firewalld backend is nftables, we can be assured that guest networking
will fail). In order to be unobtrusive in the former case, and
informative in the latter, when the libvirt zone doesn't exist we
then check the firewalld version to see if it's new enough to support
the nftables backend, and then if the backend is actually set to
nftables, before logging an error (and failing the net-start
operation, since the network couldn't possibly work anyway).

When the libvirt zone is used, network behavior is *slightly*
different from behavior of previous libvirt. In the past, libvirt
network behavior would be affected by the configuration of firewalld's
default zone (usually "public"), but now it is affected only by the
"libvirt" zone), and thus almost surely warrants a release note for
any distro upgrading to libvirt 5.1 or above. Although it's
unfortunate that we have to deal with a mandatory behavior change, the
architecture of multiple hooks makes it impossible to *not* change
behavior in some way, and the new behavior is arguably better (since
it will now be possible to manage access to the host from virtual
machines vs from public interfaces separately).

Creates-and-Resolves: https://bugzilla.redhat.com/1650320
Resolves: https://bugzilla.redhat.com/1638342
Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 12:08:37 -05:00
Erik Skultety
f2b4039194 docs: news: Update the release notes with the SEV permission fix
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2019-02-01 17:30:33 +01:00
Erik Skultety
b644011918 qemu: conf: Remove /dev/sev from the default cgroup device acl list
We should not give domains access to something they don't necessarily
need by default. Remove it from the qemu driver docs too.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-01 12:39:41 +01:00
Andrea Bolognani
ad25a68826 news: Update for PCI support on RISC-V
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-02-01 11:57:55 +01:00
Erik Skultety
13500ee289 docs: Drop /dev/net/tun from the list of shared devices
This was a left-over that should have been dropped along the change in
qemu.conf.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2019-01-31 16:07:28 +01:00
Daniel P. Berrangé
4a8d9d4953 storage: change custom namespace URIs to drop '/source' component
The custom namespaces were originally registered against the storage
pool source struct, but during review this was changed to the top level
storage pool struct. The namespace URIs were not updated to match, so
had a redundant '/source' component.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-31 12:34:05 +00:00
Peter Krempa
52bf9ada8e docs: css: Make docs page wider while still accomodating narrow screens
Bump the width to 70em while keeping a maximum width of 95% to allow for
some border.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2019-01-31 12:03:32 +01:00
Peter Krempa
63cbad4e05 docs: Format bit shift and hex notation for bitwise flag enums
Big number itself does not make much sense in some cases. Format the
bitshift format as well.

Changes our web page docs from:

VIR_MIGRATE_POSTCOPY = 32768 : Setting the VIR_MIGRATE_POSTCOPY...
VIR_MIGRATE_TLS      = 65536 : Setting the VIR_MIGRATE_TLS flag...

to:

VIR_MIGRATE_POSTCOPY = 32768 (0x8000; 1 << 15)  : Setting the VIR_MIGRATE_POSTCOPY...
VIR_MIGRATE_TLS      = 65536 (0x10000; 1 << 16) : Setting the VIR_MIGRATE_TLS flag...

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2019-01-31 12:02:35 +01:00
John Ferlan
ab6ca81276 rbd: Utilize storage pool namespace to manage config options
Allow for adjustment of RBD configuration options via Storage
Pool XML Namespace adjustments. When namespace arguments are
used to start the pool, add a VIR_WARN to indicate that the
startup was tainted by custom config_opts.

Based off original patch/concept:

https://www.redhat.com/archives/libvir-list/2014-May/msg00940.html

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-29 19:16:25 -05:00
John Ferlan
7a227688a8 storage: Add infrastructure to manage XML namespace options
Introduce the virStoragePoolFSMountOptionsDef to be used to
manage the Storage Pool XML Namespace for mount options.

Using a new virStorageBackendNamespaceInit function, set the
virStoragePoolXMLNamespace into the _virStoragePoolOptions when
the storage backend is loaded.

Modify the storagepool.rng to allow for the usage of a different
XML namespace to parse the fs_mount_opts to be included with
the fs and netfs storage pool definitions.

Modify the storagepoolxml2xmltest to utilize a properly modified
XML file to parse and format the namespace for a netfs storage pool.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-29 19:16:13 -05:00
John Ferlan
801f8cfb37 conf: Add optional NFS Source Pool <protocol ver='n'/> option
Add an optional way to define which NFS Server version will be
used to content the target NFS server.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-29 19:15:27 -05:00
John Ferlan
f06e94af07 docs: Add news mention of default fs/netfs storage pool mount options
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-29 19:15:27 -05:00