Commit Graph

1307 Commits

Author SHA1 Message Date
Paolo Bonzini
0aa9f522c4 qemu: support named nbd exports
These are supported by nbd-server and by the NBD server that QEMU
embeds for live image access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
2013-03-15 15:12:41 -06:00
Peter Krempa
32bd699f55 virtio-rng: Add rate limiting options for virtio-RNG
Qemu's implementation of virtio RNG supports rate limiting of the
entropy used. This patch exposes the option to tune this functionality.

This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4

The rate limiting is exported in the XML as:
<devices>
  ...
  <rng model='virtio'>
    <rate bytes='123' period='1234'/>
    <backend model='random'/>
  </rng>
  ...
2013-03-14 13:28:10 +01:00
Viktor Mihajlovski
41ce2c9e94 S390: Documentation for CCW address type
The native bus for s390 I/O is called CCW (channel command word).
As QEMU has added basic support for the CCW bus, i.e. the
ability to assign CCW devnos (bus addresses) to devices.
Domains with the new machine type s390-ccw-virtio can use the
CCW bus. Currently QEMU will only allow to define virtio
devices on the CCW bus.
Here we add the new machine type and the new device address to the
schema definition and add a new paragraph to the domain XML
documentation.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2013-03-13 16:49:57 -06:00
Jiri Denemark
11677e081b docs: Clarify semantics of sparse storage volumes
Sparse LVM volumes do not behave in the way one would naively expect.
The allocation does not automatically increase (which is different from
how sparse files work).
2013-03-12 09:03:14 +01:00
Dusty Mabe
d3092c60f7 capabilities: add NUMA memory information
'virsh capabilities' will now include a new <memory> element
per <cell> of the topology, as in:

    <topology>
      <cells num='2'>
        <cell id='0'>
          <memory unit='KiB'>12572412</memory>
          <cpus num='12'>
          ...
        </cell>

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-03-08 11:51:00 -07:00
Eric Blake
374631d016 rng: allow default device in RNG grammar
This matches the documentation of commit 4932ef4, and the
C code changes of commit 75e656a.

