Commit Graph

295 Commits

Author SHA1 Message Date
Eric Blake
2d550542ee build: fix cygwin build
make[3]: *** No rule to make target `-lxml2', needed by `libvirt.la'.  Stop.

Due to treating the wrong string as a dependency.

* src/Makefile.am (libvirt_la_DEPENDENCIES): Depend only on
locally-built file, not on strings that might resolve as '-lxml2'.
2010-05-14 16:03:57 -06:00
Eric Blake
3876e010eb maint: allow VPATH use of remote_protocol-structs
* src/Makefile.am (remote_protocol-structs): Ensure file lives in srcdir.
2010-05-10 15:17:31 -06:00
Eric Blake
7cdf26637e maint: avoid spurious output if program not present
Some shells warn about missing programs before redirection;
the idiomatic way to silence them is to run the program check
inside a subshell, with the redirections outside the subshell.
But a subshell is only needed in places where it is reasonable
to expect the use of such a noisy shell in the first place.

* src/Makefile.am (remote_protocol-structs): Use subshell, for
FreeBSD 8.0 /bin/sh.
* cfg.mk (sc_preprocessor_indentation): Avoid subshell, since the
only users running cfg.mk can be assumed to have decent tools.
2010-05-10 14:56:37 -06:00
Jim Meyering
180d4b2b3b help avoid accidental remote_protocol.x changes
Now, if you update remote_protocol.x without also updating
remote_protocol-structs to match, then "make check" will fail.
* src/Makefile.am (remote_protocol-structs): Extract list of
structs and member names from remote_protocol.o.
(check-local): Depend on it.
* src/remote_protocol-structs: New file.
2010-05-08 10:56:52 +02:00
Matthias Bolte
cc04c4ca95 Manually revert "Fix pthread related link error for virt-aa-helper"
This reverts commit b5b8a6db69.

That commit was not necessary. The problem is fixed by commit
0e9b3a269b, but I didn't rebuild
it properly after pulling in the commit and didn't notice it.
2010-05-07 20:07:37 +02:00
Eric Blake
48445ccff9 build: use LIBADD, not LDFLAGS, for adding libraries
Per automake, LDFLAGS is used early in the line, and LIBADD
(libraries) or LDADD (programs) is used late.  On platforms like
cygwin, without lazy linking, this order matters.  Therefore, libtool
commands, -L, and similar should be in LDFLAGS, but -l should be in
L*ADD.

* src/Makefile.am (*_LDFLAGS): Move libraries...
(*_LIBADD): ...to their LIBADD counterpart.
2010-05-07 11:12:09 -06:00
Eric Blake
e6125e4938 maint: whitespace cleanups
* src/Makefile.am: Fix some space-tab issues.
2010-05-07 11:11:02 -06:00
Matthias Bolte
b5b8a6db69 Fix pthread related link error for virt-aa-helper
Link virt-aa-helper explicitly with pthread. This is at least
required on Ubuntu 10.04.
2010-05-07 17:52:37 +02:00
Jim Meyering
0e9b3a269b avoid link error in tests using libvirt_util; due to pthread_sigmask
* src/Makefile.am (libvirt_util_la_LDFLAGS): Add $(LIB_PTHREAD),
required, now that we're using gnulib's pthread module.
2010-05-07 16:55:42 +02:00
Eric Blake
9017b9bcaf build: rely on gnulib's pthread module
Gnulib can guarantee that pthread.h exists, but for now, it is a dummy
header with no support for most pthread_* functions.  Modify our
use of pthread to use function checks, rather than header checks,
to determine how much pthread support is present.

* bootstrap.conf (gnulib_modules): Add pthread.
* configure.ac: Drop all pthread.h checks.  Optimize function
checks.  Add check for pthread functions.
* src/Makefile.am (libvirt_lxc_LDADD): Ensure proper link.
* src/remote/remote_driver.c (remoteIOEventLoop): Depend on
pthread_sigmask, now that gnulib guarantees pthread.h.
* src/util/util.c (virFork): Likewise.
* src/util/threads.c (threads-pthread.c): Depend on
pthread_mutexattr_init, as a witness of full pthread support.
* src/util/threads.h (threads-pthread.h): Likewise.
2010-05-06 14:35:37 -06:00
Chris Lalancette
50250aba36 Fix build on Ubuntu.
When building on Ubuntu with make -j3 (or more), it would always
fail when trying to build virt-aa-helper.  I'm not an expert in
automake by any means, but I think the entry for virt-aa-helper
is mis-using LDADD; it shouldn't be putting direct paths to
libvirt_conf.la and libvirt_util.la, but instead referencing those
names.  With this patch in place, I'm able to successfully build
on Ubuntu 9.04 with make -j3.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2010-04-29 09:15:30 -04:00
Daniel Veillard
4e041189f8 Move dnsmasq host file to a separate directory
use /var/lib/libvirt/dnsmasq since /var/lib/libvirt/network is
unreadable by the dnsmasq binary

* src/network/bridge_driver.c: update DNSMASQ_STATE_DIR
* src/Makefile.am: create it on make install
* libvirt.spec.in: take the new directory into account
2010-04-28 15:53:09 +02:00
Satoru SATOH
51d203c676 Add build support for dnsmasq module
* po/POTFILES.in: the new module contains translatable strings
* src/Makefile.am: include the files in the utils set
* src/libvirt_private.syms: exports the symbols internally
2010-04-26 17:20:02 +02:00
Daniel Veillard
4ce54ef5c7 Fix make dist missing ESX generated files
new method generated files are missing from dist tarball.
2010-04-26 16:59:50 +02:00
Matthias Bolte
d1be0aefa9 Some NWFilter symbols are conditional and have to be exported conditional 2010-04-23 19:51:00 +02:00
Matthias Bolte
77408cc0e1 esx: Add nwfilter driver stub
This stops libvirt trying to connect to a non-existing libvirtd on the
ESX server in order to find a nwfilter driver.
2010-04-15 19:52:38 +02:00
Stefan Berger
5174b02fb9 Consolidate interface related functions in interface.c
Changes from v1 to v2:
- changed function name prefixes to 'iface' from previous 'Iface'

