1. 14 12月, 2012 5 次提交
  2. 13 12月, 2012 7 次提交
  3. 12 12月, 2012 1 次提交
  4. 11 12月, 2012 1 次提交
    • D
      parallels: add network driver · 6034ce31
      Dmitry Guryanov 提交于
      Parallels Cloud Server uses virtual networks model for network
      configuration. It uses own tools for virtual network management.
      So add network driver, which will be responsible for listing
      virtual networks and performing different operations on them
      (in consequent patched).
      
      This patch only allows listing virtual network names, without
      any parameters like DHCP server settings.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      6034ce31
  5. 05 12月, 2012 1 次提交
    • B
      implement managedsave in libvirt xen legacy driver · 501bfad1
      Bamvor Jian Zhang 提交于
      Implement the domainManagedSave, domainHasManagedSaveImage, and
      domainManagedSaveRemove functions in the libvirt legacy xen driver.
      
      domainHasManagedSaveImage check the managedsave image from filesystem
      everytime. This is different from qemu and libxl driver. In qemu or
      libxl driver, there is a hasManagesSave flag in virDomainObjPtr which
      is not used in xen legacy driver. This flag could not add into xen
      driver ptr either, because the driver ptr will be released at the end of
      every libvirt api call. Meanwhile, AFAIK, xen store all the flags in
      xen not in libvirt xen driver. There is no need to add this flag in xen.
      Signed-off-by: NBamvor Jian Zhang <bjzhang@suse.com>
      501bfad1
  6. 04 12月, 2012 2 次提交
    • D
      Replace polling for active VMs with signalling by drivers · 79b8a569
      Daniel P. Berrange 提交于
      Currently to deal with auto-shutdown libvirtd must periodically
      poll all stateful drivers. Thus sucks because it requires
      acquiring both the driver lock and locks on every single virtual
      machine. Instead pass in a "inhibit" callback to virStateInitialize
      which drivers can invoke whenever they want to inhibit shutdown
      due to existance of active VMs.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      79b8a569
    • A
      Add iSCSI backend storage driver for ESX · 60f0f55e
      Ata E Husain Bohra 提交于
      The patch adds the backend driver to support iSCSI format storage pools
      and volumes for ESX host. The mapping of ESX iSCSI specifics to Libvirt
      is as follows:
      
      1. ESX static iSCSI target <------> Libvirt Storage Pools
      2. ESX iSCSI LUNs          <------> Libvirt Storage Volumes.
      
      The above understanding is based on http://libvirt.org/storage.html.
      
      The operation supported on iSCSI pools includes:
      
      1. List storage pools & volumes.
      2. Get XML descriptor operaion on pools & volumes.
      3. Lookup operation on pools & volumes by name, UUID and path (if applicable).
      
      iSCSI pools does not support operations such as: Create / remove pools
      and volumes.
      60f0f55e
  7. 01 12月, 2012 2 次提交
  8. 28 11月, 2012 1 次提交
    • G
      add fuse support for libvirt lxc · 2a596dac
      Gao feng 提交于
      this patch addes fuse support for libvirt lxc.
      we can use fuse filesystem to generate sysinfo dynamically,
      So we can isolate /proc/meminfo,cpuinfo and so on through
      fuse filesystem.
      
      we mount fuse filesystem for every container.
      the mount name is libvirt,mount point is
      localstatedir/run/libvirt/lxc/containername.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      2a596dac
  9. 27 11月, 2012 1 次提交
    • A
      Refactor ESX storage driver to implement facade pattern · 067e83eb
      Ata E Husain Bohra 提交于
      The patch refactors the current ESX storage driver due to following reasons:
      
      1. Given most of the public APIs exposed by the storage driver in Libvirt
      remains same, ESX storage driver should not implement logic specific
      for only one supported format (current implementation only supports VMFS).
      2. Decoupling interface from specific storage implementation gives us an
      extensible design to hook implementation for other supported storage
      formats.
      
      This patch refactors the current driver to implement it as a facade pattern i.e.
      the driver exposes all the public libvirt APIs, but uses backend drivers to get
      the required task done. The backend drivers provide implementation specific to
      the type of storage device.
      
      File changes:
      ------------------
      esx_storage_driver.c ----> esx_storage_driver.c (base storage driver)
                           |
                           |---> esx_storage_backend_vmfs.c (VMFS backend)
      067e83eb
  10. 30 10月, 2012 1 次提交
    • E
      build: fix linking with systemtap probes · a047a24d
      Eric Blake 提交于
      Commit 34e8f63a altered virfile.o to drag in additional symbols,
      which in turn led to pulling in other .o files and eventually causing
      a link failure when systemtap probes are enabled, such as:
      
      ./.libs/libvirt_util.a(libvirt_util_la-event_poll.o): In function `virEventPollRunOnce':
      /home/dummy/libvirt/src/util/event_poll.c:614: undefined reference to `libvirt_event_poll_run_semaphore'
      ./.libs/libvirt_util.a(libvirt_util_la-event_poll.o):(.note.stapsdt+0x24): undefined reference to `libvirt_event_poll_add_handle_semaphore'
      
      Even though libvirt_iohelper and libvirt_parthelper don't directly
      use the portion of virfile.o that drags in probing, it was easier
      to satisfy the linker and get the build back up, than to figure out
      whether it is even possible or worth trying to disentangle the mess.
      
      * src/Makefile.am (libvirt_iohelper_LDADD)
      (libvirt_parthelper_LDADD): Use libvirt_probes.lo when needed.
      a047a24d
  11. 18 10月, 2012 1 次提交
  12. 16 10月, 2012 1 次提交
    • D
      Introduce an internal API for handling file based lockspaces · eca72d47
      Daniel P. Berrange 提交于
      The previously introduced virFile{Lock,Unlock} APIs provide a
      way to acquire/release fcntl() locks on individual files. For
      unknown reason though, the POSIX spec says that fcntl() locks
      are released when *any* file handle referring to the same path
      is closed. In the following sequence
      
        threadA: fd1 = open("foo")
        threadB: fd2 = open("foo")
        threadA: virFileLock(fd1)
        threadB: virFileLock(fd2)
        threadB: close(fd2)
      
      you'd expect threadA to come out holding a lock on 'foo', and
      indeed it does hold a lock for a very short time. Unfortunately
      when threadB does close(fd2) this releases the lock associated
      with fd1. For the current libvirt use case for virFileLock -
      pidfiles - this doesn't matter since the lock is acquired
      at startup while single threaded an never released until
      exit.
      
      To provide a more generally useful API though, it is necessary
      to introduce a slightly higher level abstraction, which is to
      be referred to as a "lockspace".  This is to be provided by
      a virLockSpacePtr object in src/util/virlockspace.{c,h}. The
      core idea is that the lockspace keeps track of what files are
      already open+locked. This means that when a 2nd thread comes
      along and tries to acquire a lock, it doesn't end up opening
      and closing a new FD. The lockspace just checks the current
      list of held locks and immediately returns VIR_ERR_RESOURCE_BUSY.
      
      NB, the API as it stands is designed on the basis that the
      files being locked are not being otherwise opened and used
      by the application code. One approach to using this API is to
      acquire locks based on a hash of the filepath.
      
      eg to lock /var/lib/libvirt/images/foo.img the application
      might do
      
         virLockSpacePtr lockspace = virLockSpaceNew("/var/lib/libvirt/imagelocks");
         lockname = md5sum("/var/lib/libvirt/images/foo.img");
         virLockSpaceAcquireLock(lockspace, lockname);
      
      NB, in this example, the caller should ensure that the path
      is canonicalized before calculating the checksum.
      
      It is also possible to do locks directly on resources by
      using a NULL lockspace directory and then using the file
      path as the lock name eg
      
         virLockSpacePtr lockspace = virLockSpaceNew(NULL);
         virLockSpaceAcquireLock(lockspace, "/var/lib/libvirt/images/foo.img");
      
      This is only safe to do though if no other part of the process
      will be opening the files. This will be the case when this
      code is used inside the soon-to-be-reposted virlockd daemon
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eca72d47
  13. 11 10月, 2012 2 次提交
    • J
      locking: Implement lock failure action in sanlock driver · 89364767
      Jiri Denemark 提交于
      While the changes to sanlock driver should be stable, the actual
      implementation of sanlock_helper is supposed to be replaced in the
      future. However, before we can implement a better sanlock_helper, we
      need an administrative interface to libvirtd so that the helper can just
      pass a "leases lost" event to the particular libvirt driver and
      everything else will be taken care of internally. This approach will
      also allow libvirt to pass such event to applications and use
      appropriate reasons when changing domain states.
      
      The temporary implementation handles all actions directly by calling
      appropriate libvirt APIs (which among other things means that it needs
      to know the credentials required to connect to libvirtd).
      89364767
    • J
      locking: Add support for lock failure action · 297c704a
      Jiri Denemark 提交于
      297c704a
  14. 09 10月, 2012 2 次提交
    • D
      interface: always build all available backends · 43dbcb15
      Doug Goldstein 提交于
      Always build all available backends to avoid bit-rot. At run time we
      select the correct backend and load it by attempting netcf first and
      then udev.
      43dbcb15
    • D
      interface: add udev based backend for virInterface · 5a33366f
      Doug Goldstein 提交于
      Add a read-only udev based backend for virInterface. Useful for distros
      that do not have netcf support yet. Multiple libvirt based utilities use
      a HAL based fallback when virInterface is not available which is less
      than ideal. This implements:
      * virConnectNumOfInterfaces()
      * virConnectListInterfaces()
      * virConnectNumOfDefinedInterfaces()
      * virConnectListDefinedInterfaces()
      * virConnectListAllInterfaces()
      * virConnectInterfaceLookupByName()
      * virConnectInterfaceLookupByMACString()
      5a33366f
  15. 05 10月, 2012 2 次提交
    • E
      build: fix VPATH builds · a86c039d
      Eric Blake 提交于
      This reverts part of commit 5468594f; the perl changes in that
      patch were sufficient.  Since libvirt.syms is already a generated
      file created in part from libvirt_private.syms, we don't need a
      second pass over libvirt_private.syms in isolation.
      
      * src/Makefile.am: Undo addition of check-private-symfile.
      a86c039d
    • M
      Check for private symbols presence as well · 5468594f
      Michal Privoznik 提交于
      Currently, we are checking if libvirt.so contains public symbols.
      However, sometimes we rename an internal symbol and forget to
      change libvirt_private.syms accordingly. Hence, it's safer to check
      for internal symbols as well.
      5468594f
  16. 26 9月, 2012 1 次提交
  17. 19 9月, 2012 1 次提交
    • D
      build: define WITH_INTERFACE for the driver · b95ad92e
      Doug Goldstein 提交于
      Based exclusively on work by Eric Blake in a patch posted with the same
      subject. However some modifications related to comments and my plans to
      add another backend.
      
      Added WITH_INTERFACE as the only automake variable deciding whether to
      build the driver and using WITH_NETCF to identify that we're wanting to
      use the netcf library as the backend.
      
      * configure.ac: Added with_interface
      * src/interface/netcf_driver.c: Renamed..
      * src/interface/interface_backend_netcf.c: ..to this to match storage.
      * src/interface/netcf_driver.h: Renamed..
      * src/interface/interface_driver.h: ..to this.
      * daemon/Makefile.am: Respect WITH_INTERFACE and WITH_NETCF.
      * libvirt.spec.in: Add RPM support for --with-interface
      b95ad92e
  18. 06 9月, 2012 1 次提交
    • E
      build: avoid check-symfile on non-Linux · ae94cf2d
      Eric Blake 提交于
      I tested both OpenBSD and cygwin; both failed 'make check' with:
      
        GEN    check-symfile
      Can't return outside a subroutine at ./check-symfile.pl line 13.
      
      Perl requires 'exit 77' instead of 'return 77' in that context,
      but even with that tweak, the build still fails, since the exit
      code of 77 is only special to explicit TESTS=foo listings, and
      not to make-only dependency rules where we are not going through
      automake's test framework.
      
      * src/check-symfile.pl: Kill bogus platform check...
      * src/Makefile.am (check-symfile): ...and replace with an automake
      conditional.
      ae94cf2d
  19. 05 9月, 2012 1 次提交
    • E
      build: use correct libraries for clock_gettime · d74e5a4d
      Eric Blake 提交于
      On OpenBSD, clock_gettime() exists in libc rather than librt, and
      blindly linking with -lrt made the build fail.  Gnulib already
      did the work for determining which libraries to use, so we should
      reuse that work rather than doing it ourselves.
      
      * bootstrap.conf (gnulib_modules): Pull in clock-time.
      * configure.ac (RT_LIBS): Drop.
      * src/Makefile.am (libvirt_util_la_LIBADD): Use gnulib variable
      instead.
      * src/util/virtime.c (includes): Simplify.
      d74e5a4d
  20. 26 8月, 2012 1 次提交
    • L
      build: add LIBNL_CFLAGS to build of libvirt_lxc · 9cb9cbee
      Laine Stump 提交于
      When libvirt_lxc is built, it uses the utility library and #includes
      virnetdev.h, which #includes virnetlink.h, which includes
      <netlink/msg.h>.
      
      Normally, the netlink include directory would be just off
      /usr/include, so that wouldn't create a problem, but on Fedora and
      RHEL systems using libnl3, the libnl includes have been moved into
      /usr/include/libnl3 (to allow concurrent installation of libnl-1.1).
      
      All other binaries that need it have added $(LIBNL_CFLAGS) to their
      CFLAGS, but not libvirt_lxc, so it fails to build on Fedora and RHEL
      that have only libnl3-devel installed. This was previously unnoticed
      because everyone was building with libnl headers in
      /usr/include/netlink (even on systems with the headers in
      /usr/include/libnl3/netlink, many people (like me) usually also have
      the libnl1.1 headers in /usr/include/netlink).
      
      This patch adds the necessary CFLAGS for libvirt_lxc.
      
      Note that we don't need to add $(LIBNL_LIBS) to the LDADD for this
      binary, because it never directly calls libnl functions, but only
      calls them indirectly through the util library, which it's already
      linking against.
      9cb9cbee
  21. 24 8月, 2012 1 次提交
    • E
      snapshot: split snapshot conf code into own file · 6478ec16
      Eric Blake 提交于
      This has several benefits:
      1. Future snapshot-related code has a definite place to go (and I
      _will_ be adding some)
      2. Snapshot errors now use the VIR_FROM_DOMAIN_SNAPSHOT error
      classification, which has been underutilized (previously only in
      libvirt.c)
      
      * src/conf/domain_conf.h, domain_conf.c: Split...
      * src/conf/snapshot_conf.h, snapshot_conf.c: ...into new files.
      * src/Makefile.am (DOMAIN_CONF_SOURCES): Build new files.
      * po/POTFILES.in: Mark new file for translation.
      * src/vbox/vbox_tmpl.c: Update caller.
      * src/esx/esx_driver.c: Likewise.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_domain.h: Likewise.
      6478ec16
  22. 22 8月, 2012 4 次提交
    • D
      Fix typo in Makefile.am s/LDFOAGS/LDFLAGS/ · 66473616
      Daniel P. Berrange 提交于
      66473616
    • E
      build: avoid $(builddir) in Makefile · 4fce1c43
      Eric Blake 提交于
      Older automake 1.9.6 (hello there, RHEL 5) did not populate
      $(builddir), which meant 'make check' failed with:
      
      make[3]: *** No rule to make target `/.libs/libvirt.la', needed by `check-symfile'.  Stop.
      
      For that matter, even newer automake doesn't directly emit rules
      to build .libs/libvirt.la; we are better off basing our rules
      on the public ./libvirt.la.
      
      * src/Makefile.am (check-symfile): Delete useless variable.
      4fce1c43
    • E
      build: network requires location of dbus headers · f97d02d7
      Eric Blake 提交于
      Without this patch, RHEL 5 fails to compile, since the dbus
      files lives under /usr/include/dbus-1.0/dbus/dbus.h, and
      DBUS_CFLAGS contains -I/usr/include/dbus-1.0.
      
      In file included from network/bridge_driver.c:67:
      ../src/util/virdbus.h:26:25: error: dbus/dbus.h: No such file or directory
      
      * src/Makefile.am (libvirt_driver_network_impl_la_CFLAGS): Add
      DBUS_CFLAGS.
      f97d02d7
    • S
      nwfilter: provide basic support for firewalld · 4efde75f
      Stefan Berger 提交于
      This patch provides basic support for using firewalld's firewall-cmd
      rather than then plain eb/ip(6)tables commands.
      4efde75f