* docs/schemas/domaincommon.rng: Allow default entry.
2013-03-07 07:06:53 -07:00
Daniel Veillard
be1c364d89 Release of libvirt 1.0.3
- configure.ac docs/news.html.in libvirt.spec.in: update for the release
- po/*.po*: merged in transifex updates for fr,hi,pl,ja,uk,it and
  regenerated
2013-03-05 12:00:53 +08:00
Eric Blake
4932ef4502 rng: restrict passthrough names to known-good files
There is some controversy[1] on the qemu list on whether qemu should
have ever allowed arbitrary file name passthrough, or whether it
should be restricted to JUST /dev/random and /dev/hwrng.  It is
always easier to add support for additional filenames than it is
to remove support for something once released, so this patch
restricts libvirt 1.0.3 (where the virtio-random backend was first
supported) to just the two uncontroversial names, letting us defer
to a later date any decision on whether supporting arbitrary files
makes sense. Additionally, since qemu 1.4 does NOT support
/dev/fdset/nnn fd passthrough for the backend, limiting to just
two known names means that we don't get tempted to try fd
passthrough where it won't work.

[1]https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#00023

* src/conf/domain_conf.c (virDomainRNGDefParseXML): Only allow
/dev/random and /dev/hwrng.
* docs/schemas/domaincommon.rng: Flag invalid files.
* docs/formatdomain.html.in (elementsRng): Document this.
* tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args:
Update test to match.
* tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml:
Likewise.
2013-03-04 17:45:38 -07:00
John Ferlan
2631fe0420 internals: Update to include RPC and Lock links and add new data
Added a picture and explanation describing the virConnectOpen processing
at a "higher" level, but with some source code references.
2013-03-04 17:36:03 -05:00
John Ferlan
6fd1b9d621 Add references for phyp and parallels 2013-03-04 17:36:03 -05:00
John Ferlan
0b5c717b61 api: Add text and references for daemon 2013-03-04 17:36:03 -05:00
John Ferlan
b1083281d9 api: Add text and references for drivers section 2013-03-04 17:36:03 -05:00
John Ferlan
492233e773 api: Complete list of function and naming conventions 2013-03-04 17:36:03 -05:00
John Ferlan
cc24589e75 api: Reword and clean lists for object description 2013-03-04 17:36:03 -05:00
John Ferlan
b8a0b631dc api: Reword objects exposed section 2013-03-04 17:36:03 -05:00
Guido Günther
c7e85db61b hook: log the exit status of the hook not 256
Adjust the docs accordingly. See http://bugs.debian.org/701570.
2013-03-01 20:28:00 +01:00
Eric Blake
5b17c7a954 maint: fix typo in network docs
* docs/formatnetwork.html.in: Spell variation correctly.
2013-02-27 21:18:33 -07:00
Laine Stump
db2536a627 Revert "Add support for <option> tag in network config"
This reverts commit 383ebc4694.

We decided the xml for this feature needed more thought to make sure
we are doing it the best way, in particular wrt option values that
have multiple items.
2013-02-27 10:55:24 -05:00
Peter Krempa
4db199fc4c docs: Fix attribute name for virtio-rng backend 2013-02-27 11:04:40 +01:00
Philipp Hahn
c47884a122 doc: document new storage volume/pool types
Add qed for dirfs pool.
Add ocfs2 for disk pool.
Add lvm2 for disk and logical pool.
Add cifs and glusterfs for netfs pool.

Note: POOL_DISK_LVM2 can not be created by "parted mklabel", but is only
returned from auto-detection on disk pools.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2013-02-26 20:19:19 -07:00
Eric Blake
035b0db8ba Revert "S390: Documentation for CCW address type"
This reverts commit 24aa7f8d11.

The implementation to match the documentation is not complete yet,
and the final design might change the name of the 'schid' attribute.
2013-02-26 16:31:27 -07:00
Philipp Hahn
141deb9feb schema: Restrict mode to octal
virStrToLong(..., 8, ...) already requires the mode to be octal.
Change the relax-ng schema to check for octal as well.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2013-02-26 16:23:21 -07:00
Peter Krempa
fa16c80f52 doc: schema: Add basic documentation for the virtual RNG device support
This patch documents XML elements used for (basic) support of virtual
RNG devices.

In the devices section in the domain XML users may specify:

For the default 'random' backend:
  <devices>
    <rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
    </rng>
  </devices>

For the slightly more advanced EGD backend:
  <devices>
    <rng model='virtio'>
      <backend model='egd' type='udp'>
        <!-- this is a definition of a character device -->
        <source mode='bind' service='1234'/>
        <source mode='connect' host='1.2.3.4' service='1234'/>
        <!-- or other valid character device configuration -->
      </backend>
    </rng>
  </devices>

For the planned random daemon/pool:
  <devices>
    <rng model='virtio'>
      <backend model='pool' pool='poolname'>class</backend>
    </rng>
  </devices>

to enable the RNG device for guests.
2013-02-25 10:17:35 +01:00
Gene Czarcinski
0b73a763f3 use client id for IPv6 DHCP host definition
Originally, only a host name was used to associate a
DHCPv6 request with a specific IPv6 address.  Further testing
demonstrates that this is an unreliable method and, instead,
a client-id or DUID needs to be used.  According to DHCPv6
standards, this id can be a duid-LLT, duid-LL, or duid-UUID
even though dnsmasq will accept almost any text string.

Although validity checking of a specified string makes sure it is
hexadecimal notation with bytes separated by colons, there is no
rigorous check to make sure it meets the standard.

Documentation and schemas have been updated.

Signed-off-by: Gene Czarcinski <gene@czarc.net>
Signed-off-by: Laine Stump <laine@laine.org>
2013-02-25 02:49:06 -05:00
Gene Czarcinski
8e3c1f2ebb Trivial fix: in dhcp-host the name is optional
Although in IPv4 one must pick either mac or name, either
can be omitted.  Similarly, for IPv6, the name
can be optionally omitted.

Signed-off-by: Gene Czarcinski <gene@czarc.net>
Signed-off-by: Laine Stump <laine@laine.org>
2013-02-25 02:49:06 -05:00
Pieter Hollants
383ebc4694 Add support for <option> tag in network config
This patch adds support for a new <option>-Tag in the <dhcp> block of
network configs, based on a subset of the fifth proposal by Laine
Stump in the mailing list discussion at
https://www.redhat.com/archives/libvir-list/2012-November/msg01054.html.
Any such defined option will result in a dhcp-option=<number>,"<value>"
statement in the generated dnsmasq configuration file.

Currently, DHCP options can be specified by number only and there is
no whitelisting or blacklisting of option numbers, which should
probably be added.

Signed-off-by: Pieter Hollants <pieter@hollants.com>
Signed-off-by: Laine Stump <laine@laine.org>
2013-02-22 19:45:19 -05:00
Daniel P. Berrange
ba90ff5672 Update arch names in RNG schema to match virarch.c
When the virarch.c file was introduced to formalize the arch
list, we forgot to update the RNG schema with the new arches.
2013-02-22 10:55:37 +00:00
Christophe Fergeau
9a3053e685 docs: Add missing 'vram' in QXL video device doc 2013-02-21 16:34:12 +01:00
Jiri Denemark
d3d5920181 docs: Fix HTML errors
<pre> is forbidden inside <p>
2013-02-21 10:38:28 +01:00
Natanael Copa
1716e7a6c5 net: add support for specifying port range for forward mode nat
Let users set the port range to be used for forward mode NAT:

...
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
...

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Laine Stump <laine@laine.org>
2013-02-19 14:42:18 -05:00
Natanael Copa
905629f47e net: support set public ip range for forward mode nat
Support setting which public ip to use for NAT via attribute
address in subelement <nat> in <forward>:

...
  <forward mode='nat'>
      <address start='1.2.3.4' end='1.2.3.10'/>
  </forward>
...

This will construct an iptables line using:

  '-j SNAT --to-source <start>-<end>'

instead of:

  '-j MASQUERADE'

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Laine Stump <laine@laine.org>
2013-02-19 14:42:18 -05:00
Viktor Mihajlovski
24aa7f8d11 S390: Documentation for CCW address type
The native bus for s390 I/O is called CCW (channel command word).
As QEMU has added basic support for the CCW bus, i.e. the
ability to assign CCW devnos (bus addresses) to devices.
Domains with the new machine type s390-ccw-virtio can use the
CCW bus. Currently QEMU will only allow to define virtio
devices on the CCW bus.
Here we add the new machine type and the new device address to the
schema definition and add a new paragraph to the domain XML
documentation.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
2013-02-11 16:27:45 -07:00
Eric Blake
19b21ac493 docs: fix 1.0.2 release date
* docs/news.html.in: Use correct release year.
2013-02-11 15:20:53 -07:00
John Ferlan
a141a43e33 hacking: Add some details to handle Valgrind output
hacking: Add some text around the running of Valgrind along with example
output for "real" vs. "false positives".

cfg.mk: Add hacking.in.html to sc_prohibit_raw_allocation
2013-02-07 14:08:14 -05:00
Guido Günther
3591f79b7e Remove more trailing semicolons in Python files 2013-02-07 19:52:44 +01:00
Eric Blake
b2aa03b3f7 docs: don't ignore virEvent API
Commit 6094ad7b (0.9.3 release) promoted several functions from
internal to public, but forgot to fix the documentation generator
to provide details about those functions.

For an example of what this fixes, look at:
file:///path/to/libvirt/docs/html/libvirt-libvirt.html#virEventAddHandle
before and after the patch.

* docs/apibuild.py (ignored_functions): Don't ignore functions
that were turned into official API.
* src/util/virevent.c: Fix comments to pass through parser.
2013-02-01 16:01:45 -07:00
Claudio Bley
52b1fd2582 docs: use div, not table, for notices on opaque types
It's simpler to render and it prevents wrapping the line too early
because of the table spacing, border et cetera.
2013-02-01 08:47:38 +01:00
Claudio Bley
7d3cef8a5c docs: abort when missing return or argument documentation
When a function has no associated information to one of its
arguments or its return type we report it and stop with an error.
2013-02-01 08:47:04 +01:00
Claudio Bley
9170ba151d apibuild.py: fix TypeError raised in except clause
When an exception happened inside the try clause in serialize_function,
a new exception was raised in the except clause subsequently:

Traceback (most recent call last):
  File "./apibuild.py", line 2529, in <module>
    rebuild("libvirt")
  File "./apibuild.py", line 2513, in rebuild
    builder.serialize()
  File "./apibuild.py", line 2467, in serialize
    self.serialize_function(output, function)
  File "./apibuild.py", line 2208, in serialize_function
    self.warning("Failed to save function %s info: " % name, `id.info`)
TypeError: warning() takes exactly 2 arguments (3 given)

Use the correct number of arguments for self.warning and print the
original exception to stderr.
2013-01-31 08:20:33 +01:00
Martin Kletzander
533cfb4675 Sync HACKING and hacking.html.in
After one last-minute change, only HACKING was updated and not
hacking.html.in, so this patch synchronizes that.
2013-01-30 11:01:31 +01:00
Daniel Veillard
4a824cdbc4 Release of libvirt-1.0.2
* configure.ac docs/news.html.in libvirt.spec.in: update for the release
* po/*.po*: updated localizations
2013-01-30 10:42:05 +01:00
Martin Kletzander
901f4b6b86 docs: aesthetical cleanups
Adding dots inside "exempli gratia" where missing.  While on that, I
took the liberty of changing it where found with simple grep.
2013-01-30 09:37:03 +01:00
Claudio Bley
790d364ca2 docs: fix missed documentation for virterror functions
Commit f24404a324 renamed virterror.c to
virerror.c but forgot to change the reference in this file.
2013-01-30 07:53:14 +01:00
Osier Yang
38dd53e5ca rng: Change the datatype for volume name for common use
The "volName" will be used by later patch.
2013-01-28 11:52:54 +08:00
Osier Yang
c9d9cc5eae eng: Remove the duplicate definition
The RE for data type "name" storagepool.rng uses is same with
"genericName" in basictypes.rng.
2013-01-28 11:52:51 +08:00
Josh Durgin
c1509ab47e qemu: escape ipv6 for rbd network disk hosts
Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
so they are often referenced by IP rather than hostname for
convenience, or to avoid relying on DNS. Using IPv4 addresses as the
host name works already, but IPv6 addresses require rbd-specific
escaping because the colon is used as an option separator in the
string passed to qemu.

Escape these colons, and enclose the IPv6 address in square brackets
so it is distinguished from the port, which is currently mandatory.

Acked-by: Osier Yang <jyang@redhat.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-25 11:48:24 +08:00
Peter Krempa
828820e2d3 schemas: Add schemas for more CPU topology information in the caps XML
This patch adds RNG schemas for adding more information in the topology
output of the NUMA section in the capabilities XML.

The added elements are designed to provide more information about the
placement and topology of the processors in the system to management
applications.

A demonstration of supported XML added by this patch:
<capabilities>
  <host>
    <topology>
      <cells num='3'>
        <cell id='0'>
          <cpus num='4'> <!-- this is node with Hyperthreading -->
            <cpu id='0' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='1' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='2' socket_id='0' core_id='1' siblings='2-3'/>
            <cpu id='3' socket_id='0' core_id='1' siblings='2-3'/>
          </cpus>
        </cell>
        <cell id='1'>
          <cpus num='4'> <!-- this is node with modules (Bulldozer) -->
            <cpu id='4' socket_id='0' core_id='2' siblings='4-5'/>
            <cpu id='5' socket_id='0' core_id='3' siblings='4-5'/>
            <cpu id='6' socket_id='0' core_id='4' siblings='6-7'/>
            <cpu id='7' socket_id='0' core_id='5' siblings='6-7'/>
          </cpus>
         </cell>
        <cell id='2'>
          <cpus num='4'> <!-- this is a normal multi-core node -->
            <cpu id='8' socket_id='1' core_id='0' siblings='8'/>
            <cpu id='9' socket_id='1' core_id='1' siblings='9'/>
            <cpu id='10' socket_id='1' core_id='2' siblings='10'/>
            <cpu id='11' socket_id='1' core_id='3' siblings='11'/>
          </cpus>
         </cell>
      </cells>
    </topology>
  </host>
</capabilities>

The socket_id field represents identification of the physical socket the
CPU is plugged in. This ID may not be identical to the physical socket
ID reported by the kernel.

The core_id identifies a core within a socket. Also this field may not
accurately represent physical ID's.

The core_id is guaranteed to be unique within a cell and a socket. There
may be duplicates between sockets. Only cores sharing core_id within one
cell and one socket can be considered as threads. Cores sharing core_id
within sparate cells are distinct cores.

The siblings field is a list of CPU id's the cpu id's the CPU is sibling
with - thus a thread. The list is in the cpuset format.
2013-01-24 10:53:00 +01:00
Peter Krempa
14940b5eaa schema: Make the cpuset type reusable across schema files 2013-01-24 10:53:00 +01:00
Osier Yang
3f46ce78fc rng: Have colorful *.rng with editor
Just add the head line to let the editor know it's XML document.
2013-01-23 23:03:17 +08:00
Alon Levy
55bfd020d8 qemu: Support ram bar size for qxl devices
Adds a "ram" attribute globally to the video.model element, that changes
the resulting qemu command line only if video.type == "qxl".

<video>
  <model type='qxl' ram='65536' vram='65536' heads='1'/>
</video>

That attribute gets a default value of 64*1024. The schema is unchanged
for other video element types.

The resulting qemu command line change is the addition of

-global qxl-vga.ram_size=<ram>*1024

or

-global qxl.ram_size=<ram>*1024

For the main and secondary qxl devices respectively.

The default for the qxl ram bar is 64*1024 kilobytes (the same as the
default qxl vram bar size).
2013-01-22 10:40:45 -07:00