Commit Graph

2095 Commits

Author SHA1 Message Date
Peter Krempa
c22dad33c2 docs: Add at least some docs and fix schema entry for perf events
There was no documentation at all for the XML part. I added at least
some. The 2.0.0 introduction date is deliberate as the parser for the
XML is broken.

The schema file was missing entries for 'mbml' and 'mbmt'.
2016-06-17 09:35:14 +02:00
Andrea Bolognani
2c51fa6ec4 maint: Switch to xz compressed PAX release archives
This allows us to produce releases that are roughly a third in
size, have no limitation on path length, and are still readable
by all supported platforms.
2016-06-15 18:53:34 +02:00
Ján Tomko
e347e732bb docs: document rng backend path restrictions of older libvirt
Commit 67f2b72 removed the path restrictions for rng backend,
along with the documentation of the restriction.

Restore the documentation for users still using older libvirt.

https://bugzilla.redhat.com/show_bug.cgi?id=1074464
2016-06-15 12:36:53 +02:00
Jingjing Shao
442cdb817e doc: Fix explanation of S3 and S4 states
Explanation of S3 and S4 states was swapped.
2016-06-15 08:58:14 +02:00
John Ferlan
323d5bdc94 docs: Clarify chardev protocol
Add a slight clarification to usage of "telnet", "telnets", or "tls" as
the protocol type value.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-06-14 08:41:45 -04:00
John Ferlan
9f044e6272 docs: Fix syntax-check
Commit id '42ff399a' broke syntax-check by not encasing <dt> elements
in <code>xxx</code>
2016-06-14 06:22:37 -04:00
Martin Kletzander
42ff399a5e Fix renumbering once again
I screwed up by accidentally pushing incomplete version of the
renumbering commit.  This patch just fixes the rest so the tree matches
changes in v2.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-14 12:06:13 +02:00
Martin Kletzander
e8dc0e3a43 Change 1.3.6 occurrences to 2.0.0 to follow version bump
Version was bumped but documentation (and comments) didn't follow the
numbering.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-14 11:15:18 +02:00
Daniel P. Berrange
8264c70e0b Bump release to 2.0.0 and document release schedule & versioning
This bumps the release number of 2.0.0, to reflect the switch to
a new time based release versioning scheme. The downloads page
is updated to describe our policies for release schedules and
release version numbering

The stable release docs are changed to reflect the fact that
the stable version numbers are now just 3 digits long instead
of 4.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-14 10:59:07 +02:00
Martin Kletzander
d3c784999d conf: Add support of zero-detection for disks
This option allows or disallows detection of zero-writes if it is set to
"on" or "off", respectively.  It can be also set to "unmap" in which
case it will try discarding that part of image based on the value of the
"discard" option.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-14 08:25:25 +02:00
Pavel Hrdina
93a2fb230a vnc: add support for listen type none
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:46:45 +02:00
Pavel Hrdina
c34ada0996 spice: introduce listen type none
This new listen type is currently supported only by spice graphics.
It's introduced to make it easier and clearer specify to not listen
anywhere in order to start a guest with OpenGL support.

The old way to do this was set spice graphics autoport='no' and don't
specify any ports.  The new way is to use <listen type='none'/>.  In
order to be able to migrate to old libvirt the migratable XML will be
generated without the listen element and with autoport='no'.  Also the
old configuration will be automatically converted to the this listen
type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:44:08 +02:00
Pavel Hrdina
e0c309b2dc spice: add support for listen type socket
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1335832

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:43:15 +02:00
Pavel Hrdina
acc83afe33 vnc: add support for listen type 'socket'
VNC graphics already supports sockets but only via 'socket' attribute.
This patch coverts that attribute into listen type 'socket'.

For backward compatibility we need to handle listen type 'socket' and 'socket'
attribute properly to support old XMLs and new XMLs.  If both are provided they
have to match, if only one of them is provided we need to be able to parse that
configuration too.