- Further to make make syntax-check pass:
 - indentation fix in interface.h
 - added entry to POTFILES.in

I am consolidating network interface related functions used in nwfilter
and macvtap code in utils/interface.c. All function names are prefixed
with 'Iface'. The following functions are now available through
interface.h:

int ifaceCtrl(const char *name, bool up);
int ifaceUp(const char *name);
int ifaceDown(const char *name);

int ifaceCheck(bool reportError, const char *ifname,
               const unsigned char *macaddr, int ifindex);

int ifaceGetIndex(bool reportError, const char *ifname, int *ifindex);

I added 'int ifindex' as parameter to ifaceCheck to the original
function and modified the code accordingly.
2010-04-13 10:57:11 -04:00
Matthias Bolte
1787fdff57 Generate libvirt.def from libvirt.syms
The MinGW linker needs the libvirt.def file.
2010-04-08 20:12:09 +02:00
Stefan Berger
3bf24abc8c nwfilter: Support for learning a VM's IP address
This patch implements support for learning a VM's IP address. It uses
the pcap library to listen on the VM's backend network interface (tap)
or the physical ethernet device (macvtap) and tries to capture packets
with source or destination MAC address of the VM and learn from DHCP
Offers, ARP traffic, or first-sent IPv4 packet what the IP address of
the VM's interface is. This then allows to instantiate the network
traffic filtering rules without the user having to provide the IP
parameter somewhere in the filter description or in the interface
description as a parameter. This only supports to detect the parameter
IP, which is for the assumed single IPv4 address of a VM. There is not
support for interfaces that may have multiple  IP addresses (IP
aliasing) or IPv6 that may then require more than one valid IP address
to be detected. A VM can have multiple independent interfaces that each
uses a different IP address and in that case it will be attempted to
detect each one of the address independently.

So, when for example an interface description in the domain XML has
looked like this up to now:

    <interface type='bridge'>
      <source bridge='mybridge'/>
      <model type='virtio'/>
      <filterref filter='clean-traffic'>
        <parameter name='IP' value='10.2.3.4'/>
      </filterref>
    </interface>

you may omit the IP parameter:

    <interface type='bridge'>
      <source bridge='mybridge'/>
      <model type='virtio'/>
      <filterref filter='clean-traffic'/>
    </interface>

