]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
12 years agobuild: Distribute check-symfile.pl
Cole Robinson [Mon, 13 Aug 2012 14:39:23 +0000 (10:39 -0400)] 
build: Distribute check-symfile.pl

Otherwise distcheck can fail with:

  GEN      check-symfile
  Can't open perl script "../../src/check-symfile.pl": No such file or directory
  make[4]: *** [check-symfile] Error 2

12 years agomaint: add attribution for last patch
Eric Blake [Mon, 13 Aug 2012 16:32:50 +0000 (10:32 -0600)] 
maint: add attribution for last patch

* AUTHORS: Add Frido Roose.

12 years agoRelease only specific sanlock resource
Frido Roose [Mon, 13 Aug 2012 10:54:38 +0000 (12:54 +0200)] 
Release only specific sanlock resource

This is a patch for bug 826704
All sanlock resources get released when hot-dettaching a disk from the domain
because virLockManagerSanlockRelease uses the wrong function parameters/flags.
With the patch only the resources that should be released are cleaned up.

Signed-off-by: Frido Roose <frido.roose@gmail.com>
12 years agovirterror: Add error message for unsupported operations.
Peter Krempa [Thu, 9 Aug 2012 13:12:12 +0000 (15:12 +0200)] 
virterror: Add error message for unsupported operations.

This patch introduces a new error code VIR_ERR_OPERATION_UNSUPPORTED to
mark error messages regarding operations that failed due to lack of
support on the hypervisor or other than libvirt issues.

The code is first used in reporting error if qemu does not support block
IO tuning variables yielding error message:
error: Unable to get block I/O throttle parameters
error: Operation not supported: block_io_throttle field
'total_bytes_sec' missing in qemu's output

instead of:
error: Unable to get block I/O throttle parameters
error: internal error cannot read total_bytes_sec

12 years agobuild: fix binary location in stap files --with-driver-modules
Laine Stump [Fri, 10 Aug 2012 21:14:21 +0000 (17:14 -0400)] 
build: fix binary location in stap files --with-driver-modules

libvirt_qemu_probes.stp stopped working after switching to a build
that used --with-driver-modules. This was because the symbols listed
int libvirt_qemu_probes.stp are no longer in $(bindir)/libvirtd, but
are now in $(libdir)/connection-driver/libvirt_driver_qemu.so.

This patch enhances dtrace2systemtap.pl (which generates the .stp
files from .d files) to look for a new "module" setting in the
comments of the .d file (similar to the existing "binary" setting),
and to look for a --with-modules option. If the --with-modules option
is set *and* a "module" setting is present in the .d file, the process
name for the stap line is set to

   $libdir/$module

If either of these isn't true, it reverts to the old behavior.

src/Makefile.am was also modified to add the --with-modules option
when the build calls for it, and src/libvirt_qemu_probes.d has added a
"module" line pointing to the correct .so file for the qemu driver.

12 years agodocs/virsh: various minor fixes
Martin Kletzander [Fri, 22 Jun 2012 13:16:44 +0000 (15:16 +0200)] 
docs/virsh: various minor fixes

List:
 - some old libvir/libvirt rename leftovers (the only problem can be
   if somebody parses 'virsh version' output really badly)
 - remove pointless tags specified in some pages that are not used

12 years agodocs: autogenerate search.php
Martin Kletzander [Wed, 1 Aug 2012 13:29:27 +0000 (15:29 +0200)] 
docs: autogenerate search.php

This patch makes search.php autogenerated from search.php.in, thus
removing hardcoded menus, footer etc. and the search.php is added to
.gitignore.

There is new rule added for *.php files (to make it bit less
hardcoded) that takes *.php.code.in and injects it inside the
generated *.php (xslt was not happy about php code in the source xml).

12 years agodocs: fix 404 page when fetched from different location
Martin Kletzander [Fri, 22 Jun 2012 13:21:18 +0000 (15:21 +0200)] 
docs: fix 404 page when fetched from different location

Error 404 page had relative paths specified for both the image and
stylesheets which caused a problem when requested URL included a
subfolder (e.g. http://libvirt.org/asdf/asdf ). This patch corrects
this behaviour by modifying href_base to '/' (for style-sheets) and
changing the src of the image (to be '/' always).

12 years agonwfilter: fix crash during filter define when lxc driver failed startup
Laine Stump [Thu, 9 Aug 2012 06:18:23 +0000 (02:18 -0400)] 
nwfilter: fix crash during filter define when lxc driver failed startup

The meat of this patch is just moving the calls to
virNWFilterRegisterCallbackDriver from each hypervisor's "register"
function into its "initialize" function. The rest is just code
movement to allow that, and a new virNWFilterUnRegisterCallbackDriver
function to undo what the register function does.

The long explanation:

There is an array in nwfilter called callbackDrvArray that has
pointers to a table of functions for each hypervisor driver that are
called by nwfilter. One of those function pointers is to a function
that will lock the hypervisor driver. Entries are added to the table
by calling each driver's "register" function, which happens quite
early in libvirtd's startup.

Sometime later, each driver's "initialize" function is called. This
function allocates a driver object and stores a pointer to it in a
static variable that was previously initialized to NULL. (and here's
the important part...) If the "initialize" function fails, the driver
object is freed, and that pointer set back to NULL (but the entry in
nwfilter's callbackDrvArray is still there).

When the "lock the driver" function mentioned above is called, it
assumes that the driver was successfully loaded, so it blindly tries
to call virMutexLock on "driver->lock".

BUT, if the initialize never happened, or if it failed, "driver" is
NULL. And it just happens that "lock" is always the first field in
driver so it is also NULL.

Boom.

To fix this, the call to virNWFilterRegisterCallbackDriver for each
driver shouldn't be called until the end of its (*already guaranteed
successful*) "initialize" function, not during its "register" function
(which is currently the case). This implies that there should also be
a virNWFilterUnregisterCallbackDriver() function that is called in a
driver's "shutdown" function (although in practice, that function is
currently never called).

12 years agobuild: fix PROBE() usage of intptr_t
Eric Blake [Thu, 9 Aug 2012 21:37:03 +0000 (15:37 -0600)] 
build: fix PROBE() usage of intptr_t

