1. 15 4月, 2015 1 次提交
    • M
      Cleanup "/sys/class/net" usage · 96a21e97
      Michal Privoznik 提交于
      Throughout the code, we have several places need to construct a path
      somewhere in /sys/class/net/... They are not consistent and nearly
      each code piece invents its own way how to do it. So unify this by:
      
      1) use virNetDevSysfsFile() wherever possible
      
      2) At least use common macro SYSFS_NET_DIR declared in virnetdev.h at
         the rest of places which can't go with 1)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      96a21e97
  2. 26 3月, 2015 1 次提交
  3. 25 3月, 2015 2 次提交
    • P
      Makefile: fix typo · 3edbfc88
      Pavel Hrdina 提交于
      Commit 95695388 introduced new util/virthreadjob.c/h files but the
      makefile has type that breaks rpm build.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      3edbfc88
    • J
      Add support for tracking thread jobs · 95695388
      Jiri Denemark 提交于
      Each thread can use a thread local variable to keep the name of a job
      which is currently running in the job.
      
      The virThreadJobSetWorker API is supposed to be called once by any
      thread which is used as a worker, i.e., it is waiting in a pool, woken
      up to do a job, and returned back to the pool.
      
      The virThreadJobSet/virThreadJobClear APIs are to be called at the
      beginning/end of each job.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      95695388
  4. 23 3月, 2015 1 次提交
  5. 18 3月, 2015 1 次提交
  6. 21 2月, 2015 1 次提交
    • P
      conf: Move numatune_conf to numa_conf · fcee64e7
      Peter Krempa 提交于
      For a while now there are two places that gather information about NUMA
      related guest configuration. While the XML can't be changed we can at
      least store the data in one place in the definition.
      
      Rename the numatune_conf.[ch] files to numa_conf as later patches will
      move the rest of the definitions from the cpu definition to this one.
      fcee64e7
  7. 19 2月, 2015 1 次提交
    • J
      Search for schemas and cpu_map.xml in source tree · bc6e2063
      Jiri Denemark 提交于
      Not all files we want to find using virFileFindResource{,Full} are
      generated when libvirt is built, some of them (such as RNG schemas) are
      distributed with sources. The current API was not able to find source
      files if libvirt was built in VPATH.
      
      Both RNG schemas and cpu_map.xml are distributed in source tarball.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      bc6e2063
  8. 27 1月, 2015 2 次提交
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
    • D
      don't disable state driver when libvirtd is not built · 220c01aa
      Daniel P. Berrange 提交于
      A bunch of code is wrapped in #if WITH_LIBVIRTD in order to
      enable the virStateDriver to be disabled when libvirtd is not
      built. Disabling this code doesn't have any real functional
      benefit beyond removing 1 pointer from the virConnectPtr struct,
      while having a cost of many more conditionals.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      220c01aa
  9. 16 1月, 2015 1 次提交
  10. 14 1月, 2015 1 次提交
    • J
      Introduce support for parsing/formatting Xen xl config format · 4689cdf7
      Jim Fehlig 提交于
      Introduce a parser/formatter for the xl config format.  Since the
      deprecation of xm/xend, the VM config file format has diverged as
      new features are added to libxl.  This patch adds support for parsing
      and formating the xl config format.  It supports the existing xm config
      format, plus adds support for spice graphics and xl disk config syntax.
      
      Disk config is specified a bit differently in xl as compared to xm.  In
      xl, disk config consists of comma-separated positional parameters and
      keyword/value pairs separated by commas. Positional parameters are
      specified as follows
      
         target, format, vdev, access
      
      Supported keys for key=value options are
      
        devtype, backendtype
      
      The positional paramters can also be specified in key/value form.  For
      example the following xl disk config are equivalent
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      See $xen_sources/docs/misc/xl-disk-configuration.txt for more details.
      
      xl disk config is parsed with the help of xlu_disk_parse() from
      libxlutil, libxl's utility library.  Although the library exists
      in all Xen versions supported by the libxl virt driver, only
      recently has the corresponding header file been included.  A check
      for the header is done in configure.ac.  If not found, xlu_disk_parse()
      is declared externally.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4689cdf7
  11. 13 1月, 2015 6 次提交
  12. 09 1月, 2015 1 次提交
  13. 08 1月, 2015 4 次提交
    • P
      src/Makefile: Fix parallel build after xen_xl_disk parser introduction · 533349ff
      Pavel Hrdina 提交于
      Well, the parallel build doesn't work as there are not dependencies
      set correctly. When running 'make -j' I see this error:
      
      make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/src'
        GEN      util/virkeymaps.h
        GEN      locking/lock_protocol.h
      make[2]: *** No rule to make target 'xenconfig/xen_xl_disk.h', needed by 'all'.  Stop.
      make[2]: *** Waiting for unfinished jobs....
        GEN      lxc/lxc_controller_dispatch.h
      
      The fix is to correctly set dependencies by letting make know that .c
      and .h are to be generated from .l. Moreover, the section is moved
      closer to the other section which uses it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      533349ff
    • P
    • P
      Revert "src/Makefile.am: fix build breaker for xenconfig" · e662968f
      Pavel Hrdina 提交于
      This reverts commit 703ef966.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      e662968f
    • E
      build: fix xenconfig VPATH builds · 1b21d300
      Eric Blake 提交于
      Ever since commit 2c78051a split out a helper library for the sake of
      changing CFLAGS, a VPATH build with xenconfig enabled has failed:
      
        CC       xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo
        ../../src/xenconfig/xen_xl_disk.l:37:21: fatal error: xen_xl.h: No such file or directory
         # include "xen_xl.h"
                   ^
        compilation terminated.
        Makefile:9462: recipe for target 'xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo' failed
      
      The solution is to tell the build to look for xen_xl.h relative
      to $(srcdir), since we keep that file under version control.
      
      [Not fixed here - the raw use of -Wno-unused-parameter in CFLAGS
      is NOT portable; ideally, we should be doing a configure test
      and only supplying that argument when we know the compiler supports
      -Wunused-parameter; but that's a patch for another day]
      
      [Not fixed here - there are still issues with parallel builds hitting
      a race between generating the files and trying to compile/distribute
      them]
      
      * src/Makefile.am (libvirt_xenxldiskparser_la_CFLAGS): Add another
      include directory.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1b21d300
  14. 05 1月, 2015 1 次提交
  15. 04 1月, 2015 1 次提交
    • K
      src/xenconfig: Xen-xl parser · 2c78051a
      Kiarie Kahurani 提交于
      Introduce a Xen xl parser
      
      This parser allows for users to convert the new xl disk format and
      spice graphics config to libvirt xml format and vice versa. Regarding
      the spice graphics config, the code is pretty much straight forward.
      For the disk {formating, parsing}, this parser takes care of the new
      xl format which include positional parameters and key/value parameters.
      In xl format disk config a <diskspec> consists of parameters separated by
      commas. If the parameters do not contain an '=' they are automatically
      assigned to certain options following the order below
      
         target, format, vdev, access
      
      The above are the only mandatory parameters in the <diskspec> but there
      are many more disk config options. These options can be specified as
      key=value pairs. This takes care of the rest of the options such as
      
        devtype, backend, backendtype, script, direct-io-safe,
      
      The positional paramters can also be specified in key/value form
      for example
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      are interpleted to one config.
      
      In xm format, the above diskspec would be written as
      
      phy:/dev/vg/guest-volume,hda,w
      
      The disk parser is based on the same parser used successfully by
      the Xen project for several years now.  Ian Jackson authored the
      scanner, which is used by this commit with mimimal changes.  Only
      the PREFIX option is changed, to produce function and file names
      more consistent with libvirt's convention.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      2c78051a
  16. 11 12月, 2014 1 次提交
    • M
      network: Bring netdevs online later · 82977058
      Matthew Rosato 提交于
      Currently, MAC registration occurs during device creation, which is
      early enough that, during live migration, you end up with duplicate
      MAC addresses on still-running source and target devices, even though
      the target device isn't actually being used yet.
      This patch proposes to defer MAC registration until right before
      the guest can actually use the device -- In other words, right
      before starting guest CPUs.
      Signed-off-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com>
      Signed-off-by: NLaine Stump <laine@laine.org>
      82977058
  17. 04 12月, 2014 1 次提交
  18. 29 10月, 2014 3 次提交
    • M
      src/Makefile.am: Add forgotten backslash · 233ecdea
      Michal Privoznik 提交于
      As I've pushed 5892944f I haven't noticed one small nitpick.
      There was this backslash missing on the line 1231 in the
      enumeration of libraries to be added to vbox storage driver. This
      resulted in nondeterministic build which sometimes succeeded and
      sometimes failed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      233ecdea
    • T
      vbox: New storage driver · 5892944f
      Taowei Luo 提交于
      This patch provides the new stroage driver for vbox. The work
      is similar with patch 87dea4fc and the next b4022de3.
      5892944f
    • T
      vbox: Rewrite vbox-independent functions · 459886d4
      Taowei Luo 提交于
      This patch rewrites the following functions
          *vboxStorageOpen
          *vboxStorageClose
          *vboxConnectNumOfStoragePools
          *vboxConnectListStoragePools
          *vboxStoragePoolLookupByName
      
      These functions do not call any vbox API, so I directly move it
      from vbox_tmpl.c to vbox_storage.c
      
      A small improvement is made on vboxConnectListStoragePools.
      The if condition nnames == 1 is modified to nnames > 0. So if the
      caller put more than one slot to get active storage pools, the new
      function will return exactly one, while the old one would only
      return 0.
      459886d4
  19. 25 10月, 2014 1 次提交
  20. 24 10月, 2014 9 次提交