Commit Graph

716 Commits

Author SHA1 Message Date
Eric Blake
0d5f54bb21 maint: use gnulib configmake rather than open-coding things
* bootstrap.conf (gnulib_modules): Add configmake.
* daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by
gnulib.
* src/Makefile.am (INCLUDES): Likewise.
* tests/Makefile.am (INCLUDES): Likewise.
* tools/Makefile.am (virsh_CFLAGS): Likewise.
* daemon/libvirtd.c (qemudInitPaths, usage, main): Update
clients.
* src/cpu/cpu_map.c (CPUMAPFILE): Likewise.
* src/driver.c (DEFAULT_DRIVER_DIR): Likewise.
* src/internal.h (_): Likewise.
* src/libvirt.c (virInitialize): Likewise.
* src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR):
Likewise.
* src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig):
Likewise.
* src/network/bridge_driver.c (NETWORK_PID_DIR)
(NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise.
* src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup):
Likewise.
* src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise.
* src/qemu/qemu_driver.c (qemudStartup): Likewise.
* src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET)
(LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE)
(LIBVIRT_PKI_DIR): Likewise.
* src/secret/secret_driver.c (secretDriverStartup): Likewise.
* src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/storage/storage_backend_disk.c (PARTHELPER): Likewise.
* src/storage/storage_driver.c (storageDriverStartup): Likewise.
* src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise.
* src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise.
* tools/virsh.c (main): Likewise.
* docs/hooks.html.in: Likewise.
2010-11-17 08:58:58 -07:00
Stefan Berger
7b7cb1ecc9 deprecate fclose() and introduce VIR_{FORCE_}FCLOSE()
Similarly to deprecating close(), I am now deprecating fclose() and
introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with
VIR_FDOPEN().

Most of the files are opened in read-only mode, so usage of
VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write
mode already had the fclose()<  0 check and I converted those to
VIR_FCLOSE()<  0.