Otherwise, in locations like virobject.c where PROBE is used,
for certain configure options, the compiler warns:

util/virobject.c:110:1: error: 'intptr_t' undeclared (first use in this function)

As long as we are making this header always available, we can
clean up several other files.

* src/internal.h (includes): Pull in <stdint.h>.
* src/conf/nwfilter_conf.h: Rely on internal.h.
* src/storage/storage_backend.c: Likewise.
* src/storage/storage_backend.h: Likewise.
* src/util/cgroup.c: Likewise.
* src/util/sexpr.h: Likewise.
* src/util/virhashcode.h: Likewise.
* src/util/virnetdevvportprofile.h: Likewise.
* src/util/virnetlink.h: Likewise.
* src/util/virrandom.h: Likewise.
* src/vbox/vbox_driver.c: Likewise.
* src/xenapi/xenapi_driver.c: Likewise.
* src/xenapi/xenapi_utils.c: Likewise.
* src/xenapi/xenapi_utils.h: Likewise.
* src/xenxs/xenxs_private.h: Likewise.
* tests/storagebackendsheepdogtest.c: Likewise.

12 years agobuild: fix author of previous commit
Eric Blake [Thu, 9 Aug 2012 21:31:58 +0000 (15:31 -0600)] 
build: fix author of previous commit

Stefan's attribution came through with an extra 'n' in the email address.

12 years agoesx: Implement network driver
Matthias Bolte [Sun, 5 Aug 2012 20:11:50 +0000 (22:11 +0200)] 
esx: Implement network driver

An ESX server has one or more PhysicalNics that represent the actual
hardware NICs. Those can be listed via the interface driver.

A libvirt virtual network is mapped to a HostVirtualSwitch. On the
physical side a HostVirtualSwitch can be connected to PhysicalNics.
On the virtual side a HostVirtualSwitch has HostPortGroups that are
mapped to libvirt virtual network's portgroups. Typically there is
HostPortGroups named 'VM Network' that is used to connect virtual
machines to a HostVirtualSwitch. A second HostPortGroup typically
named 'Management Network' is used to connect the hypervisor itself
to the HostVirtualSwitch. This one is not mapped to a libvirt virtual
network's portgroup. There can be more HostPortGroups than those
typical two on a HostVirtualSwitch.

         +---------------+-------------------+
   ...---|               |                   |   +-------------+
         | HostPortGroup |                   |---| PhysicalNic |
         |   VM Network  |                   |   |    vmnic0   |
   ...---|               |                   |   +-------------+
         +---------------+ HostVirtualSwitch |
                         |     vSwitch0      |
         +---------------+                   |
         | HostPortGroup |                   |
   ...---|   Management  |                   |
         |    Network    |                   |
         +---------------+-------------------+

The virtual counterparts of the PhysicalNic is the HostVirtualNic for
the hypervisor and the VirtualEthernetCard for the virtual machines
that are grouped into HostPortGroups.

   +---------------------+   +---------------+---...
   | VirtualEthernetCard |---|               |
   +---------------------+   | HostPortGroup |
   +---------------------+   |   VM Network  |
   | VirtualEthernetCard |---|               |
   +---------------------+   +---------------+
                                             |
                             +---------------+
   +---------------------+   | HostPortGroup |
   |    HostVirtualNic   |---|   Management  |
   +---------------------+   |    Network    |
                             +---------------+---...

The currently implemented network driver can list, define and undefine
HostVirtualSwitches including HostPortGroups for virtual machines.
Existing HostVirtualSwitches cannot be edited yet. This will be added
in a followup patch.

12 years agoesx: Remove redundant checks for esxVI_LookupHostSystemProperties result
Matthias Bolte [Sun, 5 Aug 2012 11:47:05 +0000 (13:47 +0200)] 
esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.
Remove redundant NULL checks from callers.

Also prefer esxVI_GetStringValue over open-coding the logic.

12 years agoesx: Fix dynamic deep copy
Matthias Bolte [Sat, 4 Aug 2012 17:56:17 +0000 (19:56 +0200)] 
esx: Fix dynamic deep copy

The static deep copy allocates storage for the copy. The dynamic
version injected the dynamic dispatch after the allocation. This
triggered the invalid argument check in the dynamically dispatched
deep copy call. The deep copy function expects its dest parameter
to be a pointer to a NULL-pointer. This expectation wasn't met due
to the dispatching deep copy doing the allocation before the call.

Fix this by dynamically dispatching to the correct type before the
allocation.

12 years agoesx: Implement interface driver
Matthias Bolte [Sat, 4 Aug 2012 17:48:50 +0000 (19:48 +0200)] 
esx: Implement interface driver

Lists available PhysicalNic devices. A PhysicalNic is always active
and can neither be defined nor undefined.

A PhysicalNic is used to bridge a HostVirtualSwitch to the physical
network.

12 years agonwfilter: remove target table before renaming it
Stefan Berger [Thu, 9 Aug 2012 20:17:13 +0000 (16:17 -0400)] 
nwfilter: remove target table before renaming it

Remove the target table before renaming a table to it, i.e.,
remove table B before renaming A to B. This makes the
renaming more robust against unconnected left-over tables.

12 years agoAdd APIs for obtaining the unique ID of LVM & SCSI volumes
Daniel P. Berrange [Wed, 20 Jul 2011 09:40:53 +0000 (10:40 +0100)] 
Add APIs for obtaining the unique ID of LVM & SCSI volumes

Both LVM volumes and SCSI LUNs have a globally unique
identifier associated with them. It is useful to be able
to query this identifier to then perform disk locking,
rather than try to figure out a stable pathname.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Fix debug message in p2p migration
Jiri Denemark [Thu, 2 Aug 2012 10:11:20 +0000 (12:11 +0200)] 
qemu: Fix debug message in p2p migration

When entering "confirm" phase, we are interested in the value of
cancelled rather then ret variable which was interesting before "finish"
phase and didn't change since then.

12 years agoexamples: Update strings for event details
Jiri Denemark [Wed, 8 Aug 2012 14:17:31 +0000 (16:17 +0200)] 
examples: Update strings for event details