To not break migration back to old libvirt if the socket is provided by user we
need to generate migratable XML without the listen element and use only 'socket'
attribute.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:42:48 +02:00
Pavel Hrdina
b6465e1aa4 graphics: introduce new listen type 'socket'
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-09 14:24:00 +02:00
Daniel P. Berrange
416358d99d remote: allow TLS protocol/cipher priority override in URI
Add support for a "tls_priority" URI parameter in remote
driver URIs. eg

 qemu+tls://localhost/session?tls_priority=NORMAL:-VERS-SSL3.0

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-06-08 13:48:45 +01:00
Michal Privoznik
cc874efb5b docs: Document our event loop
I was asked the other day what's event loop and how libvirt uses
it. Well, I haven't found any good sources on the Internet so I
thought of writing the documentation on my own.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-06-06 17:35:44 +02:00
Daniel Veillard
7324444bc7 Release of libvirt-1.3.5
* docs/news.html.in: update with 1.3.5 data
2016-06-04 23:29:59 +08:00
Michal Privoznik
3864d86385 apibuild: Substitute only pure number tokens
In 38df47c9af I've tried to prepare our apibuild.py script for
change made in 0628f3498c (1U << 31). What I've done in the
former commit was to replace \d+U in parsed tokens with \d.
Problem was, my regular expression there was not quite right as
it also translated VIR_123U_VAL into VIR_123_VAL.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-05-30 15:38:07 +02:00
Michal Privoznik
38df47c9af docs: Teach apibuild to deal with (1U << 31) too
The apibuild script is a terrifying beast that parses some source
files of ours and produces an XML representation of them. When it
comes to parsing enums we have in some header files, it tries to
be clever and detect a value that an enum member has (or if it is
an alias for a different member). Whilst doing that it has to
deal with values we give to the members in many formats. At some
places we just pass the value in decimal:

    VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = 1,

in other places, we use the aliasing:

    VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE,

and in other places bitwise shifts are used:

    VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1 << 31, /* enforce requested stats */

The script tries to parse all of these resulting in the following
tokens: "1", "VIR_CONNECT_LIST_DOMAINS_ACTIVE", "1<<31"; Then, the
script tries to turn these into integers using python's eval()
function. This function succeeds on the first and the last
tokens. But, if we were to modify the last example so that it's
of the following form:

    VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1U << 31, /* enforce requested stats */

the token representing enum's member value will then be "1U<<31".
So our parsing is good. Unfortunately, python is not aware of the
difference between signed and unsigned C types, therefore eval()
fails over this token and the parser falls back thinking it's an
alias to another enum member. Well it's not.

The solution is to transform [0-9]U into [0-9] as for our
purposes here it's the same thing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-05-28 13:21:43 +02:00
Laine Stump
4d100c7a41 conf: permit auto-assignment of controller indexes
Hand-entering indexes for 20 PCI controllers is not as tedious as
manually determining and entering their PCI addresses, but it's still
annoying, and the algorithm for determining the proper index is
incredibly simple (in all cases except one) - just pick the lowest
unused index.

The one exception is USB2 controllers because multiple controllers in
the same group have the same index. For these we look to see if 1) the
most recently added USB controller is also a USB2 controller, and 2)
the group *that* controller belongs to doesn't yet have a controller
of the exact model we're just now adding - if both are true, the new
controller gets the same index, but in all other cases we just assign
the lowest unused index.

With this patch in place and combined with the automatic PCI address
assignment, we can define a PCIe switch with several ports like this:

  <controller type='pci' model='pcie-root-port'/>
  <controller type='pci' model='pcie-switch-upstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  ...

These will each get a unique index, and PCI addresses that connect
them together appropriately with no pesky numbers required.
2016-05-25 15:00:25 -04:00
Ján Tomko
72f652da63 conf: add <acpi><table> to <os>
Add a new element to <domain> XML:
<os>
  <acpi>
    <table type="slic">/path/to/acpi/table/file</table>
  </acpi>
</os>

To supply a path to a SLIC (Software Licensing) ACPI
table blob.

https://bugzilla.redhat.com/show_bug.cgi?id=1327537
2016-05-25 17:15:21 +02:00
Laine Stump
8f578716c7 conf: allow type='pci' addresses with no address attributes specified
Prior to this, <address type='pci'/> wasn't allowed when parsing
(domain+bus+slot+function needed to be a "valid" PCI address, meaning
that at least one of domain/bus/slot had to be non-0), the RNG
required bus to be specified, and if type was set to PCI when
formatting, domain+bus+slot+function would always be output.

This makes all the address attributes optional during parse and RNG
validation, and suppresses domain+bus+slot+function if domain+bus+slot
are all 0 (NB: if d+b+s are all 0, any value for function is
nonsensical as that will never happen in the real world, and after
the next patch we will always assign a real working address to any
empty PCI address before it is ever output to anywhere).