Internally I am walking the 'tree' of a VM's referenced network filters
and determine with the given variables which variables are missing. Now,
the above IP parameter may be missing and this causes a libvirt-internal
thread to be started that uses the pcap library's API to listen to the
backend interface  (in case of macvtap to the physical interface) in an
attempt to determine the missing IP parameter. If the backend interface
disappears the thread terminates assuming the VM was brought down. In
case of a macvtap device a timeout is being used to wait for packets
from the given VM (filtering by VM's interface MAC address). If the VM's
macvtap device disappeared the thread also terminates. In all other
cases it tries to determine the IP address of the VM and will then apply
the rules late on the given interface, which would have happened
immediately if the IP parameter had been explicitly given. In case an
error happens while the firewall rules are applied, the VM's backend
interface is 'down'ed preventing it to communicate. Reasons for failure
for applying the network firewall rules may that an ebtables/iptables
command failes or OOM errors. Essentially the same failure reasons may
occur as when the firewall rules are applied immediately on VM start,
except that due to the late application of the filtering rules the VM
now is already running and cannot be hindered anymore from starting.
Bringing down the whole VM would probably be considered too drastic.
While a VM's IP address is attempted to be determined only limited
updates to network filters are allowed. In particular it is prevented
that filters are modified in such a way that they would introduce new
variables.

A caveat: The algorithm does not know which one is the appropriate IP
address of a VM. If the VM spoofs an IP address in its first ARP traffic
or IPv4 packets its filtering rules will be instantiated for this IP
address, thus 'locking' it to the found IP address. So, it's still
'safer' to explicitly provide the IP address of a VM's interface in the
filter description if it is known beforehand.

* configure.ac: detect libpcap
* libvirt.spec.in: require libpcap[-devel] if qemu is built
* src/internal.h: add the new ATTRIBUTE_PACKED define
* src/Makefile.am src/libvirt_private.syms: add the new modules and symbols
* src/nwfilter/nwfilter_learnipaddr.[ch]: new module being added
* src/nwfilter/nwfilter_driver.c src/conf/nwfilter_conf.[ch]
  src/nwfilter/nwfilter_ebiptables_driver.[ch]
  src/nwfilter/nwfilter_gentech_driver.[ch]: plu the new functionality in
* tests/nwfilterxml2xmltest: extend testing
2010-04-07 23:12:21 +02:00
Daniel P. Berrange
f983c32675 Keep build quiet for generated file
Adds $(AM_V_GEN) to many more manual makefile.am rules that
were generating files
2010-04-01 12:35:51 +01:00
Matthias Bolte
50723581b0 esx: Generate most SOAP mapping and improve inheritance handling
The Python script generates the mappings based on the type descriptions
in the esx_vi_generator.input file.

This also improves the inheritance handling and allows to get rid of the
ugly, inflexible, and error prone _base/_super approach. Now every struct
that represents a SOAP type contains a _type member, that allows to
recreate C++-like dynamic dispatch for "method" calls in C.
2010-03-31 13:36:54 +02:00
Daniel Veillard
25d5e16e9e Make sure nwfilter headers are part of distribution
* src/Makefile.am: adds a few missing header files in the associated
  file variables, it's needed otherwise the missing headers breaks
  compilation from a distribution tarball
2010-03-31 10:19:06 +02:00
Daniel Veillard
2b4e353168 Add hook utilities
This exports 3 basic routines:
  - virHookInitialize() initializing the hook support by looking for
    scripts availability
  - virHookPresent() used to test if there is a hook for a given driver
  - virHookCall() which actually calls a synchronous script hook with
    the needed parameters
Note that this doesn't expose any public API except for the locations
and arguments passed to the scripts

* src/Makefile.am: add the 2 new files
* src/util/hooks.h src/util/hooks.c: implements the 3 functions
* src/libvirt_private.syms: export the 3 symbols internally
* po/POTFILES.in: add src/util/hooks.c to translatables modules
2010-03-29 18:21:04 +02:00
Stefan Berger
065b6571bf Core driver implementation with ebtables support
This patch implements the core driver and provides
- management functionality for managing the filter XMLs
- compiling the internal filter representation into ebtables rules
- applying ebtables rules on a network (tap,macvtap) interface
- tearing down ebtables rules that were applied on behalf of an
interface
- updating of filters while VMs are running and causing the firewalls to
be rebuilt
- other bits and pieces

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2010-03-26 18:01:16 +00:00
Stefan Berger
e4e20423ff Add XML parser extensions for network filtering
This patch adds XML processing for the network filter schema
and extends the domain XML processing to parse the top level
referenced filter along with potentially provided parameters

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Gerhard Stenzel <gerhard.stenzel@de.ibm.com>
2010-03-26 18:01:16 +00:00
Jim Meyering
84eb6effdd build: suppress distracting build output
* src/Makefile.am (augeas-check): New target, just to give the existing
rule a name.  At the same time, prefix the commands with $(AM_V_GEN),
to avoid unexpected build output with V=0 which is the default.
2010-03-24 09:45:24 +01:00
Matthias Bolte
190aaa2627 Fix export of virConnectAuthPtrDefault for MinGW builds
Use the __declspec(dllexport/dllimport) stuff to export the symbol,
otherwise accessing virConnectAuthPtrDefault triggers a segfault.
2010-03-23 02:07:38 +01:00
Matthias Bolte
6d45d5855d Export conditional state driver symbols only when they are defined
This is necessary for MinGW builds.
2010-03-23 02:05:18 +01:00
Cole Robinson
89d8cdfc7e Fix make dist with XenAPI changes 2010-03-17 12:25:50 -04:00
Matthias Bolte
3cdc4cb613 esx: Move username and password helper functions to authhelper.c 2010-03-16 20:15:32 +01:00
Sharadha Prabhakar
eb9945d9ae xenapi: Initial commit of the new driver 2010-03-14 19:30:00 +01:00
Matthias Bolte
5541cade86 macvtap: Only export symbols if support is enabled 2010-03-13 14:48:25 +01:00
Diego Elio Pettenò
c7434706a2 build: vbox: avoid build failure when linking with --no-add-needed
With the recent changes to the linking defaults in Fedora 13 (namely
enabling --no-add-needed behaviour by default), we have to pass the
dlopen()-providing libraries directly at the link of the module; use the
same AC_SEARCH_LIBS function as used before to look for it and add it to
the Makefile.
2010-03-04 17:25:22 +01:00
Stefan Berger
fd5091db5f macvtap support for libvirt -- build support
This patch adds build support for libvirt checking for certain contents
of /usr/include/linux/if_link.h to see whether macvtap support is
compilable on that system. One can disable macvtap support in libvirt
via --without-macvtap passed to configure.
* configure.ac src/Makefile.am: new build support
* src/libvirt_macvtap.syms: list of exported symbols
* src/util/macvtap.c: empty module to not break compilation
2010-02-15 17:47:28 +01:00
Daniel P. Berrange
15f5eaa098 Introduce a new DAC security driver for QEMU
This new security driver is responsible for managing UID/GID changes
to the QEMU process, and any files/disks/devices assigned to it.

* qemu/qemu_conf.h: Add flag for disabling automatic file permission
  changes
* qemu/qemu_security_dac.h, qemu/qemu_security_dac.c: New DAC driver
  for QEMU guests
* Makefile.am: Add new files
2010-01-21 14:00:16 +00:00
Daniel P. Berrange
80fd73ca09 Introduce a stacked security driver impl for QEMU
* qemu/qemu_conf.h: Add securityPrimaryDriver and
  securitySecondaryDriver fields to 'struct qemud_driver'
* Makefile.am: Add new files
* qemu/qemu_security_stacked.c, qemu/qemu_security_stacked.h: A
  simple stacked security driver
2010-01-21 14:00:16 +00:00
Jim Meyering
eabb98b0a8 gnulib added a new syntax-check test: use $(VAR), not @VAR@
The latter is not officially "wrong", but *is* terribly anachronistic.
I think automake documentation or comments call that syntax obsolescent.
* cfg.mk (_makefile_at_at_check_exceptions): Exempt @SCHEMADIR@
and @SYSCONFDIR@ uses -- there are no Makefile variables for those.
* docs/Makefile.am: Use $(INSTALL), not @INSTALL@.
* examples/dominfo/Makefile.am: Similar.
* examples/domsuspend/Makefile.am: Similar.
* proxy/Makefile.am: Similar.
* python/Makefile.am: Similar.
* python/tests/Makefile.am: Similar.
* src/Makefile.am: Similar.
* tests/Makefile.am: Similar.
2010-01-18 09:50:08 +01:00
Matthias Bolte
d6c40aaec8 esx: Add stubs for secondary driver types
This stops libvirt from probing for a libvirtd on the ESX server and
sets the base for the implementation of the secondary drivers.
2010-01-18 01:15:11 +01:00
Matthias Bolte
9933c4f2f6 Fix linkage of virt-aa-helper to libgnu.a 2010-01-14 21:50:21 +01:00
Matthias Bolte
728e9229b1 Replace old CVS references with GIT 2010-01-08 18:08:22 +01:00
Matthias Bolte
a26d2628c0 The secret driver is stateful, link it directly to libvirtd
All other stateful drivers are linked directly to libvirtd
instead of libvirt.so. Link the secret driver to libvirtd too.

* daemon/Makefile.am: link the secret driver to libvirtd
* daemon/libvirtd.c: add #ifdef WITH_SECRETS blocks
* src/Makefile.am: don't link the secret driver to libvirt.so
* src/libvirt_private.syms: remove the secretRegister symbol
2009-12-23 15:01:09 +01:00
Jiri Denemark
913ab198fb Rename DATADIR to PKGDATADIR to fix win32 build
* src/Makefile.am src/cpu/cpu_map.c: rename in Makefile and in the
  cpu map loading code
2009-12-23 14:29:57 +01:00
Jiri Denemark
bfeeb9a6d2 Install cpu_map.xml
* src/Makefile.am: install it in $(pkgdatadir) i.e. /usr/share/libvirt/
  usually
2009-12-22 12:06:01 +01:00
Jiri Denemark
d5ef0a69e9 Adds CPU map for models and features
* src/cpu/cpu_map.xml: newdescription file
* src/Makefile.am: include it in dist
2009-12-18 16:14:05 +01:00
Jiri Denemark
7286882c34 Adds CPU selection infrastructure
Each driver supporting CPU selection must fill in host CPU capabilities.
When filling them, drivers for hypervisors running on the same node as
libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
such as VMware, need to implement their own way of getting such data.
Raw data can be decoded into virCPUDefPtr using cpuDecode() function.

When implementing virConnectCompareCPU(), a hypervisor driver can just
call cpuCompareXML() function with host CPU capabilities.

For each guest for which a driver supports selecting CPU models, it must
set the appropriate feature in guest's capabilities:

    virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)