12 years agoqemu: Migrate at unlimited speed by default
Jiri Denemark [Fri, 3 Aug 2012 16:34:06 +0000 (18:34 +0200)] 
qemu: Migrate at unlimited speed by default

Previously, qemu did not respond to monitor commands during migration if
the limit was too high. This prevented us from raising the limit
earlier. The qemu issue seems to be fixed (according to my testing) and
we may remove the 32Mb/s limit.

12 years agoqemu: Refactor parsing of block device IO tuning parameters.
Peter Krempa [Thu, 9 Aug 2012 07:58:05 +0000 (09:58 +0200)] 
qemu: Refactor parsing of block device IO tuning parameters.

This patch refactors the JSON parsing function that extracts the block
IO tuning parameters from qemu's output. The most impacting change
concerns the error message that is returned if the reply from qemu does
not contain the needed data. The data for IO parameter tuning were added
in qemu 1.1 and the previous error message was confusing.

This patch also breaks long lines and extracts a multiple time used code
pattern to a macro.

12 years agoremote: Clean up coding style and refactor remote connection opening
Peter Krempa [Tue, 17 Jul 2012 12:25:34 +0000 (14:25 +0200)] 
remote: Clean up coding style and refactor remote connection opening

Remove spaces before function calls and some other coding nits in some
parts of the remote driver and refactor getting of URI argument
components into variables used by libvirt later on.

12 years agoAllow rbd backing stores
Peter Feiner [Wed, 8 Aug 2012 21:02:24 +0000 (17:02 -0400)] 
Allow rbd backing stores

Prevents libvirt from treating RBD backing stores as files. Without this
patch, creating a domain with a qcow2 overlay on an RBD would fail.

This patch essentially extends 9c7c4a4fc533598e59e9a0038ec783e61a38e664,
which allows nbd backing stores, to allow rbd backing stores.

12 years agoFix errno check, prevent spurious errors under heavy load
Peter Feiner [Wed, 8 Aug 2012 20:59:41 +0000 (16:59 -0400)] 
Fix errno check, prevent spurious errors under heavy load

From man poll(2), poll does not set errno=EAGAIN on interrupt, however
it does set errno=EINTR. Have libvirt retry on the appropriate errno.

Under heavy load, a program of mine kept getting libvirt errors 'poll on
socket failed: Interrupted system call'. The signals were SIGCHLD from
processes forked by threads unrelated to those using libvirt.

12 years agoqemu:rename qemuCheckScsiControllerModel function
Guannan Ren [Wed, 8 Aug 2012 15:13:23 +0000 (23:13 +0800)] 
qemu:rename qemuCheckScsiControllerModel function

13 years agorpc: fix a virObject typo error in struct _virNetServer
Guannan Ren [Wed, 8 Aug 2012 09:32:22 +0000 (17:32 +0800)] 
rpc: fix a virObject typo error in struct _virNetServer

This typo will crash libvirtd when it recevies signal SIGINT

13 years agoqemu: add two qemu caps for lsi and virtio-scsi SCSI controllers
Guannan Ren [Wed, 8 Aug 2012 07:06:33 +0000 (15:06 +0800)] 
qemu: add two qemu caps for lsi and virtio-scsi SCSI controllers

Rename qemuDefaultScsiControllerModel to qemuCheckScsiControllerModel.
When scsi model is given explicitly in XML(model > 0) checking if the
underlying QEMU supports it or not first, raise an error on checking
failure.
When the model is not given(mode <= 0), return LSI by default, if
the QEMU doesn't support it, raise an error.

13 years agoqemu: add capabilities flags related to scsi controller
Guannan Ren [Wed, 8 Aug 2012 06:25:24 +0000 (14:25 +0800)] 
qemu: add capabilities flags related to scsi controller

  QEMU_CAPS_SCSI_LSI
    set the flag when "lsi53c895a", bus PCI, alias "lsi" in
    the output of "qemu -device ?"
    -device lsi in qemu command line

  QEMU_CAPS_VIRTIO_SCSI_PCI
    set the flag when "name "virtio-scsi-pci", bus PCI" in
    the output of qemu devices query.
    -device virtio-scsi-pci in qemu command line

13 years agoutil: include stderr in log message when an external command fails
Laine Stump [Mon, 6 Aug 2012 15:40:06 +0000 (11:40 -0400)] 
util: include stderr in log message when an external command fails

This patch is in response to:

  https://bugzilla.redhat.com/show_bug.cgi?id=818467

If a caller to virCommandRun doesn't ask for the exitstatus of the
program it's running, the virCommand functions assume that they should
log an error message and return failure if the exit code isn't
0. However, only the commandline and exit status are logged, while
potentially useful information sent by the program to stderr is
discarded.

Fortunately, virCommandRun is already checking if the caller had asked
for stderr to be saved and, if not, sets things up to save it in
*cmd->errbuf. This makes it fairly simple for virCommandWait to
include *cmd->errbuf in the error log (there are still other callers
that don't setup errbuf, and even virCommandRun won't set it up if the
command is being daemonized, so we have to check that it's non-zero).

13 years agoSet LIBVIRT_AUTOSTART=0 when running test suites
Daniel P. Berrange [Tue, 7 Aug 2012 11:02:06 +0000 (12:02 +0100)] 
Set LIBVIRT_AUTOSTART=0 when running test suites

Occasionally some test cases will (accidentally) try to spawn
libvirtd. Set the LIBVIRT_AUTOSTART=0 environment variable to
ensure the remote driver never tries autostart.

13 years agoDon't check the 'connect' command in virsh-all test
Daniel P. Berrange [Tue, 7 Aug 2012 10:09:15 +0000 (11:09 +0100)] 
Don't check the 'connect' command in virsh-all test

The 'virsh-all' test case will invoke each virsh command with
no args. With the 'connect' command this causes virsh to try
to connect to the default URI, which in turn tries to spawn
libvirtd. This is not something we want todo in the test suite,
so skip the 'connect' command.

13 years agoTurn virNetClient* into virObject instances
Daniel P. Berrange [Mon, 30 Jul 2012 09:14:56 +0000 (10:14 +0100)] 
Turn virNetClient* into virObject instances

Make all the virNetClient* objects use virObject APIs for
reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virNetServer* into virObject instances
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:52 +0000 (14:35 +0100)] 
Turn virNetServer* into virObject instances