Note that explicitly setting all attributes to 0 is equivalent to
setting none of them, which is okay, since 0000:00:00 is reserved in
any PCI bus setup, and can't be used anyway.
2016-05-20 13:54:25 -04:00
Ján Tomko
d25a3051fe docs: fix <spice><gl enable> since version
The support was added by commit 937ebba which was released in
1.3.3.
2016-05-20 09:14:02 +02:00
Cole Robinson
84120af628 docs: formatdomain: document virtio-mmio device addresses 2016-05-17 07:36:31 -04:00
Pavel Hrdina
b33c14b342 graphics: make address attribute for listen type='address' optional
We support omitting listen attribute of graphics element so we should
also support omitting address attribute of listen element.  This patch
also updates libvirt to always add a listen element into domain XML
except for VNC graphics if socket attribute is specified.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-05-17 10:41:45 +02:00
Michal Privoznik
6326865e6b virtestmock: Print invalid file accesses into a file
All the accesses to files outside our build or source directories
are now identified and appended into a file for later processing.
The location of the file that contains all the records can be
controlled via VIR_TEST_FILE_ACCESS env variable and defaults to
abs_builddir "/test_file_access.txt".

The script that will process the access file is to be added in
next commit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-05-14 09:46:23 +02:00
Christophe Fergeau
28675d633b schemas: Improve outdated comment 2016-05-12 14:53:24 +02:00
John Ferlan
e7bde8d319 storage: Fix algorithm generating path names for devmapper
https://bugzilla.redhat.com/show_bug.cgi?id=1265694

Commit id '020135dc' didn't quite get the algorithm correct when a
device mapper source ended with a non numeric value (e.g. ends with
an alphabet value).

This patch modifies the 'part_separator' logic to add the "p" separator
to the attempted target path name only when specified as part_separator='yes'.

For a source name that already ends with a number, the logic doesn't change
as the part separator would need to be there.

For a source name that ends with something other than a number, this allows
the possibility that a "p" separator can be added. The default for one of
these source devices is to not add the separator.

The key for device mapper and the need for a partition separator "p" is
the presence of a number in the last character of the device name link
in /dev/mapper.  A name such as "/dev/mapper/mpatha1" would generate
a "/dev/mapper/mpatha1p1" partition, while "/dev/mapper/mpatha" would
generate partition "/dev/mapper/mpatha1". Similarly for a device
mapper entry not using friendly names or an alias, a device such as
"/dev/mapper/3600a0b80005b10ca00005ad656fd8d93" would generate a
paritition "/dev/mapper/3600a0b80005b10ca00005ad656fd8d93p1", while
a device such as "/dev/mapper/3600a0b80005b10ca00005e115729093f" would
generate a partition "/dev/mapper/3600a0b80005b10ca00005e115729093f1".
The long number is the WWID of the device. It's also possible to assign
an alias for a device mapper entry, that alias follows the same rules
with respect to ending with a number or not when adding a "p" to create
the target device path.
2016-05-11 09:23:31 -04:00
John Ferlan
70ac246159 docs: Fix disk "volume" description
Missing a close single quote and a 'be' before used.
2016-05-10 15:53:02 -04:00
Laine Stump
f21017ab7e docs: fix version number in vlan tagging documentation
My brain suffered a time warp and I got the version number wrong.
2016-05-10 15:23:55 -04:00
Laine Stump
75db9997a0 util: set vlan tag for macvtap passthrough mode on SRIOV VFs
SRIOV VFs used in macvtap passthrough mode can take advantage of the
SRIOV card's transparent vlan tagging. All the code was there to set
the vlan tag, and it has been used for SRIOV VFs used for hostdev
interfaces for several years, but for some reason, the vlan tag for
macvtap passthrough devices was stubbed out with a -1.

This patch moves a bit of common validation down to a lower level
(virNetDevReplaceNetConfig()) so it is shared by hostdev and macvtap
modes, and updates the macvtap caller to actually send the vlan config
instead of -1.
2016-05-10 14:04:19 -04:00
Cole Robinson
5ed235c68f domaincaps: Report video modelType
Requires adding the plumbing for <device><video>
The value is <enum name='modelType'> to match the associated domain
XML of <video><model type='XXX'/>

Wire it up for qemu too
2016-05-09 16:05:31 -04:00
Cole Robinson
6da27ad1b5 domaincaps: Report graphics type enum
Requires adding the plumbing for <device><graphics>
Wire it up for qemu too
2016-05-09 16:05:31 -04:00
John Ferlan
e0d0e53086 conf: Add support for virtio-scsi iothreads
Add the ability to add an 'iothread' to the controller which will be how
virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu.

