Commit Graph

888 Commits

Author SHA1 Message Date
Jim Fehlig
eb3143154e Do not drop kernel cmdline for xen pv domains
Kernel cmdline args can be passed to xen pv domains even when a
bootloader is specified.  The current config-to-sxpr mapping
ignores cmdline when bootloader is present.

Since the xend sub-driver is used with many xen toolstack versions,
this patch takes conservative approach of adding an else block to
existing !def->os.bootloader, and only appends sxpr if def->os.cmdline
is non-NULL.

V2: Fix existing testcase broken by this patch and add new testcases
2011-07-11 09:11:15 -06:00
Wen Congyang
ecde731c72 fix typo error 2011-07-11 20:53:21 +08:00
Michal Privoznik
874e65aa15 bios: Add support for SGA
This patch creates new <bios> element which, at this time has only the
attribute useserial='yes|no'. This attribute allow users to use
Serial Graphics Adapter and see BIOS messages from the very first moment
domain boots up. Therefore, users can choose boot medium, set PXE, etc.
2011-07-11 11:47:14 +02:00
Michal Privoznik
30c43afd73 graphics: add support for action_if_connected in qemu
This option accepts 3 values:
-keep, to keep current client connected (Spice+VNC)
-disconnect, to disconnect client (Spice)
-fail, to fail setting password if there is a client connected (Spice)
2011-07-08 17:00:43 +02:00
John Williams
a1092070d4 microblaze: Add architecture support
Add libvirt support for MicroBlaze architecture as a QEMU target.  Based on mips/mipsel pattern.

Signed-off-by: John Williams <john.williams@petalogix.com>
2011-07-07 17:49:21 -06:00
Eric Blake
864e9457ca docs: minor whitespace cleanups
No change in wording.  One spacing change in a <pre>, noticed because
of odd XML formatting online; the rest is in free-flowing text to
make it easier to see nesting levels in the document.