Make all the virNetServer* objects use the virObject APIs
for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virSocket into a virObject
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:51 +0000 (14:35 +0100)] 
Turn virSocket into a virObject

Make virSocket use the virObject APIs for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virKeepAlive into a virObject
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:50 +0000 (14:35 +0100)] 
Turn virKeepAlive into a virObject

Make virKeepAlive use the virObject APIs for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virNetSASLContext and virNetSASLSession into virObject instances
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:49 +0000 (14:35 +0100)] 
Turn virNetSASLContext and virNetSASLSession into virObject instances

Make virNetSASLContext and virNetSASLSession use virObject APIs
for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virNetTLSContext and virNetTLSSession into virObject instances
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:48 +0000 (14:35 +0100)] 
Turn virNetTLSContext and virNetTLSSession into virObject instances

Make virNetTLSContext and virNetTLSSession use the virObject
APIs for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn qemuAgentPtr and qemuMonitorPtr into virObjectPtr instances
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:47 +0000 (14:35 +0100)] 
Turn qemuAgentPtr and qemuMonitorPtr into virObjectPtr instances

Make qemuAgentPtr and qemuMonitorPtr types use the virObject APIs
for reference counting

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoTurn virDomainObjPtr into a virObjectPtr
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:46 +0000 (14:35 +0100)] 
Turn virDomainObjPtr into a virObjectPtr

Switch virDomainObjPtr to use the virObject APIs for reference
counting. The main change is that virObjectUnref does not return
the reference count, merely a bool indicating whether the object
still has any refs left. Checking the return value is also not
mandatory.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoConvert public datatypes to inherit from virObject
Daniel P. Berrange [Tue, 31 Jul 2012 16:55:36 +0000 (17:55 +0100)] 
Convert public datatypes to inherit from virObject

This converts the following public API datatypes to use the
virObject infrastructure:

  virConnectPtr
  virDomainPtr
  virDomainSnapshotPtr
  virInterfacePtr
  virNetworkPtr
  virNodeDevicePtr
  virNWFilterPtr
  virSecretPtr
  virStreamPtr
  virStorageVolPtr
  virStoragePoolPtr

The code is significantly simplified, since the mutex in the
virConnectPtr object now only needs to be held when accessing
the per-connection virError object instance. All other operations
are completely lock free.

* src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert
  public datatypes to use virObject
* src/conf/domain_event.c, src/phyp/phyp_driver.c,
  src/qemu/qemu_command.c, src/qemu/qemu_migration.c,
  src/qemu/qemu_process.c, src/storage/storage_driver.c,
  src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
  tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c,
  tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert
  to use virObjectUnref/virObjectRef

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoAdd a generic reference counted virObject type
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:44 +0000 (14:35 +0100)] 
Add a generic reference counted virObject type

This introduces a fairly basic reference counted virObject type
and an associated virClass type, that use atomic operations for
ref counting.

In a global initializer (recommended to be invoked using the
virOnceInit API), a virClass type must be allocated for each
object type. This requires a class name, a "dispose" callback
which will be invoked to free memory associated with the object's
fields, and the size in bytes of the object struct.

eg,

   virClassPtr  connclass = virClassNew("virConnect",
                                        sizeof(virConnect),
                                        virConnectDispose);

The struct for the object, must include 'virObject' as its
first member

eg

  struct _virConnect {
    virObject object;

    virURIPtr uri;
  };

The 'dispose' callback is only responsible for freeing
fields in the object, not the object itself. eg a suitable
impl for the above struct would be

  void virConnectDispose(void *obj) {
     virConnectPtr conn = obj;
     virURIFree(conn->uri);
  }

There is no need to reset fields to 'NULL' or '0' in the
dispose callback, since the entire object will be memset
to 0, and the klass pointer & magic integer fields will
be poisoned with 0xDEADBEEF before being free()d

When creating an instance of an object, one needs simply
pass the virClassPtr eg

   virConnectPtr conn = virObjectNew(connclass);
   if (!conn)
      return NULL;
   conn->uri = virURIParse("foo:///bar")

Object references can be manipulated with

   virObjectRef(conn)
   virObjectUnref(conn)

The latter returns a true value, if the object has been
freed (ie its ref count hit zero)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoapparmor: QEMU bridge helper policy updates
Richa Marwaha [Fri, 3 Aug 2012 20:33:07 +0000 (16:33 -0400)] 
apparmor: QEMU bridge helper policy updates

This patch provides AppArmor policy updates for the QEMU bridge helper.
The QEMU bridge helper is a SUID executable exec'd by QEMU that drops
capabilities to CAP_NET_ADMIN and adds a tap device to a network bridge.

Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
13 years agoAdd -netdev bridge support
Richa Marwaha [Fri, 3 Aug 2012 20:33:06 +0000 (16:33 -0400)] 
Add -netdev bridge support

This patch adds the support to run the QEMU network helper
under unprivileged user. It also adds the support for
attach-interface option in virsh to run under unprivileged
user.

Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
13 years agoAdd -netdev bridge capabilities
Richa Marwaha [Fri, 3 Aug 2012 20:33:05 +0000 (16:33 -0400)] 
Add -netdev bridge capabilities

This patch adds the capability in libvirt to check if
-netdev bridge option is supported or not.

Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
13 years agovirrandom: make virRandomInitialize an automatic one-shot
Eric Blake [Fri, 3 Aug 2012 23:15:00 +0000 (17:15 -0600)] 
virrandom: make virRandomInitialize an automatic one-shot

All callers used the same initialization seed (well, the new
viratomictest forgot to look at getpid()); so we might as well
make this value automatic.  And while it may feel like we are
giving up functionality, I documented how to get it back in the
unlikely case that you actually need to debug with a fixed
pseudo-random sequence.  I left that crippled by default, so
that a stray environment variable doesn't cause a lack of
randomness to become a security issue.

