1. 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
  2. 22 8月, 2012 5 次提交
    • 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
    • T
      network: use firewalld instead of iptables, when available · bf156385
      Thomas Woerner 提交于
      * configure.ac, spec file: firewalld defaults to enabled if dbus is
        available, otherwise is disabled. If --with_firewalld is explicitly
        requested and dbus is not available, configure will fail.
      
      * bridge_driver: add dbus filters to get the FirewallD1.Reloaded
        signal and DBus.NameOwnerChanged on org.fedoraproject.FirewallD1.
        When these are encountered, reload all the iptables reuls of all
        libvirt's virtual networks (similar to what happens when libvirtd is
        restarted).
      
      * iptables, ebtables: use firewall-cmd's direct passthrough interface
        when available, otherwise use iptables and ebtables commands. This
        decision is made once the first time libvirt calls
        iptables/ebtables, and that decision is maintained for the life of
        libvirtd.
      
      * Note that the nwfilter part of this patch was separated out into
        another patch by Stefan in V2, so that needs to be revised and
        re-reviewed as well.
      
      ================
      
      All the configure.ac and specfile changes are unchanged from Thomas'
      V3.
      
      V3 re-ran "firewall-cmd --state" every time a new rule was added,
      which was extremely inefficient.  V4 uses VIR_ONCE_GLOBAL_INIT to set
      up a one-time initialization function.
      
      The VIR_ONCE_GLOBAL_INIT(x) macro references a static function called
      vir(Ip|Eb)OnceInit(), which will then be called the first time that
      the static function vir(Ip|Eb)TablesInitialize() is called (that
      function is defined for you by the macro). This is
      thread-safe, so there is no chance of any race.
      
      IMPORTANT NOTE: I've left the VIR_DEBUG messages in these two init
      functions (one for iptables, on for ebtables) as VIR_WARN so that I
      don't have to turn on all the other debug message just to see
      these. Even if this patch doesn't need any other modification, those
      messages need to be changed to VIR_DEBUG before pushing.
      
      This one-time initialization works well. However, I've encountered
      problems with testing:
      
      1) Whenever I have enabled the firewalld service, *all* attempts to
      call firewall-cmd from within libvirtd end with firewall-cmd hanging
      internally somewhere. This is *not* the case if firewall-cmd returns
      non-0 in response to "firewall-cmd --state" (i.e. *that* command runs
      and returns to libvirt successfully.)
      
      2) If I start libvirtd while firewalld is stopped, then start
      firewalld later, this triggers libvirtd to reload its iptables rules,
      however it also spits out a *ton* of complaints about deletion failing
      (I suppose because firewalld has nuked all of libvirt's rules). I
      guess we need to suppress those messages (which is a more annoying
      problem to fix than you might think, but that's another story).
      
      3) I noticed a few times during this long line of errors that
      firewalld made a complaint about "Resource Temporarily
      unavailable. Having libvirtd access iptables commands directly at the
      same time as firewalld is doing so is apparently problematic.
      
      4) In general, I'm concerned about the "set it once and never change
      it" method - if firewalld is disabled at libvirtd startup, causing
      libvirtd to always use iptables/ebtables directly, this won't cause
      *terrible* problems, but if libvirtd decides to use firewall-cmd and
      firewalld is later disabled, libvirtd will not be able to recover.
      bf156385
  3. 21 8月, 2012 2 次提交
    • E
      build: split driver_storage into convenience library · 1a4379cb
      Eric Blake 提交于
      Commit 1d22ba95 was complete at the time, but we have since
      reintroduced a warning that is fixed in the same manner:
      
        CCLD   storagebackendsheepdogtest
      
      *** Warning: Linking the executable storagebackendsheepdogtest against the loadable module
      *** libvirt_driver_storage.so is not portable!
      
      * src/Makefile.am (libvirt_driver_storage.la): Factor into new
      convenience library libvirt_driver_storage_impl.la.
      * tests/Makefile.am (storagebackendsheepdogtest_LDADD): Link to
      convenience library, not shared library.
      1a4379cb
    • P
      libssh2_transport: add main libssh2 transport implementation · 1193fc5f
      Peter Krempa 提交于
      This patch adds helper functions that enable us to use libssh2 in
      conjunction with libvirt's virNetSockets for ssh transport instead of
      spawning "ssh" client process.
      
      This implemetation supports tunneled plaintext, keyboard-interactive,
      private key, ssh agent based and null authentication. Libvirt's Auth
      callback is used for interaction with the user. (Keyboard interactive
      authentication, adding of host keys, private key passphrases). This
      enables seamless integration into the application using libvirt. No
      helpers as "ssh-askpass" are needed.
      
      Reading and writing of OpenSSH style "known_hosts" files is supported.
      
      Communication is done using SSH exec channel, where the user may specify
      arbitrary command to be executed on the remote side and reads and writes
      to/from stdin/out are sent through the ssh channel. Usage of stderr is
      not (yet) supported.
      1193fc5f
  4. 18 8月, 2012 1 次提交
  5. 17 8月, 2012 1 次提交
    • E
      build: ship stamp files · b44e6bef
      Eric Blake 提交于
      'make distcheck' fails because the generated ESX and HyperV files
      are (intentionally) marked read-only, but since the stamp file was
      missing, make assumes they need to be rebuilt.  Shipping the stamp
      file solves the problem.
      
      * src/Makefile.am (EXTRA_DIST): Ship stamp files.
      b44e6bef
  6. 16 8月, 2012 2 次提交
    • L
      conf: add <vlan> element to network and domain interface elements · 3f9274a5
      Laine Stump 提交于
      The following config elements now support a <vlan> subelements:
      
      within a domain: <interface>, and the <actual> subelement of <interface>
      within a network: the toplevel, as well as any <portgroup>
      
      Each vlan element must have one or more <tag id='n'/> subelements.  If
      there is more than one tag, it is assumed that vlan trunking is being
      requested. If trunking is required with only a single tag, the
      attribute "trunk='yes'" should be added to the toplevel <vlan>
      element.
      
      Some examples:
      
        <interface type='hostdev'/>
          <vlan>
            <tag id='42'/>
          </vlan>
          <mac address='52:54:00:12:34:56'/>
          ...
        </interface>
      
        <network>
          <name>vlan-net</name>
          <vlan trunk='yes'>
            <tag id='30'/>
          </vlan>
          <virtualport type='openvswitch'/>
        </network>
      
        <interface type='network'/>
          <source network='vlan-net'/>
          ...
        </interface>
      
        <network>
          <name>trunk-vlan</name>
          <vlan>
            <tag id='42'/>
            <tag id='43'/>
          </vlan>
          ...
        </network>
      
        <network>
          <name>multi</name>
          ...
          <portgroup name='production'/>
            <vlan>
              <tag id='42'/>
            </vlan>
          </portgroup>
          <portgroup name='test'/>
            <vlan>
              <tag id='666'/>
            </vlan>
          </portgroup>
        </network>
      
        <interface type='network'/>
          <source network='multi' portgroup='test'/>
          ...
        </interface>
      
      IMPORTANT NOTE: As of this patch there is no backend support for the
      vlan element for *any* network device type. When support is added in
      later patches, it will only be for those select network types that
      support setting up a vlan on the host side, without the guest's
      involvement. (For example, it will be possible to configure a vlan for
      a guest connected to an openvswitch bridge, but it won't be possible
      to do that for one that is connected to a standard Linux host bridge.)
      3f9274a5
    • L
      util: add virNetDevVlanType · cfbdd005
      Laine Stump 提交于
      To allow for the possibility of vlan "trunks", which have more than
      one vlan tag associated with them, we need a vlan struct. Since it
      will be used by multiple files in src/util, src/conf, src/network, and
      src/qemu, it must be defined in src/util. Unfortunately there isn't
      currently a common file for simple netdev data definitions, so I
      created a new file.
      cfbdd005
  7. 15 8月, 2012 2 次提交
    • E
      random: link with -lm when needed · c606671a
      Eric Blake 提交于
      Use of ldexp() requires -lm on some platforms; use gnulib to determine
      this for our makefile.  Also, optimize virRandomInt() for the case
      of a power-of-two limit (actually rather common, given that Daniel
      has a pending patch to replace virRandomBits(10) with code that will
      default to virRandomInt(1024) on default SELinux settings).
      
      * .gnulib: Update to latest, for ldexp.
      * bootstrap.conf (gnulib_modules): Import ldexp.
      * src/Makefile.am (libvirt_util_la_CFLAGS): Link with -lm when
      needed.
      * src/util/virrandom.c (virRandomInt): Optimize powers of 2.
      c606671a
    • E
      build: fix link error with appArmor · 37f3cd41
      Eric Blake 提交于
      Commit bb705e25 missed that the appArmor helper file also needs to
      resolve the new symbols dragged in by domain_conf.c.
      
      * src/Makefile.am (SECURITY_DRIVER_APPARMOR_HELPER_SOURCES): Pull
      in datatypes.c.
      37f3cd41
  8. 14 8月, 2012 2 次提交
    • O
      Destroy virdomainlist.[ch] · bb705e25
      Osier Yang 提交于
      As the consensus in:
      https://www.redhat.com/archives/libvir-list/2012-July/msg01692.html,
      this patch is to destroy conf/virdomainlist.[ch], folding the
      helpers into conf/domain_conf.[ch].
      
      * src/Makefile.am:
        - Various indention fixes incidentally
        - Add macro DATATYPES_SOURCES (datatypes.[ch])
        - Link datatypes.[ch] for libvirt_lxc
      
      * src/conf/domain_conf.c:
        - Move all the stuffs from virdomainlist.c into it
        - Use virUnrefDomain and virUnrefDomainSnapshot instead of
          virDomainFree and virDomainSnapshotFree, which are defined
          in libvirt.c, and we don't want to link to it.
        - Remove "if" before "free" the object, as virObjectUnref
          is in the list "useless_free_options".
      
      * src/conf/domain_conf.h:
        - Move all the stuffs from virdomainlist.h into it
        - s/LIST_FILTER/LIST_DOMAINS_FILTER/
      
      * src/libxl/libxl_driver.c:
        - s/LIST_FILTER/LIST_DOMAINS_FILTER/
        - no (include "virdomainlist.h")
      
      * src/libxl/libxl_driver.c: Likewise
      
      * src/lxc/lxc_driver.c: Likewise
      
      * src/openvz/openvz_driver.c: Likewise
      
      * src/parallels/parallels_driver.c: Likewise
      
      * src/qemu/qemu_driver.c: Likewise
      
      * src/test/test_driver.c: Likewise
      
      * src/uml/uml_driver.c: Likewise
      
      * src/vbox/vbox_tmpl.c: Likewise
      
      * src/vmware/vmware_driver.c: Likewise
      
      * tools/virsh-domain-monitor.c: Likewise
      
      * tools/virsh.c: Likewise
      bb705e25
    • C
      build: Distribute check-symfile.pl · 7e6f8010
      Cole Robinson 提交于
      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
      7e6f8010
  9. 11 8月, 2012 1 次提交
    • L
      build: fix binary location in stap files --with-driver-modules · 54264111
      Laine Stump 提交于
      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.
      54264111
  10. 07 8月, 2012 1 次提交
    • D
      Add a generic reference counted virObject type · 784a99f7
      Daniel P. Berrange 提交于
      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: NDaniel P. Berrange <berrange@redhat.com>
      784a99f7
  11. 03 8月, 2012 2 次提交
  12. 02 8月, 2012 3 次提交
    • J
      build: Rename security manager library · d3084c2a
      Jiri Denemark 提交于
      Security manager is not a dynamically loadable driver. Let's avoid the
      confusion by renaming libvirt_driver_security library as
      libvirt_security_manager.
      d3084c2a
    • J
      build: Link security manager into libvirt.so · 2f2ca021
      Jiri Denemark 提交于
      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 ec5b7bd2 and most of
      aae5cfb6.
      
      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.
      2f2ca021
    • D
      Rewrite virAtomic APIs using GLib's atomic ops code · 0c9fd4cf
      Daniel P. Berrange 提交于
      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: NDaniel P. Berrange <berrange@redhat.com>
      0c9fd4cf
  13. 01 8月, 2012 7 次提交
    • D
      Add missing parallels_utils.h to Makefile.am · 04cd70bf
      Daniel Veillard 提交于
      Otherwise the file is missing from the dist tarball and distcheck fails
      04cd70bf
    • D
      parallels: add storage driver · aa296e6c
      Dmitry Guryanov 提交于
      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: NDmitry Guryanov <dguryanov@parallels.com>
      aa296e6c
    • D
      parallels: add functions to list domains and get info · e93c33a9
      Dmitry Guryanov 提交于
      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: NDmitry Guryanov <dguryanov@parallels.com>
      e93c33a9
    • D
      parallels: add driver skeleton · cafc26ff
      Dmitry Guryanov 提交于
      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: NDmitry Guryanov <dguryanov@parallels.com>
      cafc26ff
    • D
      Only perform symbol check against libvirt.so · 8c63ff39
      Daniel P. Berrange 提交于
      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
      8c63ff39
    • D
      Don't link nwfilter or secrets driver to libvirt.so · aae5cfb6
      Daniel P. Berrange 提交于
      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
      aae5cfb6
    • D
      Remove bogus libvirt_network.syms file · 5830c72e
      Daniel P. Berrange 提交于
      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
      5830c72e
  14. 30 7月, 2012 3 次提交
    • D
      Run an RPC protocol over the LXC controller monitor · 9117fcb2
      Daniel P. Berrange 提交于
      This defines a new RPC protocol to be used between the LXC
      controller and the libvirtd LXC driver. There is only a
      single RPC message defined thus far, an asynchronous "EXIT"
      event that is emitted just before the LXC controller process
      exits. This provides the LXC driver with details about how
      the container shutdown - normally, or abnormally (crashed),
      thus allowing the driver to emit better libvirt events.
      
      Emitting the event in the LXC controller requires a few
      little tricks with the RPC service. Simply calling the
      virNetServiceClientSendMessage does not work, since this
      merely queues the message for asynchronous processing.
      In addition the main event loop is no longer running at
      the point the event is emitted, so no I/O is processed.
      
      Thus after invoking virNetServiceClientSendMessage it is
      necessary to mark the client as being in "delayed close"
      mode. Then the event loop is run again, until the client
      completes its close - this happens only after the queued
      message has been fully transmitted. The final complexity
      is that it is not safe to run virNetServerQuit() from the
      client close callback, since that is invoked from a
      context where the server is locked. Thus a zero-second
      timer is used to trigger shutdown of the event loop,
      causing the controller to finally exit.
      
      * src/Makefile.am: Add rules for generating RPC protocol
        files and dispatch methods
      * src/lxc/lxc_controller.c: Emit an RPC event immediately
        before exiting
      * src/lxc/lxc_domain.h: Record the shutdown reason
        given by the controller
      * src/lxc/lxc_monitor.c, src/lxc/lxc_monitor.h: Register
        RPC program and event handler. Add callback to let
        driver receive EXIT event.
      * src/lxc/lxc_process.c: Use monitor exit event to decide
        what kind of domain event to emit
      * src/lxc/lxc_protocol.x: Define wire protocol for LXC
        controller monitor.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9117fcb2
    • D
      Make RPC code generator a little more flexible · ca5ab840
      Daniel P. Berrange 提交于
      Update the gendispatch.pl script to get a little closer to
      being able to generate code for the LXC monitor, by passing
      in the struct prefix separately from the procedure prefix.
      Also allow method names using virCapitalLetters instead
      of vir_underscore_separator
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ca5ab840
    • D
      Move LXC monitor code out into separate file · de4b32e4
      Daniel P. Berrange 提交于
      Move the code that handles the LXC monitor out of the
      lxc_process.c file and into lxc_monitor.{c,h}
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      de4b32e4
  15. 27 7月, 2012 1 次提交
  16. 23 7月, 2012 1 次提交
    • D
      Make ESX & Hyper-V code generator safe with parallel builds · 1bfb47df
      Daniel P. Berrange 提交于
      If from a clean GIT checkout 'make -j 8' is run, the ESX
      and Hyper-V code will be generated multiple times over.
      This is because there are multiple files being generated
      from one invocation of the generator script. make does not
      realize this and so invokes the generator once per file.
      This doesn't matter with serialized builds, but with
      parallel builds multiple instances of the generator get
      run at once.
      
      make[2]: Entering directory `/home/berrange/src/virt/libvirt/src'
        GEN    util/virkeymaps.h
        GEN    remote/remote_protocol.h
        GEN    remote/remote_client_bodies.h
        GEN    remote/qemu_protocol.h
        GEN    remote/qemu_client_bodies.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi.generated.h
        GEN    esx/esx_vi.generated.c
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        ...snip...
        GEN    hyperv/hyperv_wmi.generated.h
        GEN    libvirt_qemu_probes.h
        GEN    locking/qemu-sanlock.conf
        GEN    hyperv/hyperv_wmi.generated.c
        GEN    rpc/virnetprotocol.h
        GEN    hyperv/hyperv_wmi_classes.generated.typedef
        GEN    hyperv/hyperv_wmi_classes.generated.h
        GEN    hyperv/hyperv_wmi_classes.generated.c
        GEN    rpc/virkeepaliveprotocol.h
        GEN    remote/remote_protocol.c
        GEN    remote/qemu_protocol.c
        GEN    rpc/virkeepaliveprotocol.c
        GEN    rpc/virnetprotocol.c
        GEN    libvirt.def
      
      Prevent this using a timestamp file to control generation,
      as was previously done for the python bindings in commit
      a7868e01Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1bfb47df
  17. 19 7月, 2012 4 次提交
    • D
      Move LXC process management code into separate file · fdf588a6
      Daniel P. Berrange 提交于
      Move all the code that manages stop/start of LXC processes
      into separate lxc_process.{c,h} file to make the lxc_driver.c
      file smaller
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      fdf588a6
    • D
      Move cgroup setup code out of lxc_controller.c · 43e532d3
      Daniel P. Berrange 提交于
      Move the cgroup setup code out of the lxc_controller.c file
      and into lxc_cgroup.{c,h}. This reduces the size of the
      lxc_controller.c file and paves the way to invoke cgroup
      setup from lxc_driver.c instead of lxc_controller.c in the
      future
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      43e532d3
    • D
      Move LXC domain private data into separate file · f93518c7
      Daniel P. Berrange 提交于
      Move the LXC driver code related to the virDomainObjPtr
      private data into separate lxc_domain.{c,h} files
      to reduce the size of lxc_driver.c
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f93518c7
    • S
      Add a sheepdog backend for the storage driver · 29bc4fe6
      Sebastian Wiedenroth 提交于
      This patch brings support to manage sheepdog pools and volumes to libvirt.
      It uses the "collie" command-line utility that comes with sheepdog for that.
      
      A sheepdog pool in libvirt maps to a sheepdog cluster.
      It needs a host and port to connect to, which in most cases
      is just going to be the default of localhost on port 7000.
      
      A sheepdog volume in libvirt maps to a sheepdog vdi.
      To create one specify the pool, a name and the capacity.
      Volumes can also be resized later.
      
      In the volume XML the vdi name has to be put into the <target><path>.
      To use the volume as a disk source for virtual machines specify
      the vdi name as "name" attribute of the <source>.
      The host and port information from the pool are specified inside the host tag.
      
        <disk type='network'>
          ...
          <source protocol="sheepdog" name="vdi_name">
            <host name="localhost" port="7000"/>
          </source>
        </disk>
      
      To work right this patch parses the output of collie,
      so it relies on the raw output option. There recently was a bug which caused
      size information to be reported wrong. This is fixed upstream already and
      will be in the next release.
      Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
      29bc4fe6
  18. 14 7月, 2012 1 次提交