* docs/formatdomain.html.in: Adjust spacing.  Break long lines.
2011-07-06 14:48:51 -06:00
Laine Stump
0c97dc4159 xml: create an RNG file for common types and move some definitions there
domain.rng, network.rng, and interface.rng already use a few of the
same types (or in some cases *should* but don't), and an upcoming code
change will have them sharing even more. To prepare for that, this
patch takes those common data type definitions and moves them into
basictypes.rng.

This may break some rule about the need to RNG files to be autonomous
or something, but I saw that storageencryption.rng is used in this
way, so I figured it must not be completely against the law...
2011-07-05 12:33:21 -04:00
Laine Stump
b2bf813e58 docs: sort the file list in the schemas Makefile 2011-07-05 12:33:21 -04:00
Daniel P. Berrange
6bcd732ead Add documentation for the seclabel XML element
The domain XML documentation is missing information about the
<seclabel> element used by security drivers

* formatdomain.html.in: Document <seclabel>
2011-07-04 11:19:20 +01:00
Daniel P. Berrange
6321fd9798 Allow for resource relabelling with static labels
Add a new attribute to the <seclabel> XML to allow resource
relabelling to be enabled with static label usage.

  <seclabel model='selinux' type='static' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c392,c662</label>
  </seclabel>

* docs/schemas/domain.rng: Add relabel attribute
* src/conf/domain_conf.c, src/conf/domain_conf.h: Parse
  the 'relabel' attribute
* src/qemu/qemu_process.c: Unconditionally clear out the
  'imagelabel' attribute
* src/security/security_apparmor.c: Skip based on 'relabel'
  attribute instead of label type
* src/security/security_selinux.c: Skip based on 'relabel'
  attribute instead of label type and fill in <imagelabel>
  attribute if relabel is enabled.
2011-07-04 11:18:57 +01:00
Daniel P. Berrange
4ebfc42716 Allow a base label to be specified in dynamic labelling mode
Normally the dynamic labelling mode will always use a base
label of 'svirt_t' for VMs. Introduce a <baselabel> field
in the <seclabel> XML to allow this base label to be changed

eg

   <seclabel type='dynamic' model='selinux'>
     <baselabel>system_u:object_r:virt_t:s0</baselabel>
   </seclabel>

* docs/schemas/domain.rng: Add <baselabel>
* src/conf/domain_conf.c, src/conf/domain_conf.h: Parsing
  of base label
* src/qemu/qemu_process.c: Don't reset 'model' attribute if
  a base label is specified
* src/security/security_apparmor.c: Refuse to support base label
* src/security/security_selinux.c: Use 'baselabel' when generating
  label, if available
2011-07-04 11:17:19 +01:00
Daniel Veillard
7976d96dd7 Release of libvirt-0.9.3
* configure.ac docs/news.html.in libvirt.spec.in: update for the
  new release
* po/*.po*: updated and regenerated localizations
2011-07-04 15:54:36 +08:00
Daniel Veillard
8c58abeae1 Explicitely invoke python for API doc generator
This fixes the problem of not finding python in /usr/bin
which broke build on FreeBSD
2011-07-01 17:46:52 +02:00
Daniel P. Berrange
576682a5ef Add documentation for configuration lock managers
Add a page which documents how to configure lock managers,
focusing on use of sanlock with the QEMU/KVM driver

* docs/locking.html.in: Docs about lock managers
* docs/sitemap.html.in: Add lock manager config to
  the deployment section
2011-06-28 18:19:00 +01:00
Laine Stump
303133ee49 docs: fix indentation of sub-elements of <ip> in network XML
The sub-elements of <ip> had been placed at the same level of
indentation as ip itself, implying that they were really elements of
<network>. Within that, sub-elements of ip/dhcp were also at that same
level. These have been double-indented.

At the same time, I realized that the documentation for the new <dns>
element had been placed right in the middle of the description of the
sub-elements of <ip>. I moved it up out of the way.
2011-06-24 18:28:51 -04:00
Michal Novotny
9d4e2845d4 Network: Add support for DNS hosts definition to the network XML
This commit introduces names definition for the DNS hosts file using
the following syntax:

  <dns>
    <host ip="192.168.1.1">
      <name>alias1</name>
      <name>alias2</name>
    </host>
  </dns>

Some of the improvements and fixes were done by Laine Stump so
I'm putting him into the SOB clause again ;-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Laine Stump <laine@laine.org>
2011-06-24 16:15:36 -04:00
Michal Novotny
5dd986dbd7 Add TXT record support for virtual DNS service
This commit introduces the <dns> element and <txt> record for the
virtual DNS network. The DNS TXT record can be defined using following
syntax in the network XML file:

  <dns>
    <txt name="example" value="example value" />
  </dns>

Also, the Relax-NG scheme has been altered to allow the texts without
spaces only for the name element and some nitpicks about memory
free'ing have been fixed by Laine so therefore I'm adding Laine to the
SOB clause ;-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Laine Stump <laine@laine.org>
2011-06-24 16:15:12 -04:00
David S. Wang
93d6fd1d09 documenting the 802.1Qbh parameters of a 'direct' interface
This patch adds documentation about the 802.1Qbh related parameters
of the virtualport element for 'direct' interfaces.

Signed-off-by: David S. Wang <dwang2@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
2011-06-23 11:05:24 -06:00
Daniel Veillard
d42ea21aec Fix to python API extractor and API doc generation
This fixes a number of issues most of them raised by Eric Blake on the
generated documentation output:
   - parsing of "long long int" and similar
   - add parsing of unions within a struct
   - remove spurious " * " fron comments on structure fields and enums
   - fix concatenation of base type and name in arrays
   - extend XSLT to cope with union in structs

* docs/apibuild.py: fix and extend API extraction tool
* docs/newapi.xsl: extend the stylesheets to cope with union in
  public structures
2011-06-22 15:50:08 +08:00
Michal Privoznik
017abcbb1a qemu: domain I/O asynchronous handling
For virtio disks and interfaces, qemu allows users to enable or disable
ioeventfd feature. This means, qemu can execute domain code, while
another thread waits for I/O event. Basically, in some cases it is win,
in some loss. This feature is available via 'ioeventfd' attribute in disk
and interface <driver> element. It accepts 'on' and 'off'. Leaving this
attribute out defaults to hypervisor decision.
2011-06-22 09:26:24 +02:00
Osier Yang
e6ea48c325 numatune: Add doc for new numatune XML 2011-06-20 15:15:05 +08:00
Osier Yang
e68b9ab0b8 numatune: Define XML schema
Example XML:

<numatune>
  <memory mode="strict" nodeset="0-10,^4"/>
</numatune>

Please enter the commit message for your changes. Lines starting
2011-06-20 15:13:25 +08:00
Marc-André Lureau
98bfdff12c spice: add <clipboard copypaste='yes|no'> option
From a security pov copy and paste between the guest and the client is not
always desirable. So we need to be able to enable/disable this. The best place
to do this from an administration pov is on the hypervisor, so the qemu cmdline
is getting a spice disable-copy-paste option, see bug 693645. Example qemu
invocation:
qemu -spice port=5932,disable-ticketing,disable-copy-paste

https://bugzilla.redhat.com/show_bug.cgi?id=693661
2011-06-14 17:03:26 -06:00
Ohad Levy
a2d401d3ba docs: updated list of applications using libvirt.
Added:
* Virt ruby bindings
* Foreman for provisioning and webui.
2011-06-14 11:03:56 -06:00
Osier Yang
99c8a5c8af docs: Add doc for video element
For backwards compatibility, if no <video> is set but there is a
<graphics> tag, then we add a default <video> according to the
guest type. Add docs to tell the user about this to not make
them confused. Especially if they remove the video (such as via
"virsh edit"), it will be surprised for them to see the video
element is still in domain XML.
2011-06-07 16:56:06 +08:00
Matthias Bolte
4bf1f33b7e docs: Make hvsupport.pl pick up the host device drivers
Annotate the ESX device driver dummy.

Refactor the udev and hal device driver strcuts to match the
common annotation pattern.
2011-06-06 10:45:59 +02:00
Daniel Veillard
2c5ded6e82 Release of libvirt-0.9.2
* configure.ac docs/news.html.in libvirt.spec.in: update for release
* po/*.po*: updated translations and regenerated
2011-06-06 11:46:37 +08:00
Neil Wilson
5b8d2e6d92 Correct 'cputune' documentation example.
Signed-off-by: Neil Wilson <neil@aldur.co.uk>
2011-06-03 08:40:51 -06:00
Eric Blake
a2f9bd5b80 build: fix VPATH build break from previous patch
Partial revert of commit c3c30d4de9.

* docs/Makefile.am (internals/%.html.tmp): Restore MKDIR_P; it is
needed for intermediate file after all.
Reported by Daniel P. Berrange.
2011-06-02 08:18:26 -06:00
Daniel P. Berrange
395793a8ec Add initial docs about the lock managers 2011-06-02 10:54:01 +01:00
Daniel P. Berrange
1ea83207c8 Support leases in guest XML and lock manager
A lock manager may operate in various modes. The direct mode of
operation is to obtain locks based on the resources associated
with devices in the XML. The indirect mode is where the app
creating the domain provides explicit leases for each resource
that needs to be locked. This XML extension allows for listing
resources in the XML

  <devices>
     ...
     <lease>
       <lockspace>somearea</lockspace>
       <key>thequickbrownfoxjumpsoverthelazydog</key>
       <target path='/some/lease/path' offset='23432'/>
     </lease>
     ...
  </devices>

The 'lockspace' is a unique identifier for the lockspace which
the lease is associated

The 'key' is a unique identifier for the resource associated
with the lease.

The 'target' is the file on disk where the leases are held.

* docs/schemas/domain.rng: Add lease schema
* src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and
  formatting for leases
* tests/qemuxml2argvdata/qemuxml2argv-lease.args,
  tests/qemuxml2argvdata/qemuxml2argv-lease.xml,
  tests/qemuxml2xmltest.c: Test XML handling for leases
2011-06-02 10:54:00 +01:00
Eric Blake
c3c30d4de9 build: avoid corrupting / in RHEL 5
I noticed this while building from libvirt.git on RHEL 5.6:

Generating internals/command.html.tmp
mkdir: cannot create directory `/internals': Permission denied

If I had been building as root instead, this pollutes /.

Older autoconf lacks $(builddir), but it is rigorously equal to '.'
in newer autoconf, so we could use '$(MKDIR_P) internals' instead.

However, since internals/command.html is part of the tarball, we
_already_ build it in $(srcdir), not $(builddir) during VPATH
builds, so the mkdir is wasted effort!

* docs/Makefile.am (internals/%.html.tmp): Drop unused mkdir.
2011-06-01 15:26:13 -06:00
Matthias Bolte
43e8aeab43 apibuild: Restrict long usage to existing functions and structs
New APIs have to use long long instead of long.

Also make apibuild errors fatal.
2011-06-01 17:37:15 +02:00
Matthias Bolte
1767c8d79e Ignore backward compatibility macros in apibuild.py
This fixes this three warnings from the parser by allowing the parser
to ignore some macros in the same way as it can ignore functions.

Parsing ./../include/libvirt/libvirt.h
Misformatted macro comment for _virSchedParameter
 Expecting '* _virSchedParameter:' got '* virSchedParameter:'
Misformatted macro comment for _virBlkioParameter
 Expecting '* _virBlkioParameter:' got '* virBlkioParameter:'
Misformatted macro comment for _virMemoryParameter
 Expecting '* _virMemoryParameter:' got '* virMemoryParameter:'
2011-05-31 16:17:34 +02:00
Daniel P. Berrange
7cbbf61bd4 Ensure hvsupport.html.in is built before HTML validation
In a parallel make, HTML validation tries to run before
hvsupport.html.in has been built.

* docs/Makefile.am: List hvsupport.html.in as a built source
2011-05-31 12:20:29 +01:00
Michal Privoznik
b468f50477 schema: Add graphics element passwdValidTo attribute to schema
We support this in code, but forgot to add this to RNG schema as well.
According to documentation, the value match the dateTime type.
2011-05-26 16:23:07 +02:00
Daniel P. Berrange
58765b58a3 Fix QEMU -vnc arg generation with raw IPv6 addresses
Since -vnc uses ':' to separate the address from the port, raw
IPv6 addresses need to be escaped like [addr]:port

* src/qemu/qemu_command.c: Escape raw IPv6 addresses with []
* tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args,
  tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml: Tweak
  to test Ipv6 escaping
* docs/schemas/domain.rng: Allow Ipv6 addresses, or hostnames
  in <graphics> listen attributes
2011-05-24 10:33:53 -04:00
Alon Levy
bb1c5423b9 spice: support streaming-video parameter
This adds a streaming-video=filter|all|off attribute. It is used to change
the behavior of video stream detection in spice, the default is filter (the
default for libvirt is not to specify it - the actual default is defined in
libspice-server.so).

Usage:

    <graphics type='spice' autoport='yes'>
      <streaming mode='off'/>
    </graphics>

Tested with the above and with tests/qemuxml2argvtest.

Signed-off-by: Alon Levy <alevy@redhat.com>
2011-05-23 20:53:59 -06:00
Stefan Berger
fcb0e8c227 nwfilter: enable filtering of gratuitous ARP packets
This patch enables filtering of gratuitous ARP packets using the following XML:

<rule action='accept' direction='in' priority='425'>
<arp gratuitous='true'/>
</rule>
2011-05-23 19:41:18 -04:00
Osier Yang
2d3fac19e1 docs: Fix error syntax of vcpupin example XML
Lacks of "/", push this directly in trivial rule.
2011-05-21 17:12:23 +08:00
Dirk Herrendorefer
5252a06d65 Add support for 'passthru' mode for direct network interfaces
starting with kernel 2.6.38 macvtap supports a 'passthru' mode for
attaching virtual functions of a SRIOV capable network card directly to a VM.
This patch adds the capability to configure such a device.

Signed-off-by: Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
2011-05-18 08:15:08 -06:00
Eric Blake
aceb31aa80 maint: mark perl script executable
* docs/hvsupport.pl: Add execute bit.
2011-05-16 10:09:36 -06:00
Daniel P. Berrange
65043d2dff Introduce yet another migration version in API.
Migration just seems to go from bad to worse. We already had to
introduce a second migration protocol when adding the QEMU driver,
since the one from Xen was insufficiently flexible to cope with
passing the data the QEMU driver required.

It turns out that this protocol still has some flaws that we
need to address. The current sequence is

 *  Src: DumpXML
          - Generate XML to pass to dst

 *  Dst: Prepare
          - Get ready to accept incoming VM
          - Generate optional cookie to pass to src

 *  Src: Perform
          - Start migration and wait for send completion
          - Kill off VM if successful, resume if failed

 *  Dst: Finish
          - Wait for recv completion and check status
          - Kill off VM if unsuccessful

The problems with this are:

 - Since the first step is a generic 'DumpXML' call, we can't
   add in other migration specific data. eg, we can't include
   any VM lease data from lock manager plugins
 - Since the first step is a generic 'DumpXML' call, we can't
   emit any 'migration begin' event on the source, or have
   any hook that runs right at the start of the process
 - Since there is no final step on the source, if the Finish
   method fails to receive all migration data & has to kill
   the VM, then there's no way to resume the original VM
   on the source

This patch attempts to introduce a version 3 that uses the
improved 5 step sequence

 *  Src: Begin
          - Generate XML to pass to dst
          - Generate optional cookie to pass to dst

 *  Dst: Prepare
          - Get ready to accept incoming VM
          - Generate optional cookie to pass to src

 *  Src: Perform
          - Start migration and wait for send completion
          - Generate optional cookie to pass to dst

 *  Dst: Finish
          - Wait for recv completion and check status
          - Kill off VM if failed, resume if success
          - Generate optional cookie to pass to src

 *  Src: Confirm
          - Kill off VM if success, resume if failed

The API is designed to allow both input and output cookies
in all methods where applicable. This lets us pass around
arbitrary extra driver specific data between src & dst during
migration. Combined with the extra 'Begin' method this lets
us pass lease information from source to dst at the start of
migration

Moving the killing of the source VM out of Perform and
into Confirm, means we can now recover if the dst host
can't successfully Finish receiving migration data.
2011-05-16 15:09:19 +01:00
Daniel P. Berrange
4ffc6d173a Automatically generate the hvsupport.html.in file from source files
The hvsupport.html.in file is forever out of date. By annotating
the driver struct tables in each driver with version information,
we can auto-generate the hvsupport.html.in file. Annotating the
drivers will be mandatory for new patches, ensuring hvsupport.html.in
is never out of date again.

* docs/hvsupport.html.in: Delete
* hvsupport.pl: Script to generate hvsupport.html.in
* Makefile.am: Autogenerate hvsupport.html.in
2011-05-16 14:20:52 +01:00
Osier Yang
81cfe71998 docs: Fix documentation for cputune parameters
This re-adds the example section originally written by Osier Yang,
and indicates the version in which the cputune parameters became
available in libvirt.

Signed-off-by: Igor Serebryany <igor47@moomers.org>
2011-05-12 18:48:23 +08:00
Eric Blake
2c28717522 docs: avoid double 'the'
* docs/testsuites.html.in: Keep 'make syntax-check' happy.
2011-05-11 08:18:04 -06:00
Daniel Veillard
ef82932bb5 Add documentation about test suites
Create a new top level entry, add a new page listing the 3
test suites, and then one page for the TCK and one page for
libvirt-test-API
2011-05-11 19:18:38 +08:00
Doug Goldstein
fa4732724e docs: updates to CA cert and client cert/key info
Update the documentation to mention that the CA certificate and the
client cert/key pair can come from the user's location or the global
location independent of each other.

Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
2011-05-10 14:56:53 -06:00
Eric Blake
68ea80cfdd maint: rename virBufferVSprintf to virBufferAsprintf
We already have virAsprintf, so picking a similar name helps for
seeing a similar purpose.  Furthermore, the prefix V before printf
generally implies 'va_list', even though this variant was '...', and
the old name got in the way of adding a new va_list version.

global rename performed with:

$ git grep -l virBufferVSprintf \
  | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'

then revert the changes in ChangeLog-old.
2011-05-05 13:47:40 -06:00
Cole Robinson
79b914e8f6 docs: <filesystem> attr is 'accessmode', not 'mode' 2011-05-05 15:28:23 -04:00