* src/util/virrandom.c (virRandomInitialize): Rename...
(virRandomOnceInit): ...and make static, with one-shot call.
Document how to do fixed-seed debugging.
* src/util/virrandom.h (virRandomInitialize): Drop prototype.
* src/libvirt_private.syms (virrandom.h): Don't export it.
* src/libvirt.c (virInitialize): Adjust caller.
* src/lxc/lxc_controller.c (main): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/util/iohelper.c (main): Likewise.
* tests/seclabeltest.c (main): Likewise.
* tests/testutils.c (virtTestMain): Likewise.
* tests/viratomictest.c (mymain): Likewise.

13 years agobuild: drop conditional use of mdns code
Eric Blake [Fri, 3 Aug 2012 19:16:42 +0000 (13:16 -0600)] 
build: drop conditional use of mdns code

Commit 1f6f723 missed a step.  At first I was worried that scrubbing
the conditionals would lead to a runtime failure when compiled without
avahi, but my testing makes it appear that the runtime error will only
occur if the .conf files in /etc request mdns advertisement; and the
old behavior was to silently ignore the request, so this is actually
a better behavior of only failing when the config requests the
impossible.

* src/rpc/virnetserver.c: Drop HAVE_AVAHI conditionals; all
callers already passed NULL if mdns_adv was not configured.

13 years agoqemu: Set reasonable RSS limit on domain startup
Michal Privoznik [Tue, 17 Jul 2012 16:38:47 +0000 (18:38 +0200)] 
qemu: Set reasonable RSS limit on domain startup

If there's a memory leak in qemu or qemu is exploited the host's
system will sooner or later start trashing instead of killing
the bad process. This however has impact on performance and other
guests as well. Therefore we should set a reasonable RSS limit
even when user hasn't set any. It's better to be secure by default.

13 years agovirsh: Use vshPrint instead of printf
Osier Yang [Fri, 3 Aug 2012 15:48:15 +0000 (23:48 +0800)] 
virsh: Use vshPrint instead of printf

13 years agoxen-xm: Generate UUID if not specified
Jim Fehlig [Fri, 3 Aug 2012 21:10:13 +0000 (15:10 -0600)] 
xen-xm: Generate UUID if not specified

Parsing xen-xm format configuration will fail if UUID is not
specified, e.g.

virsh domxml-from-native xen-xm some-config-without-uuid
error: internal error parsing xm config failed

Initially I thought to skip parsing the UUID in xenParseXM() when
not present in the configuration, but this results in a UUID of
all zeros since it is never set

virsh domxml-from-native xen-xm /tmp/jim/bug-773621_pierre-test
<domain type='xen'>
  <name>test</name>
  <uuid>00000000-0000-0000-0000-000000000000</uuid>
  ...

which certainly can't be correct since this is the UUID the xen
tools use for dom0.

This patch takes the approach of generating a UUID when it is not
specified in the configuration.

13 years agoconf: Remove console stream callback only when freeing console helper
Peter Krempa [Fri, 3 Aug 2012 09:20:29 +0000 (11:20 +0200)] 
conf: Remove console stream callback only when freeing console helper

Commit ba226d334acbc49f6751b430e0c4e00f69eef6bf tried to fix crash of
the daemon when a domain with an open console was destroyed. The fix was
wrong as it tried to remove the callback also when the stream was
aborted, where at that point the fd stream driver was already freed and
removed.

This patch clears the callbacks with a helper right before the hash is
freed, so that it doesn't interfere with other codepaths where the
stream object is freed.

13 years agoclient: Free message when freeing client
Peter Krempa [Fri, 3 Aug 2012 14:50:16 +0000 (16:50 +0200)] 
client: Free message when freeing client

The last message of the client was not freed leaking 4 bytes of memory
in the client when the remote daemon crashed while processing a message.

13 years agoESX: Add "Byte" datatype
Ata E Husain Bohra [Wed, 1 Aug 2012 22:15:11 +0000 (15:15 -0700)] 
ESX: Add "Byte" datatype

Append "Byte" to set of predefined datatype objects.

Signed-off-by: Ata E Husain Bohra <ata.husain@hotmail.com>
13 years agoparallels: translate error message
Eric Blake [Fri, 3 Aug 2012 16:22:08 +0000 (10:22 -0600)] 
parallels: translate error message

Without this patch, the English phrase 'no name' would appear
literally within the remaining translated message.

* src/parallels/parallels_driver.c (parallelsCreateVm)
(parallelsDomainDefineXML): Tweak error message.

13 years agobuild: fix "make rpm"
Laine Stump [Fri, 3 Aug 2012 04:47:38 +0000 (00:47 -0400)] 
build: fix "make rpm"

make rpm was failing with the following error:

Entering directory `/home/laine/devel/libvirt/tests'
make[2]: *** No rule to make target `viratomicdata.h',
             needed by `distdir'.  Stop.

viratomicdata.h is listed in tests/Makefile.am as a dependency of
viratomictest, but doesn't exist, is never referenced, and removing
that dependency permits make rpm to complete successfully.

13 years agoExport virUUIDIsValid to libvirt internal code
Daniel P. Berrange [Fri, 3 Aug 2012 13:00:21 +0000 (14:00 +0100)] 
Export virUUIDIsValid to libvirt internal code

13 years agoFix typo s/AM_CLFAGS/AM_CFLAGS/ in sanlock link
Daniel P. Berrange [Thu, 2 Aug 2012 19:10:13 +0000 (20:10 +0100)] 
Fix typo s/AM_CLFAGS/AM_CFLAGS/ in sanlock link

13 years agovirsh: console: Avoid using stream after being freed.
Peter Krempa [Fri, 3 Aug 2012 11:16:24 +0000 (13:16 +0200)] 
virsh: console: Avoid using stream after being freed.

The stream object wasn't set to NULL after freeing causing a double free
attempt on the cleanup path.

13 years agoremote: Fill snapshot argument in remoteDomainSnapshotListAllChildren
Peter Krempa [Fri, 3 Aug 2012 09:45:12 +0000 (11:45 +0200)] 
remote: Fill snapshot argument in remoteDomainSnapshotListAllChildren

The remote driver did not fill the required snapshot parent argument in
the RPC call structure that caused a client crash when trying to use
this new API.

13 years agoqemu: Allow to attach/detach controller device persistently
Osier Yang [Mon, 23 Jul 2012 08:18:57 +0000 (16:18 +0800)] 
qemu: Allow to attach/detach controller device persistently

* src/conf/domain_conf.c:
  - Add virDomainControllerFind to find controller device by type
    and index.
  - Add virDomainControllerRemove to remove the controller device
    from maintained controler list.

* src/conf/domain_conf.h:
  - Declare the two new helpers.

* src/libvirt_private.syms:
  - Expose private symbols for the two new helpers.

* src/qemu/qemu_driver.c:
  - Support attach/detach controller device persistently

* src/qemu/qemu_hotplug.c:
  - Use the two helpers to simplify the codes.

13 years agoAdded timestamps to storage volumes
Hendrik Schwartke [Wed, 25 Jul 2012 07:43:37 +0000 (09:43 +0200)] 
Added timestamps to storage volumes

The access, birth, modification and change times are added to
storage volumes and corresponding xml representations.  This
shows up in the XML in this format:

<timestamps>
  <atime>1341933637.027319099</atime>
  <mtime>1341933637.027319099</mtime>
</timestamps>

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agoUpdate xml schemas according to libvirt source
JĂ¡n Tomko [Thu, 2 Aug 2012 11:23:16 +0000 (13:23 +0200)] 
Update xml schemas according to libvirt source

capability.rng: Guest features can be in any order.
nodedev.rng: Added <driver> element, <capability> phys_function and
virt_functions for PCI devices.
storagepool.rng: Owner or group ID can be -1.

schema tests: New capabilities and nodedev files; changed owner and
group to -1 in pool-dir.xml.
storage_conf: Print uid_t and gid_t as signed to storage pool XML.

13 years agobuild: add stubs so mdns code can be unconditionally compiled
Eric Blake [Wed, 1 Aug 2012 23:42:51 +0000 (17:42 -0600)] 
build: add stubs so mdns code can be unconditionally compiled

The recent changes to the testsuite to validate exported symbols
flushed out a case of unconditionally exporting symbols that
were only conditionally compiled under HAVE_AVAHI.

* src/Makefile.am (libvirt_net_rpc_server_la_SOURCES): Compile
virnetservermdns unconditionally.
* configure.ac (HAVE_AVAHI): Drop unused automake conditional.
* src/rpc/virnetservermdns.c: Add fallbacks when Avahi is not
present.

13 years agovirsh: Switch to close callback
Michal Privoznik [Thu, 2 Aug 2012 17:15:16 +0000 (19:15 +0200)] 
virsh: Switch to close callback

Since we've introduced close callbacks we can drop this SIGINT magic
(which doesn't work now neither) and fully utilize the new feature.

13 years agoqemu: Fix typo in qemuDomainModifyDeviceFlags
Michal Privoznik [Thu, 2 Aug 2012 14:25:41 +0000 (16:25 +0200)] 
qemu: Fix typo in qemuDomainModifyDeviceFlags

One of our latest commits fbe87126 introduced this nasty typo:
func(vmdef, ...); where func() dereference vmdef->ncontrollers,
and vmdef was initialized to NULL. This leaves us with unconditional
immediate segfault. It should be vm->def instead.

13 years agodaemon: Portable auto-detection of driver module directory
Jiri Denemark [Thu, 2 Aug 2012 13:41:23 +0000 (15:41 +0200)] 
daemon: Portable auto-detection of driver module directory

When running libvirtd from a build directory on a system with unmodified
libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for
"/daemon/.libs/libvirtd" in addition to "lt-libvirtd".

13 years agobuild: Rename security manager library
Jiri Denemark [Thu, 2 Aug 2012 10:25:51 +0000 (12:25 +0200)] 
build: Rename security manager library

Security manager is not a dynamically loadable driver. Let's avoid the
confusion by renaming libvirt_driver_security library as
libvirt_security_manager.

13 years agobuild: Link security manager into libvirt.so
Jiri Denemark [Thu, 2 Aug 2012 12:10:31 +0000 (14:10 +0200)] 
build: Link security manager into libvirt.so

Security manager is not a dynamically loadable driver, it's a common
infrastructure similar to util, conf, cpu, etc. used by individual
drivers. Such code is allowed to be linked into libvirt.so.

This reverts commit ec5b7bd2ecbf40ceff5b2d4fc00d5cfdfba966a4 and most of
aae5cfb69948fddef556f8f5b9f80a444f9c6125.

This patch is supposed to fix virdrivermoduletest failures for qemu and
lxc drivers as well as libvirtd's ability to load qemu and lxc drivers.

13 years agoAvoid clash of base64 symbols
Daniel P. Berrange [Thu, 2 Aug 2012 13:21:00 +0000 (14:21 +0100)] 
Avoid clash of base64 symbols

On Debian/Ubuntu, one of the libraries libvirt (indirectly) links
with exports a symbol named 'base64_encode'. This takes precedence
over GNULIB's base64_encode function during linking. Unfortunately
they of course have different API semantics. To avoid this problem
use a few #defines in config.h to rename the GNULIB provided
function to have a 'libvirt_gl_' prefix

13 years agobuild: commit to 0.10.0 release naming
Eric Blake [Wed, 1 Aug 2012 17:00:35 +0000 (11:00 -0600)] 
build: commit to 0.10.0 release naming

With 0.10.0-rc0 out the door, we are committed to the next version
number.

* src/libvirt_public.syms (LIBVIRT_0.9.14): Rename...
(LIBVIRT_0.10.0): ...to this.
* docs/formatdomain.html.in: Fix fallout.
* src/openvz/openvz_driver.c (openvzDriver): Likewise.
* src/remote/remote_driver.c (remote_driver): Likewise.

13 years agoRemove unused uuidstr variable from datatypes.c
Daniel P. Berrange [Tue, 31 Jul 2012 16:55:02 +0000 (17:55 +0100)] 
Remove unused uuidstr variable from datatypes.c

Several APIs in src/datatypes.c were formatting an UUID to a
uuidstr variable and then not using it.

13 years agoRewrite virAtomic APIs using GLib's atomic ops code
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:43 +0000 (14:35 +0100)] 
Rewrite virAtomic APIs using GLib's atomic ops code

There are a few issues with the current virAtomic APIs

 - They require use of a virAtomicInt struct instead of a plain
   int type
 - Several of the methods do not implement memory barriers
 - The methods do not implement compiler re-ordering barriers
 - There is no Win32 native impl

The GLib library has a nice LGPLv2+ licensed impl of atomic
ops that works with GCC, Win32, or pthreads.h that addresses
all these problems. The main downside to their code is that
the pthreads impl uses a single global mutex, instead of
a per-variable mutex. Given that it does have a Win32 impl
though, we don't expect anyone to seriously use the pthread.h
impl, so this downside is not significant.

* .gitignore: Ignore test case
* configure.ac: Check for which atomic ops impl to use
* src/Makefile.am: Add viratomic.c
* src/nwfilter/nwfilter_dhcpsnoop.c: Switch to new atomic
  ops APIs and plain int datatype
* src/util/viratomic.h: inline impls of all atomic ops
  for GCC, Win32 and pthreads
* src/util/viratomic.c: Global pthreads mutex for atomic
  ops
* tests/viratomictest.c: Test validate to validate safety
  of atomic ops.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoRemove manual one-shot global initializers
Daniel P. Berrange [Wed, 11 Jul 2012 13:35:42 +0000 (14:35 +0100)] 
Remove manual one-shot global initializers

Remove the use of a manually run virLogStartup and
virNodeSuspendInitialize methods. Instead make sure they
are automatically run using VIR_ONCE_GLOBAL_INIT

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
13 years agoqemu: Add support for "none" USB controller
Peter Krempa [Tue, 3 Jul 2012 13:43:13 +0000 (15:43 +0200)] 
qemu: Add support for "none" USB controller

This patch enables the "none" USB controller for qemu guests and adds
valdiation on hot-plugged devices if the guest has USB disabled.

This patch also adds a set of tests to check parsing of domain XMLs that
use the "none" controller and some forbidden situations concerning it.

13 years agodomain_conf: Add helpers to verify if device configuration is valid
Peter Krempa [Tue, 3 Jul 2012 13:30:25 +0000 (15:30 +0200)] 
domain_conf: Add helpers to verify if device configuration is valid

This patch adds helpers that validate domain's device configuration.
This will be needed later on to verify devices being hot-plugged to
guests. If the guest has no USB bus, then it's not valid to plug a USB
device to that guest.

13 years agodomain_conf: Add USB controler model "none"
Peter Krempa [Mon, 2 Jul 2012 15:28:43 +0000 (17:28 +0200)] 
domain_conf: Add USB controler model "none"

Libvirt adds a USB controller to the guest even if the user does not
specify any in the XML. This is due to back-compat reasons.

To allow disabling USB for a guest this patch adds a new USB controller
type "none" that disables USB support for the guest.

13 years agoFix indentions
Osier Yang [Fri, 20 Jul 2012 14:24:51 +0000 (22:24 +0800)] 
Fix indentions

Some of the macros use tab, while the left use spaces, this patch
change it to always use the spaces. And a few aligning fixes.

13 years agostorage: netfs and iscsi need option srcSpec for resource discovery
Guannan Ren [Tue, 31 Jul 2012 08:56:41 +0000 (16:56 +0800)] 
storage: netfs and iscsi need option srcSpec for resource discovery

The option 'srcSpec' to virsh command find-storage-pool-sources
is optional for logical type of storage pool, but mandatory for
netfs and iscsi type.
When missing the option for netfs and iscsi, libvirt reports XML
parsing error due to null string option srcSpec.

before
error: Failed to find any netfs pool sources
error: (storage_source_specification):1: Document is empty
(null)

after:
error: pool type 'iscsi' requires option --srcSpec for source discovery

13 years agomaint: consolidate AUTHOR listings for Gerd von Egidy
Gerd v. Egidy [Mon, 30 Jul 2012 08:42:59 +0000 (10:42 +0200)] 
maint: consolidate AUTHOR listings for Gerd von Egidy

13 years agogitignore: Reorder alphabetically
Michal Privoznik [Wed, 1 Aug 2012 11:40:56 +0000 (13:40 +0200)] 
gitignore: Reorder alphabetically

One of our latest patches added some files to .gitignore. However,
not in the right place leaving the file not sorted. Since my git
is set up to sort these files contents, fix this issue as it keeps
showing up in git status.

13 years agospec: Remove extra () with return statement
Jiri Denemark [Wed, 1 Aug 2012 11:09:57 +0000 (13:09 +0200)] 
spec: Remove extra () with return statement

13 years agobuild: Link security driver into daemon
Jiri Denemark [Wed, 1 Aug 2012 07:59:43 +0000 (09:59 +0200)] 
build: Link security driver into daemon

Commit aae5cfb69948fddef556f8f5b9f80a444f9c6125 removed security driver
from libvirt_la but forgot to link it into libvirtd in case libvirt is
built without modules.

13 years agoFix rpm build failures v0.10.0-rc0
Daniel Veillard [Wed, 1 Aug 2012 08:10:36 +0000 (16:10 +0800)] 
Fix rpm build failures

The 'make check' was rebuilding the binaries just overrided,
so for more safety also override the C program
Also daemon-conf isn't built anymore so remove it from the list

13 years agoAdd missing parallels_utils.h to Makefile.am
Daniel Veillard [Wed, 1 Aug 2012 06:12:09 +0000 (14:12 +0800)] 
Add missing parallels_utils.h to Makefile.am

Otherwise the file is missing from the dist tarball and distcheck fails

13 years agoparallels: implement VM creation
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:13 +0000 (22:56 +0400)] 
parallels: implement VM creation

To create a new VM in Parallels Clud Server we should issue
"prlctl create" command, and give path to the directory,
where VM should be created. VM's storage will be in that
directory later. So in this first version find out location
of first VM's hard disk and create VM there.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: add storage driver
Dmitry Guryanov [Wed, 1 Aug 2012 03:46:22 +0000 (11:46 +0800)] 
parallels: add storage driver

Parallels Cloud Server has one serious discrepancy with libvirt:
libvirt stores domain configuration files in one place, and storage
files in other places (with the API of storage pools and storage volumes).
Parallels Cloud Server stores all domain data in a single directory,
for example, you may have domain with name fedora-15, which will be
located in '/var/parallels/fedora-15.pvm', and it's hard disk image will be
in '/var/parallels/fedora-15.pvm/harddisk1.hdd'.

I've decided to create storage driver, which produces pseudo-volumes
(xml files with volume description), and they will be 'converted' to
real disk images after attaching to a VM.

So if someone creates VM with one hard disk using virt-manager,
at first virt-manager creates a new volume, and then defines a
domain. We can lookup a volume by path in XML domain definition
and find out location of new domain and size of its hard disk.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: implement virDomainDefineXML operation for existing domains
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:11 +0000 (22:56 +0400)] 
parallels: implement virDomainDefineXML operation for existing domains

Add parallelsDomainDefineXML function, it works only for existing
domains for the present.

It's too hard to convert libvirt's XML domain configuration into
Parallel's one, so I've decided to compare virDomainDef structures:
current domain definition and the one created from XML, given to
the function. And change only different parameters.

Currently only name, description, number of cpus, memory amount
and video memory can be changed.

Video device and console added, because libvirt supposes that
VM must always have one video device, if there are some
graphics and one console.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: add support of VNC remote display
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:10 +0000 (22:56 +0400)] 
parallels: add support of VNC remote display

Add support for reading VNC parameters of the VM.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: get info about serial ports
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:09 +0000 (22:56 +0400)] 
parallels: get info about serial ports

Add support of collecting information about serial
ports. This change is needed mostly as an example,
support of other devices will be added later.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: implement functions for domain life cycle management
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:08 +0000 (22:56 +0400)] 
parallels: implement functions for domain life cycle management

Add functions for create/shutdown/destroy and suspend/resume domain.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: add functions to list domains and get info
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:07 +0000 (22:56 +0400)] 
parallels: add functions to list domains and get info

Parallels driver is 'stateless', like vmware or openvz drivers.
It collects information about domains during startup using
command-line utility prlctl. VMs in Parallels are identified by UUIDs
or unique names, which can be used as respective fields in
virDomainDef structure. Currently only basic info, like
description, virtual cpus number and memory amount, is implemented.
Querying devices information will be added in the next patches.

Parallels doesn't support non-persistent domains - you can't run
a domain having only disk image, it must always be registered
in system.

Functions for querying domain info have been just copied from
test driver with some changes - they extract needed data from
previously created list of virDomainObj objects.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoadd function virCommandNewVAList
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:06 +0000 (22:56 +0400)] 
add function virCommandNewVAList

Add function virCommandNewVAList which is equivalent to the
virCommandNewArgList but with va_list instead of a variable number
of arguments.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoparallels: add driver skeleton
Dmitry Guryanov [Tue, 31 Jul 2012 18:56:05 +0000 (22:56 +0400)] 
parallels: add driver skeleton

Parallels Cloud Server is a cloud-ready virtualization
solution that allows users to simultaneously run multiple virtual
machines and containers on the same physical server.

More information can be found here: http://www.parallels.com/products/pcs/
Also beta version of Parallels Cloud Server can be downloaded there.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
13 years agoqemu: syntax fix
Marc-AndrĂ© Lureau [Tue, 31 Jul 2012 17:51:41 +0000 (19:51 +0200)] 
qemu: syntax fix

Pushed without ack, under the trivial rule.

13 years agoOnly perform symbol check against libvirt.so
Daniel P. Berrange [Tue, 31 Jul 2012 10:03:24 +0000 (11:03 +0100)] 
Only perform symbol check against libvirt.so

The 'check-symfile' test case was checking the contents of
libvirt.syms against libvirt.so + all of libvirt_driver_XXX.so
This was in fact bogus - libvirt.syms should only refer to
stuff in libvirt.so, but it had some symbols from the various
driver modules in it too. Now that libvirt.syms has been
fixed, the check-symfile test can be simplified to only
consider libvirt.so

13 years agoDon't link nwfilter or secrets driver to libvirt.so
Daniel P. Berrange [Tue, 31 Jul 2012 09:57:10 +0000 (10:57 +0100)] 
Don't link nwfilter or secrets driver to libvirt.so

The nwfilter and secrets drivers are both stateful and are already
linked directly to libvirtd. Linking them to libvirt.so is thus
wrong, likewise exporting their symbols in libvirt.so is wrong

13 years agoRemove bogus libvirt_network.syms file
Daniel P. Berrange [Tue, 31 Jul 2012 09:56:11 +0000 (10:56 +0100)] 
Remove bogus libvirt_network.syms file

The network driver is stateful, so it is linked directly to libvirtd,
rather than libvirt.so. Thus there are no network symbols to be exported
in libvirt.so, and libvirt_network.syms can be deleted

13 years agoqemu: fix use after free
Eric Blake [Tue, 31 Jul 2012 14:05:14 +0000 (08:05 -0600)] 
qemu: fix use after free

Detected by Coverity.

* src/qemu/qemu_hotplug.c (qemuDomainAttachHostDevice): Avoid
double free of usb on failure.

13 years agobuild: Don't export xenLinuxDomainBlockStats symbol
Jiri Denemark [Tue, 31 Jul 2012 08:04:13 +0000 (10:04 +0200)] 
build: Don't export xenLinuxDomainBlockStats symbol

The symbol is only used within Xen driver.

13 years agobuild: distribute virsh related source files
Guannan Ren [Tue, 31 Jul 2012 03:52:13 +0000 (11:52 +0800)] 
build: distribute virsh related source files

In virsh.c, it includes multiple virsh source files, we need
to have them distributed.

13 years agobuild: fix build without HAVE_CAPNG
Eric Blake [Mon, 30 Jul 2012 17:59:25 +0000 (11:59 -0600)] 
build: fix build without HAVE_CAPNG

Otherwise, a build may fail with:

lxc/lxc_conatiner.c: In function 'lxcContainerDropCapabilities':
lxc/lxc_container.c:1662:46: error: unused parameter 'keepReboot' [-Werror=unused-parameter]

* src/lxc/lxc_container.c (lxcContainerDropCapabilities): Mark
parameter unused.