I did not find occurrences of possible double-closed files on the way.
2010-11-16 21:13:29 -05:00
Laine Stump
e7e595b4f0 interface.rng: Make miimon and arpmon optional for bond interfaces
This has been optional in netcf for awhile, but the change hadn't been
propogated to the libvirt copy of the RNG.
2010-11-15 14:22:42 -05:00
Laine Stump
9e3eaaf15d Fix ipv4-addr definition in interface.rng
Eric Blake pointed out a deficiency in this regex when it was
copy-pasted into network.rng. This is just propogating the fix back to
its origin.
2010-11-15 13:42:16 -05:00
Justin Clift
96390edc21 docs: updated virsh command reference with libvirt.org links 2010-11-14 00:00:46 +11:00
Matthias Bolte
34ed4e9809 Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00
Matthias Bolte
d39620e367 docs: Prepare hacking.html.in to generate HACKING from it
Tweak pre tags to achieve proper indentation of their
plaintext representation. Also use more b/i/code tags.
2010-11-12 19:47:20 +01:00
Justin Clift
4302b3f8f0 docs: updated csharp pages with latest info 2010-11-13 05:13:41 +11:00
Justin Clift
531c7c2961 docs: trivial typo fix 2010-11-13 04:36:45 +11:00
Justin Clift
7deca200e9 docs: added virsh command reference page.
Using temporary location links for the moment, until we get a
proper place to store the files on the libvirt.org server.
2010-11-13 03:51:51 +11:00
Laine Stump
7665440956 Do a better job of validating IP and MAC addresses in network.rng
IP addresses and MAC addresses had been defined in the RNG simply as
<text/> meaning that, according to the RNG, any string could go in
there. Of course the C parsing code does a much better job of
validating, but we may as well have this describing the contents
accurately (even though it's currently only used during "make check").
2010-11-12 02:12:49 -05:00
Laine Stump
5983f2d297 re-indent network.rng following structural change
This commit is whitespace changes only, do avoid obscuring actual code
changes.
2010-11-12 02:12:29 -05:00
Laine Stump
3d10d3489b Put network.rng contents inside <grammar> for uniformity with other RNGs
All the other RNG files in libvirt are enclosed within <grammar>. This
commit makes the syntactical changes necessary to make network.rng fit
that pattern. (This is the first step in adding some data type
definitions to network.rng for more exact validation of IP and MAC
addresses).

Formatting changes (indentation) will be done in a subsequent commit,
so that actual changes to the code won't be obscured by whitespace.
2010-11-12 02:12:19 -05:00
Daniel Veillard
dc844b9078 Augment bug reporting documentation
With some instruction on how to attach useful gdb backtraces
2010-11-10 13:16:37 +01:00
Matthias Bolte
4362552dc1 Fix syntax-check error in domain.rng
Replace tab with spaces.
2010-11-09 20:02:35 +01:00
Jiri Denemark
38eec464f8 schema: Move timer element inside clock
Both conf/domain_conf.c and domain XML documentation have <timer>
elements inside /domain/clock. Change domain.rng schema to be consistent
with them.
2010-11-09 15:35:43 +01:00
Daniel P. Berrange
ff2bb29ca9 Misc test case fixes for SPICE
* docs/schemas/domain.rng: Fix merge error which left SPICE channel
  elements under VNC schema.
* tests/qemuhelptest.c: Add SPICE flag to kvm-83 test
* tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Add
  <memballoon> element
2010-11-09 13:52:20 +00:00
Daniel P. Berrange
b0ef5c5367 Support SPICE channel security options
This extends the SPICE XML to allow channel security options

    <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
      <channel name='main' mode='secure'/>
      <channel name='record' mode='insecure'/>
    </graphics>

Any non-specified channel uses the default, which allows both
secure & insecure usage

* src/conf/domain_conf.c, src/conf/domain_conf.h,
  src/libvirt_private.syms: Add XML syntax for specifying per
  channel security options for spice.
* src/qemu/qemu_conf.c: Configure channel security with spice
2010-11-09 11:47:26 +00:00
Daniel P. Berrange
7a696678e5 Define XML syntax for password expiry
This extends the XML syntax for <graphics> to allow a password
expiry time to be set

eg

  <graphics type='vnc' port='5900' autoport='yes' keymap='en-us' passwd='12345' passwdValidTo='2010-04-09T15:51:00'/>

The timestamp is in UTC.

* src/conf/domain_conf.h: Pull passwd out into separate struct
  virDomainGraphicsAuthDef to allow sharing between VNC & SPICE
* src/conf/domain_conf.c: Add parsing/formatting of new passwdValidTo
  argument
* src/opennebula/one_conf.c, src/qemu/qemu_conf.c, src/qemu/qemu_driver.c,
  src/xen/xend_internal.c, src/xen/xm_internal.c: Update for changed
  struct containing VNC password
2010-11-09 11:47:13 +00:00
Daniel P. Berrange
c909091b74 Add a <graphics> type for SPICE protocol
This adds an element

 <graphics type='spice' port='5903' tlsPort='5904' autoport='yes' listen='127.0.0.1'/>

This is the bare minimum that should be exposed in the guest
config for SPICE. Other parameters are better handled as per
host level configuration tunables

* docs/schemas/domain.rng: Define the SPICE <graphics> schema
* src/domain_conf.h, src/domain_conf.c: Add parsing and formatting
  for SPICE graphics config
* src/qemu_conf.c: Complain about unsupported graphics types
2010-11-09 11:46:27 +00:00
Daniel P. Berrange
3cf5b6f720 Add a QXL graphics card type to domain XML schema
* src/qemu_conf.c: Add dummy entry in enumeration
* docs/schemas/domain.rng: Add 'qxl' as a type for the <video> tag
* src/domain_conf.c, src/domain_conf.h: Add QXL to video type
  enumerations
2010-11-09 11:46:19 +00:00
Matthias Bolte
e65812d479 xen-proxy: Remove it entirely and use libvirtd instead
Suggested by danpb, as it's not up-to-date anymore and
lacks many functions that were added to libvirtd.
2010-11-08 22:00:35 +01:00
Daniel Veillard
d528b52ff9 Add smbios element to schema and configuration to HVM os
the element has a mode attribute allowing only 3 values:
  - emulate: use the smbios emulation from the hypervisor
  - host: try to use the smbios values from the node
  - sysinfo: grab the values from the <sysinfo> fields

* docs/schemas/domain.rng: extend the schemas
* src/conf/domain_conf.h: add the flag to the domain config
* src/conf/domain_conf.h: parse and serialize the smbios if present
2010-11-08 15:14:50 +01:00
Daniel Veillard
5c3611ca39 Sysinfo extension to relax-ng schemas
Currently includes a subset of the SMBIOS strings set
2010-11-08 15:14:50 +01:00
Daniel P. Berrange
a59dde7869 Fix off-by-1 in todo page generator
The todo.pl script had an off-by-1 which meant any category
with only a single bug would not appear

* docs/todo.pl: Fix off-by-1
2010-11-05 13:24:04 +00:00
Daniel P. Berrange
d532296cfa Fix comment for <video> tag in domain RNG schema
The comment for the <video> tag was a cut+paste error duplicating
info about the <graphics> tag

* docs/schemas/domain.rng: Fix comment for <video> tag
2010-11-02 14:46:54 +00:00
Eric Blake
d02d548e2a docs: fix typo
* docs/drvqemu.html.in (qemu): Fix typo.
2010-11-01 15:24:44 -06:00
Daniel Veillard
4c2b3e1d29 Release of libvirt-0.8.5
* configure.ac libvirt.spec.in: new version
* docs/news.html.in: update news page and improve format
* po/*.po*: Update po again
2010-10-29 16:54:07 +02:00
Justin Clift
1dd49e921f docs: updated the C# bindings page with arnauds latest changes 2010-10-28 19:04:28 +11:00
Justin Clift
8f3ce7d8cf docs: update ruby bindings maintainer to chris lalancette 2010-10-28 09:36:48 +11:00
Eric Blake
f3443f41b0 build: use shorter file names for 'make dist'
* docs/api_extension/{0013,0014}*.patch: Rename to shorter files.
* docs/api_extension.html.in: Reflect rename.
2010-10-27 16:29:25 -06:00
Justin Clift
ae641fcfc5 docs: reworded and reordered the bindings page, plus minor tweaks
Reordered the bindings into alphabetical order, added a link to
the php-libvirt source on Github, plus gave the direct package
names needed for Python usage on RHEL/Fedora, and Ubuntu.
2010-10-28 09:26:11 +11:00
Justin Clift
1354b603ae docs: added a table of contents to the first 11 docs files
There are a 58 docs files, so adding an autogenerated Table Of
Contents to them all will take some time.  This is the first
piece of the work done.
2010-10-27 15:01:45 +11:00
Justin Clift
37302c13d1 docs: reformated the bindings page html markup to match other pages 2010-10-27 13:06:17 +11:00
Eric Blake
66a0409067 docs: revamp api_extension example, using vcpu patch series
* docs/api_extension/*: Replace example files.
* docs/api_extension.html.in: Rewrite to match new example files.
2010-10-26 13:43:57 -06:00
Justin Clift
ff9bbffcd9 docs: make the location of the xml catalog file a configure option
The default location for the XML catalog file, /etc/xml/catalog,
used when validating the generated html docs, isn't correct for
MacOS X.

This commit adds an option to the configure script, allowing the
default to be overridden:

  --with-xml-catalog-file=/path/to/xml/catalog/file
2010-10-27 02:22:14 +11:00
Justin Clift
d88a0496fd docs: install the generated html files when make install is run
Previously, only the API docs were installed, rather than the
complete documentation set.  This commit ensures the complete
documentation set is installed.
2010-10-27 01:37:18 +11:00
Matthias Bolte
30b2945595 esx: Add documentation about certificates and connection problems 2010-10-22 22:08:22 +02:00
Justin Clift
450c20ea3d docs: added a table of contents to the new c sharp bindings page 2010-10-23 02:57:26 +11:00
Justin Clift
5e0211e0d3 docs: removed old changelog file, as it is no longer relevant
We instead point to the live git log URL for the few links still
needing to point to something.
2010-10-23 02:56:51 +11:00
Justin Clift
956e3c5890 docs: added initial page for c# binding, with links to it
Adds a new page for the C# language bindings being developed by Arnaud
Champion.
2010-10-20 07:20:10 +11:00
Eric Blake
a74f4e4464 vcpu: add current attribute to <vcpu> element
Syntax agreed on in
https://www.redhat.com/archives/libvir-list/2010-September/msg00476.html

<domain ...>
  <vcpu current='x'>y</vcpu>
...

can now be used to specify 1 <= x <= y current vcpus, in relation
to the boot-time max of y vcpus.  If current is omitted, then
current and max are assumed to be the same value.

* docs/schemas/domain.rng: Add new attribute.
* docs/formatdomain.html.in: Document it.
* tests/qemuxml2argvdata/qemuxml2argv-smp.xml: Add to
domainschematest.
* tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml: Likewise.
2010-10-19 09:58:18 -06:00
Stefan Berger
f04de501bc Introduce VIR_CLOSE to be used rather than close()
Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here.

There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf where the problems were.

I also dare to declare close() as being deprecated in libvirt code base (HACKING).
2010-10-19 10:23:51 -04:00
Nikunj A. Dadhania
61dfbf8c3a Update docs for memory parameters and memtune command
* docs/formatdomain.html.in: Add memtune element details, added min_guarantee
* src/libvirt.c: Update virDomainGetMemoryParameters api description, make
  it more clear that the user first needs to call the api to get the number
  of parameters supported and then call again to get the values.
* tools/virsh.pod: Add usage of new command memtune in virsh manpage
2010-10-19 14:27:12 +02:00
Eric Blake
fab6d95c43 docs: document how to disable memballoon
https://bugzilla.redhat.com/show_bug.cgi?id=623903 documents a qemu
bug that causes libvirt to hang if virt-manager happens to be
querying balloon info when a guest is paused.  Until the qemu bug
is fixed, people need to know how to avoid the issue.

* docs/formatdomain.html.in (Memory balloon device): Mention
model='none'.
2010-10-15 14:14:29 -06:00
Harsh Prateek Bora
75a6a9a8e0 new attribute accessmode to filesystem element
This introduces new attribute to filesystem element
to support customizable access mode for mount type.
Valid accessmode are: passthrough, mapped and squash.

Usage:
        <filesystem type='mount' accessmode='passthrough'>
          <source dir='/export/to/guest'/>
          <target dir='mount_tag'/>
        </filesystem>

passthrough is the default model if not specified, that's
also the current behaviour.
2010-10-14 15:08:24 +02:00
Daniel Veillard
0df671513d Fixes for documentation extraction
* include/libvirt/libvirt.h.in: some of the function type description
  were broken so they could not be automatically documented
* src/util/event.c docs/apibuild.py: event.c exports one public API
  so it needs to be scanned too, avoid a few warnings
2010-10-13 13:50:07 +02:00
Daniel P. Berrange
458c99b121 Add todo.pl and config example to EXTRA_DIST
* docs/Makefile.am: Add todo.pl and todo.cfg-example to EXTRA_DIST
2010-10-13 10:58:11 +01:00
Daniel Veillard
af996f5544 Cleanup some tabs issues 2010-10-12 19:26:09 +02:00
Nikunj A. Dadhania
6a377990cf Adds xml entries for memory tunables in domain schema
The patch adds xml entries to the domain.rng file.

v2:
+ Fix typo min_guarantee
2010-10-12 19:26:09 +02:00