Actions needed when a domain is being created depend on whether the
hypervisor understands raw CPU data (currently CPUID for i686, x86_64
architectures) or symbolic names has to be used.

Typical use by hypervisors which prefer CPUID (such as VMware and Xen):

- convert guest CPU configuration from domain's XML into a set of raw
  data structures each representing one of the feature policies:

    cpuEncode(conn, architecture, guest_cpu_config,
              &forced_data, &required_data, &optional_data,
              &disabled_data, &forbidden_data)

- create a mask or whatever the hypervisor expects to see and pass it
  to the hypervisor

Typical use by hypervisors with symbolic model names (such as QEMU):

- get raw CPU data for a computed guest CPU:

    cpuGuestData(conn, host_cpu, guest_cpu_config, &data)

- decode raw data into virCPUDefPtr with a possible restriction on
  allowed model names:

    cpuDecode(conn, guest, data, n_allowed_models, allowed_models)

- pass guest->model and guest->features to the hypervisor

* src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
  src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
  src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
* configure.in: check for CPUID instruction
* src/Makefile.am: glue the new files in
* src/libvirt_private.syms: add new private symbols
* po/POTFILES.in: add new cpu files containing translatable strings
2009-12-18 16:13:45 +01:00
Jiri Denemark
6695818c03 XML parsing/formating code for CPU flags
* include/libvirt/virterror.h src/util/virterror.c: add new domain
  VIR_FROM_CPU for errors
* src/conf/cpu_conf.c src/conf/cpu_conf.h: new parsing module
* src/Makefile.am proxy/Makefile.am: include new files
* src/conf/capabilities.[ch] src/conf/domain_conf.[ch]: reference
  new code
* src/libvirt_private.syms: private export of new entry points
2009-12-18 14:44:55 +01:00
Mark McLoughlin
3b3305d859 remove all traces of lokkit support
Long ago we tried to use Fedora's lokkit utility in order to register
our iptables rules so that 'service iptables restart' would
automatically load our rules.

There was one fatal flaw - if the user had configured iptables without
lokkit, then we would clobber that configuration by running lokkit.

We quickly disabled lokkit support, but never removed it. Let's do
that now.

The 'my virtual network stops working when I restart iptables' still
remains. For all the background on this saga, see:

  https://bugzilla.redhat.com/227011

* src/util/iptables.c: remove lokkit support

* configure.in: remove --enable-lokkit

* libvirt.spec.in: remove the dirs used only for saving rules for lokkit

* src/Makefile.am: ditto

* src/libvirt_private.syms, src/network/bridge_driver.c,
  src/util/iptables.h: remove references to iptablesSaveRules
2009-12-10 11:27:17 +00:00
Daniel P. Berrange
3a4f172fdd Support for JSON mode monitor
Initial support for the new QEMU monitor protocol  using JSON
as the data encoding format instead of plain text

* po/POTFILES.in: Add src/qemu/qemu_monitor_json.c
* src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP
  mode. Replace with a version number check on >= 0.12 later
* src/qemu/qemu_monitor.c: Delegate to json monitor if enabled
* src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add
  impl of QMP protocol
* src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
2009-12-08 13:46:54 +00:00
Daniel P. Berrange
9428f2ced6 Introduce a simple API for handling JSON data
This introduces simple API for handling JSON data. There is
an internal data structure 'virJSONValuePtr' which stores a
arbitrary nested JSON value (number, string, array, object,
nul, etc).  There are APIs for constructing/querying objects
and APIs for parsing/formatting string formatted JSON data.

This uses the YAJL library for parsing/formatting from

 http://lloyd.github.com/yajl/

* src/util/json.h, src/util/json.c: Data structures and APIs
  for representing JSON data, and parsing/formatting it
* configure.in: Add check for yajl library
* libvirt.spec.in: Add build requires for yajl
* src/Makefile.am: Add json.c/h
* src/libvirt_private.syms: Export JSON symbols to drivers
2009-12-07 14:14:36 +00:00
Pritesh Kothari
834d65471d vbox: Add support for version 3.1
Also fixed serial port configuration which was broken due to recent
change in virDomainChrDef where targetType was newly added.

* src/Makefile.am: add new files
* src/vbox/vbox_driver.c: add case for version 3.1
* src/vbox/vbox_tmpl.c: refactor common patterns into macros, support for
  version 3.1, serial port configuration fix
* src/vbox/vbox_CAPI_v3_1.h, src/vbox/vbox_V3_1.c: generated code
2009-12-04 14:49:45 +01:00
Daniel P. Berrange
37f415da42 Pull schedular affinity code out into a separate module
* src/Makefile.am: Add processinfo.h/processinfo.c
* src/util/processinfo.c, src/util/processinfo.h: Module providing
  APIs for getting/setting process CPU affinity
* src/qemu/qemu_driver.c: Switch over to new APIs for schedular
  affinity
* src/libvirt_private.syms: Export virProcessInfoSetAffinity
  and virProcessInfoGetAffinity to internal drivers
2009-11-23 11:58:13 +00:00
Daniel Veillard
040e80f7e6 Release of libvirt-0.7.4
0.7.3 was broken

* configure.in docs/news.html.in: release of 0.7.4
* configure.in libvirt.spec.in: require netcf >= 0.1.4
* src/Makefile.am: node_device/node_device_udev.h was missing from
  NODE_DEVICE_DRIVER_UDEV_SOURCES breaking compilation on platforms with
  udev