Describe the new functionality and add tests to parse/validate that the
new attribute can be added.
2016-05-04 09:59:14 -04:00
John Ferlan
d32a2f25bf docs: Reformat the Controllers description
Reformat to use <dt> elements to make it a bit easier to read.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-05-03 14:08:05 -04:00
John Ferlan
6ddd9df9fb docs: clarify disk iothread support
Rather than be specific about which devices in the <iothreads> description,
let's leave that for the <disk> description for it's <iothread> value.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2016-05-03 14:08:05 -04:00
Cole Robinson
600977e293 qemu: support configuring usb3 controller port count
This adds a ports= attribute to usb controller XML, like

  <controller type='usb' model='nec-xhci' ports='8'/>

This maps to:

  qemu -device nec-usb-xhci,p2=8,p3=8

Meaning, 8 ports that support both usb2 and usb3 devices. Gerd
suggested to just expose them as one knob.

https://bugzilla.redhat.com/show_bug.cgi?id=1271408
2016-05-03 08:58:30 -04:00
Boris Fiuczynski
d855465452 qemu: add panic device support for S390
If a panic device is being defined without a model in a domain
the default value is always overwritten with model ISA. An ISA
bus does not exist on S390 and therefore specifying a panic device
results in an unsupported configuration.
Since the S390 architecture inherently provides a crash detection
capability the panic device should be defined in the domain xml.

This patch adds an s390 panic device model and prevents setting a
device address on it.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2016-05-02 17:01:40 +02:00
Boris Fiuczynski
f91403e00b docs: align spelling of S390
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2016-05-02 17:01:40 +02:00
Martin Kletzander
9840761fb4 schemas: Update nodedev schema to match reality
There were few things done in the nodedev code but we were lacking tests
for it.  And because of that we missed that the schema was not updated
either.  Fix the schema and add various test files to show the schema
is correct.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-05-02 15:46:23 +02:00
Martin Kletzander
88c8be67d4 Move capability formatting together
All sub-PCI capabilities should be next to each other for clarity.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-05-02 15:46:23 +02:00
Daniel Veillard
52f1874602 Release of libvirt-1.3.4
* docs/news.html.in libvirt.spec.in: update for release
* po/*.po* : regenerated
2016-05-01 09:50:21 +08:00
Laine Stump
1d14b13f3b Revert "libvirt domain xml allow to set peer address"
This reverts commit 690969af9c, which
added the domain config parts to support a "peer" attribute in domain
interface <ip> elements.

It's being removed temporarily for the release of libvirt 1.3.4
because the feature doesn't work, and there are concerns that it may
need to be modified in an externally visible manner which could create
backward compatibility problems.
2016-04-29 12:46:16 -04:00
Cole Robinson
67f2b72723 conf: Drop restrictions on rng backend path
Currently we only allow /dev/random and /dev/hwrng as host input
for <rng><backend model='random'/> device. This was added after
various upstream discussions in commit 4932ef45

However this restriction has generated quite a few complaints over
the years, so a new discussion was initiated:

http://www.redhat.com/archives/libvir-list/2016-April/msg00987.html

Several people suggested removing the restriction, and nobody really
spoke up to defend it. So this patch drops the path restriction
entirely

https://bugzilla.redhat.com/show_bug.cgi?id=1074464
2016-04-26 11:43:33 -04:00
Cole Robinson
600a666ce5 schema: Allow space character in disk vendor/product
The hex range already tried to allow for it, but it wasn't using
the correct XML hex syntax. Fix it, and test it
2016-04-26 10:29:44 -04:00
Andrea Bolognani
cb44737165 apibuild: Fix method call 2016-04-26 09:20:12 +02:00
Andrea Bolognani
4a98ebb07c apibuild: Introduce app class
All top-level functions have been moved to this class.

On top of that, the app.warning() method has been defined,
so that calls to it - already present in rebuild() - can
actually succeed.
2016-04-26 09:20:12 +02:00
Andrea Bolognani
ccaceab7bd apibuild: Add index.warning() method
This method is used in eg. index.merge(), but is not defined
anywhere. The implementation has been copied from docBuilder.
2016-04-26 09:20:12 +02:00
Andrea Bolognani
22a592a4fe docs: Pass relative paths to apibuild.py
Since commit d195cffa2e, both $(srcdir) and $(abs_builddir)
are passed to the apibuild.py script; however, since the
former is a relative path and the latter an absolute one, the
script might not be able to detect whether they point to the
same location.

Pass both as relative paths to avoid the issue.
2016-04-26 09:20:11 +02:00