2009-11-20 19:43:59 +01:00
David Allan
7023663873 Add translation of PCI vendor and product IDs
uses libpciaccess to provide human readable names for PCI vendor and
device IDs
* configure.in: add a requirement for libpciaccess >= 0.10.0
* src/Makefile.am: add the associated compilation flags and link
* src/node_device/node_device_udev.c: lookup the libpciaccess for
  vendor name and product name based on their ids
2009-11-12 23:22:00 +01:00
David Allan
e99fb5ed9d Remove DevKit node device backend
* configure.in src/Makefile.am: remove the configuration check and
  build instructions
* src/node_device/node_device_devkit.c: removed the module
* src/node_device/node_device_driver.c src/node_device/node_device_driver.h:
  removed references to the old backend
2009-11-12 23:09:24 +01:00
David Allan
3ad6dcf3dc Implement a node device backend using libudev
* configure.in: add new --with-udev, disabled by default, and requiring
  libudev > 145
* src/node_device/node_device_udev.c src/node_device/node_device_udev.h:
  the new node device backend
* src/node_device/node_device_linux_sysfs.c: moved node_device_hal_linux.c
  to a better file name
* src/conf/node_device_conf.c src/conf/node_device_conf.h: add a couple
  of fields in node device definitions, and an API to look them up,
  remove a couple of unused fields from previous patch.
* src/node_device/node_device_driver.c src/node_device/node_device_driver.h:
  plug the new driver
* po/POTFILES.in src/Makefile.am src/libvirt_private.syms: add the new
  files and symbols
* src/util/util.h src/util/util.c: add a new convenience macro
  virBuildPath and virBuildPathInternal() function
2009-11-12 22:48:24 +01:00
Daniel P. Berrange
ff26194143 Move code for low level QEMU monitor interaction into separate file
The qemu_driver.c code should not contain any code that interacts
with the QEMU monitor at a low level. A previous commit moved all
the command invocations out. This change moves out the code which
actually opens the monitor device.

* src/qemu/qemu_driver.c: Remove qemudOpenMonitor & methods called
  from it.
* src/Makefile.am: Add qemu_monitor.{c,h}
* src/qemu/qemu_monitor.h: Add qemuMonitorOpen()
* src/qemu/qemu_monitor.c: All code for opening the monitor
2009-11-10 12:14:22 +00:00
Gerhard Stenzel
0aa72ac6fd add MAC address based port filtering to qemu
* src/qemu/qemu.conf src/qemu/qemu_conf.c src/qemu/qemu_conf.h: there is
  a new config type option for mac filtering
* src/qemu/qemu_bridge_filter.[ch]: new module for the ebtable entry points
* src/qemu/qemu_driver.c: plug the MAC filtering at the right places
  in the domain life cycle
* src/Makefile.am po/POTFILES.in: add the new module
2009-11-03 23:44:48 +01:00
Gerhard Stenzel
1fc3816d0f New ebtables module wrapper
* configure.in: look for ebtables binary location if present
* src/Makefile.am: add the new module
* src/util/ebtables.[ch]: new module and internal APIs around
  the ebtables binary
* src/libvirt_private.syms: export the symbols only internally
2009-11-03 23:44:48 +01:00
Daniel Veillard
24c8fc5dff Set of new network related utilities
* src/util/network.h src/util/network.c: utilities to parse network
  addresses, check netmask and compute ranges
2009-10-30 15:44:53 +01:00
Jim Fehlig
309acaa023 Fix SELinux linking issues
* src/Makefile.am: add selinux CFLAGS and linker flags to security driver
2009-10-21 12:11:13 +02:00
Amy Griffis
e1a2fe6af2 LXC add augeas support for config file
* src/lxc/libvirtd_lxc.aug src/lxc/test_libvirtd_lxc.aug: augeas schemas
  for lxc.conf
* src/Makefile.am libvirt.spec.in: glue the new augeas files in
2009-10-08 18:06:40 +02:00
Amy Griffis
2dd44664cf LXC add driver config file lxc.conf
* src/lxc/lxc.conf: new configuration file, there is currently one
  tunable "log_with_libvirtd" that controls whether an lxc controller will
  log only to the container log file, or whether it will honor libvirtd's
  log output configuration. This provides a way to have libvirtd and its
  children log to a single file.  The default is to log to the container
  log file.
* src/Makefile.am libvirt.spec.in: add the new file
* src/lxc/lxc_conf.[ch] src/lxc/lxc_driver.c: read the new log value
  from the configuration file and pass the log informations when
  starting up a container.
2009-10-08 17:40:14 +02:00
Jamie Strandboge
bbaecd6a8f sVirt AppArmor security driver
* configure.in: look for AppArmor and devel
* src/security/security_apparmor.[ch] src/security/security_driver.c
  src/Makefile.am: add and plug the new driver
* src/security/virt-aa-helper.c: new binary which is used exclusively by
  the AppArmor security driver to manipulate AppArmor.
* po/POTFILES.in: registers the new files
* tests/Makefile.am tests/secaatest.c tests/virt-aa-helper-test:
  tests for virt-aa-helper and the security driver, secaatest.c is
  identical to seclabeltest.c except it initializes the 'apparmor'
  driver instead of 'selinux'
2009-10-08 16:34:22 +02:00
Paolo Bonzini
96ad9ed33b unbreak `make rpcgen'
Fix "make rpcgen", broken by the directory reorganization.

* src/Makefile.am (rpcgen): Fix path to rpcgen_fix.pl.
2009-10-02 11:58:42 +02:00
Mark McLoughlin
00fd3ff49b Move file format enum to libvirt_util
Rename virStorageVolFormatFileSystem to virStorageFileFormat and
move to src/util/storage_file.[ch]

* src/Makefile.am: add src/util/storage_file.[ch]

* src/conf/storage_conf.[ch]: move enum from here ...

* src/util/storage_file.[ch]: .. to here

* src/libvirt_private.syms: update To/FromString exports

* src/storage/storage_backend.c, src/storage/storage_backend_fs.c,
  src/vbox/vbox_tmpl.c: update for above changes
2009-09-30 10:36:59 +01:00
Daniel P. Berrange
a541c76238 Pull QEMU monitor interaction out to separate file
Pull out all the QEMU monitor interaction code to a separate
file. This will make life easier when we need to drop in a
new implementation for the forthcoming QMP machine friendly
monitor support.

Next step is to add formal APIs for each monitor command,
and remove direct commands for sending/receiving generic
data.

* src/Makefile.am: Add qemu_monitor.c to build
* src/qemu/qemu_driver.c: Remove code for monitor interaction
* src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: New
  file for monitor interaction
* po/POTFILES.in: Add src/qemu/qemu_monitor_text.c
2009-09-29 11:47:05 +01:00
Daniel P. Berrange
634736a781 Move remote protocol definition into src/remote/
When making changes to the remote protocol, src/ is always built
first, so rpcgen should live there, to avoid having to run make
in the 'daemon/' directory before building src/

* src/Makefile.am: Add rules for rpcgen, and drop -I../daemon from
  remote client build
* daemon/Makefile.am: Add -I../src/remote/ to libvirtd build
  and remove rpcgen rules
* daemon/libvirtd.c: Adapt include of remote_driver.h taking
  into account new -I flag
* daemon/remote_protocol.c, daemon/remote_protocol.h,
  daemon/remote_protocol.x: Move to src/remote/
* daemon/rpcgen_fix.pl: Move to src/remote/rpcgen_fix.pl
2009-09-21 14:41:47 +01:00
Daniel P. Berrange
1355e0552e Move all shared utility files to src/util/
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
  src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
  src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
  src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
  src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
  src/qparams.h, src/stats_linux.c, src/stats_linux.h,
  src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
  src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
  src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
  src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
  into src/util/
* daemon/Makefile.am: Add -Isrc/util/ to build flags
* src/Makefile.am: Add -Isrc/util/ to build flags and update for
  moved files
* src/libvirt_private.syms: Export cgroup APIs since they're now
  in util rather than linking directly to drivers
* src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
  when built under PROXY
* proxy/Makefile.am: Update for changed file locations. Remove
  bogus build of event.c
* tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
2009-09-21 14:41:47 +01:00
Daniel P. Berrange
e0a48c99e4 Move all XML configuration handling to src/conf/
* src/capabilities.c, src/capabilities.h, src/domain_conf.c,
  src/domain_conf.h, src/domain_event.c, src/domain_event.h,
  src/interface_conf.c, src/interface_conf.h,
  src/network_conf.c, src/network_conf.h, src/node_device_conf.c,
  src/node_device_conf.h, src/secret_conf.c, src/secret_conf.h,
  src/storage_conf.c, src/storage_conf.h, src/storage_encryption_conf.c,
  src/storage_encryption_conf.h: Move to src/conf/
* src/Makefile.am: Add -Isrc/conf to the individual build targets
  which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
  and SELINUX_CFLAGS from global INCLUDES and only have them in build
  targets which actually need them.  Create a libvirt_conf.la
  convenience library for all config parsers
* src/hostusb.h: Remove bogus include of domain_conf.h
* tests/Makefile.am: Add -Isrc/conf. Remove bogus -I$builddir/src
  since it never has any generated header files
* daemon/Makefile.am: Add -Isrc/conf
* proxy/Makefile.am: Add -Isrc/conf and cope with renamed files
* src/hash.c: Remove bogus include of libxml/threads.h
2009-09-21 14:41:46 +01:00
Daniel P. Berrange
ec171c529a Move config files to align with driver sources
* daemon/default-network.xml: Move to src/network/default.xml
* daemon/libvirtd_qemu.aug, daemon/test_libvirtd_qemu.aug: Move
  to src/qemu/
* src/qemu.conf: Move to src/qemu/qemu.conf
* daemon/Makefile.am: Remove rules for default-nmetwork.xml and
  libvirtd_qemu.aug and test_libvirtd_qemu.aug. Fix typo in
  uninstall-local that would install polkit again.
* src/Makefile.am: Add rules for installing network/default.xml
  and the qemu/*.aug files. Add test case for QEMU augeas files.
  Add uninstall-local rule for files/directories created during
  install. Rename install-exec-local to install-data-local.
  Only install qemu.conf if WITH_QEMU is set.
* tests/networkschematest: Update for XML location move
2009-09-21 14:41:45 +01:00
Daniel P. Berrange
7ff256ec98 Move virsh into tools/ directory
Move the virsh tool and its man page into the tools directory

* Makefile.am: Remove rules for virsh.1 man page
* virsh.1: Remove auto-generated file
* docs/Makefile.am: Remove rules for virsh.pod man page
* docs/virsh.pod: Move to tools/ directory
* src/Makefile.am, src/.gitignore: Remove rules for virsh
* src/console.c, src/console.h, src/*.ico, src/virsh_win_icon.rc,
  src/virsh.c: Move into tools/ directory
* tools/Makefile.am: Add rules for building virsh
* tools/.gitignore: Ignore virsh built files
* tests/virshtest.c, tests/int-overflow: Update for new
  virsh location
2009-09-21 14:41:45 +01:00
Daniel P. Berrange
e56c6a83b4 Move security drivers to src/security/
* src/Makefile.am, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c,
  tests/seclabeltest.c: Adapt for changed paths
* src/security.c: Rename to src/security/security_driver.c
* src/security.h: Rename to src/security/security_driver.h
* src/security_selinux.c, src/security_selinux.h: Move to src/security/
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
5c519beb2e Move secret driver into src/secret/
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths
* src/secret_driver.c, src/secret_driver.h: Move to src/secret/
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
7d6b260174 Move netcf interface driver into src/interface/
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths
* src/interface_driver.c: Rename to src/interface/netcf_driver.c
* src/interface_driver.h: Rename to src/interface/netcf_driver.h
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
acfe3f2664 Move network driver into src/network
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths
* src/network_driver.c: Rename to src/network/bridge_driver.c
* src/network_driver.h: Rename to src/network/bridge_driver.h
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
8c69a83881 Move remote driver to src/remote/
* daemon/mdns.c: Remove bogus include
* daemon/qemud.c, src/Makefile.am, src/libvirt.c: Adapt for
  changed paths
* src/remote_internal.c: Rename to src/remote/remote_driver.c
* src/remote_internal.h: Rename to src/remote/remote_driver.h
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
0b648155e7 Move test driver into src/test/
* src/Makefile.am, src/libvirt.c: Adjust for changed paths
* src/test.c: Rename to src/test/test_driver.c,
* src/test.h: Rename to src/test/test_driver.h
2009-09-21 14:41:44 +01:00
Daniel P. Berrange
91b56239e0 Move node device drivers to src/node_device/
* daemon/qemud.c, src/Makefile.am: Update for changed paths
* src/node_device*.{h,c}: Move to src/node_device/
* src/storage/storage_backend.c: Remove bogus import of node_device.c
2009-09-21 14:41:43 +01:00
Daniel P. Berrange
c3fd4a75e9 Move storage drivers into src/storage/
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths
* src/storage*.c, src/storage/*.h, src/parthelpre.c: Move
  to src/storage/
2009-09-21 14:41:43 +01:00
Daniel P. Berrange
229c5c9b2a Move OpenVZ driver to src/openvz/
* src/openvz_conf.c, src/openvz_conf.h, src/openvz_driver.c,
  src/openvz_driver.h: Move to src/openvz/
* src/Makefile.am, src/libvirt.c: Adjust for changed paths
2009-09-21 14:41:43 +01:00
Daniel P. Berrange
c8b2f62297 Move UML driver to src/uml/
* src/uml_conf.c, src/uml_conf.h, src/uml_driver.c,
  src/uml_driver.h: Move to src/uml/
* daemon/qemud.c, src/Makefile.am: Adjust for changed paths
2009-09-21 14:41:43 +01:00
Daniel P. Berrange
58355a5bfb Move QEMU driver to src/qemu/
* src/qemu_conf.c, src/qemu_conf.h, src/qemu_driver.c,
  src/qemu_driver.h: Move to src/qemu/
* daemon/qemud.c, src/Makefile.am, tests/qemuargv2xmltest.c,
  tests/qemuhelptest.c, tests/qemuxml2argvtest.c,
  tests/qemuxml2xmltest.c: Adapt for changed paths
2009-09-21 14:41:43 +01:00
Daniel P. Berrange
c93125b120 Move LXC driver into src/lxc/
* src/lxc_conf.c, src/lxc_conf.h, src/lxc_container.c,
  src/lxc_container.h, src/lxc_controller.c, src/lxc_driver.c,
  src/lxc_driver.h, src/veth.c, src/veth.h: Move to src/lxc/
* src/opennebula/one_driver.c: Remove bogus veth.h include
* src/Makefile.am: Adjust for lxc paths
* daemon/qemud.c: Adjust include for lxc
2009-09-21 14:41:42 +01:00
Daniel P. Berrange
f7a107f73e Move xen driver code into src/xen/ directory
* src/Makefile.am, src/proxy_internal.c, src/proxy_internal.h
  src/sexpr.c, src/sexpr.h, src/xen_unified.c, src/xen_unified.h,
  src/xen_internal.c, src/xen_internal.h, src/xen_inotify.c,
  src/xen_inotify.h, src/xend_internal.c, src/xend_internal.h,
  src/xm_internal.c, src/xm_internal.h, src/xs_internal.c,
  src/xs_internal.h: Move to src/xen/ directory
* proxy/Makefile.am, proxy/libvirt_proxy.c, src/Makefile.am,
  src/libvirt.c, tests/sexpr2xmltest.c, tests/statstest.c,
  tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c:
  Adapt to changed xen location
* src/stats_linux.h, src/stats_linux.c: Remove xen specific block
  stats APIs
* src/qemu_driver.c, src/uml_driver.c: Add missing sys/un.h include
  uncovered after change to stats_linux.h
* src/xen/block_stats.h, src/xen/block_stats.c: Add xen specific
  block stats APIs
2009-09-21 14:41:42 +01:00
Daniel P. Berrange
5c2a1ae876 Rename qemud/ directory to daemon/
* qemud/: Rename to daemon/
* Makefile.am, configure.in, src/Makefile.am, src/remote_internal.c,
  tests/Makefile.am, tests/eventtest.c: s/qemud/daemon/ where needed
2009-09-21 14:41:42 +01:00
Daniel P. Berrange
2c60f4f0f2 Fix dlopen of secrets driver
* src/Makefile.am: Add gnulib.la for base64 functions
* src/libvirt_private.syms: Export virFileNameMatchesSuffix
2009-09-15 11:11:57 +01:00
Daniel P. Berrange
61a70716cd Fix win32 platform build
* configure.in: Only define WITH_SECRETS if libvirtd is present
* src/Makefile.am: Only build secrets driver if WITH_SECRETS is
  defined. Always add SECRET_DRIVER_SOURCES to EXTRA_DIST
2009-09-14 14:53:21 +01:00
Miloslav Trmač
03d338608d Local file implementation of secret driver API
This implementation stores the secrets in an unencrypted text file,
for simplicity in implementation and debugging.

(Symmetric encryption, e.g. using gpgme, will not be difficult to add.
Because the TLS private key used by libvirtd is stored unencrypted,
encrypting the secrets file does not currently provide much additional
security.)

* include/libvirt/virterror.h, src/virterror.c (VIR_ERR_NO_SECRET): New
  error number.
* po/POTFILES.in, src/Makefile.am: Add secret_driver.
* bootstrap: Use gnulib's base64 module.
* src/secret_driver.c, src.secret_driver.h, src/libvirt_private.syms:
  Add local secret driver.
* qemud/qemud.c (qemudInitialize): Use the local secret driver.
2009-09-11 14:54:46 +01:00
Miloslav Trmač
b9a8bef477 Add an internal <secret> XML handling API
Add a <secret> XML handling API, separate from the local driver, to
avoid manually generating XML in other parts of libvirt.

* src/secret_conf.c, src/secret_conf.h: New files.
* po/POTFILES.in, src/Makefile.am: Add secret_conf.
2009-09-11 14:54:40 +01:00
Daniel P. Berrange
fcd4e26943 Fix use of dlopen modules
Remove the bogus dependancy between node_device.c & storage_backend.c
by moving the virWaitForDevices into util.h where it can be shared
safely

* src/storage_backend_disk.c, src/storage_backend_logical.c,
  src/storage_backend_mpath.c, src/storage_backend_scsi.c: Replace
  virStorageBackendWaitForDevices with virFileWaitForDevices
* src/storage_backend.c, src/storage_backend.h: Remove
  virStorageBackendWaitForDevices, virWaitForDevices
* src/util.h, src/util.c: Add virFileWaitForDevices
* configure.in: Move xmlrpc check further down after pkgconfig
  is detected
* src/Makefile.am: Add missing XMLRPC_CFLAGS/LIBS to opennebula
* src/libvirt_private.syms: Add many missing exports
2009-09-10 15:42:08 +01:00
Daniel P. Berrange
1e060bf2d7 Add helper module for dealing with USB host devices
* src/Makefile.am: Add usb.h and usb.h to libvirt_util.la
* src/libvirt_private.syms: Export symbols
* src/usb.c, src/usb.h: Helper APIs for USB host devices
2009-09-10 14:34:06 +01:00
Dave Allan
ee8a06f833 Multipath storage support module
* configure.in src/Makefile.am src/storage_backend.[ch]
  src/storage_conf.[ch] src/storage_backend_mpath.[ch] po/POTFILES.in:
  add a new module for storage multipath, it requires device-mapper
2009-09-08 15:47:45 +02:00
Eduardo Otubo
191053b53d Switch Power Hypervisor to libssh2
* configure.in src/Makefile.am: change detection and flags
* src/phyp/phyp_driver.c src/phyp/phyp_driver.h: connection now
  need to be done as part of the driver code, cleaned up by DV
2009-09-04 12:08:47 +02:00
Miloslav Trmač
05b9b8fda3 Add volume encryption information handling.
Define an <encryption> tag specifying volume encryption format and
format-depenedent parameters (e.g. passphrase, cipher name, key
length, key).

Currently the only defined parameter is a reference to a "secret"
(passphrase/key) managed using the virSecret* API.

Only the qcow/qcow2 encryption format, and a "default" format used to
let libvirt choose the format during volume creation, is currently
supported.

This patch does not add any users; the <encryption> tag is added in
the following patches to both volumes (to support encrypted volume
creation) and domains.

* docs/*.html: Re-generate
* docs/formatstorageencryption.html.in, docs/sitemap.html.in:
  Add page describing storage encryption data format
* docs/schemas/Makefile.am, docs/schemas/storageencryption.rng:
  Add RNG schema for storage encryption format
* po/POTFILES.in: Add src/storage_encryption_conf.c
* src/libvirt_private.syms: Export virStorageEncryption* functions
* src/storage_encryption_conf.h, src/storage_encryption_conf.c: Internal
  helper APIs for dealing with storage encryption format
* libvirt.spec.in, mingw32-libvirt.spec.in: Add storageencryption.rng
  RNG schema
2009-09-01 18:27:28 +01:00
Pritesh Kothari
41e097e91a Add support for VBox 3 and event callbacks on vbox
* src/vbox/vbox_driver.c: remove some old 2.5 switches and plug the
  3.0 driver
* src/vbox/vbox_V3_0.c src/vbox/vbox_CAPI_v3_0.h: the driver for
  VirtualBox 3.0
* src/vbox/vbox_tmpl.c: handle the new driver and add event support
* src/Makefile.am: plug in the new module
2009-07-24 18:12:16 +02:00
Eduardo Otubo
a7a82f9889 First version of the Power Hypervisor driver
Features supported:
- Connects to HMC/VIOS or IVM systems.
- Life cycle commands (resume and shutdown).
- dumpxml
- 'list' and 'list --all'

What is being implemented:
- better and centralized control for UUID
- definexml
- CPU management commands

* src/domain_conf.c src/domain_conf.h: first version of the driver
* configure.in src/Makefile.am include/libvirt/virterror.h
  src/domain_conf.[ch] src/libvirt.c src/virterror.c: glue the driver
  in the general framework
2009-07-24 16:17:06 +02:00
Matthias Bolte
e2aeee6811 First version of the driver for VMWare ESX
* src/esx/esx_*.[ch]: the driver, uses a remote minimal SOAP client
  to talk to the VI services on ESX nodes.
* configure.in include/libvirt/virterror.h src/Makefile.am src/driver.h
  src/libvirt.c src/virterror.c: glue in the new driver
2009-07-23 22:25:34 +02:00
Daniel P. Berrange
f4c3acdf35 Make QEMU cgroups use configurable
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug,
   src/qemu.conf: Add 'cgroups_controllers' and 'cgroups_device_acl'
   parameters
 * src/qemu_conf.h, src/qemu_conf.c: Load & parse configuration params
   for cgroups
 * src/qemu_driver.c: Only use cgroups controllers that are activated,
   and use configured device whitelist instead of default, if set.
2009-07-23 17:38:06 +01:00
Laine Stump
da4f146f83 Netcf based interface driver implementation
* src/interface_driver.c src/interface_driver.h: the new driver
* src/Makefile.am qemud/Makefile.am qemud/qemud.c: hook the new driver
  in the build system and get ti activated by the daemon
* src/libvirt_private.syms: export needed symbols internally
2009-07-21 16:02:16 +02:00
Daniel P. Berrange
0714b2ba4c Run QEMU guests as an unprivileged user
* configure.in: Add --with-qemu-user and --with-qemu-group args
* libvirt.spec.in: use 'qemu' for user/group for Fedora >= 12
* qemud/libvirtd_qemu.arg, qemud/test_libvirtd_qemu.aug,
  src/qemu.conf: Add 'user' and 'group' args for configuration
* src/Makefile.am: Create %localstatedir/cache/libvirt/qemu
* src/qemu_conf.c, src/qemu_conf.h: Load user/group from config
* src/qemu_driver.c: Change user ID/group ID when launching QEMU
  guests. Change user/group ownership on disks/usb/pci devs.
  Put memory dumps in %localstatedir/cache/libvirt/qemu
* src/util.c, src/util.h: Add convenient APIs for converting
  username/groupname to user ID / group ID
2009-07-16 17:06:55 +01:00