1. 22 8月, 2014 1 次提交
  2. 19 8月, 2014 1 次提交
  3. 03 7月, 2014 1 次提交
  4. 27 6月, 2014 1 次提交
  5. 24 6月, 2014 1 次提交
    • N
      net-dhcp-leases: Implement the public APIs · 03e0e79e
      Nehal J Wani 提交于
      Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC
      and virNetworkDHCPLeaseFree.
      
      * virNetworkGetDHCPLeases: returns the dhcp leases information for a given
           virtual network.
      
        For DHCPv4, the information returned:
        - Network Interface Name
        - Expiry Time
        - MAC address
        - IAID (NULL)
        - IPv4 address (with type and prefix)
        - Hostname (can be NULL)
        - Client ID (can be NULL)
      
        For DHCPv6, the information returned:
        - Network Interface Name
        - Expiry Time
        - MAC address
        - IAID (can be NULL, only in rare cases)
        - IPv6 address (with type and prefix)
        - Hostname (can be NULL)
        - Client DUID
      
        Note: @mac, @iaid, @ipaddr, @clientid are in ASCII form, not raw bytes.
        Note: @expirytime can 0, in case the lease is for infinite time.
      
      * virNetworkGetDHCPLeasesForMAC: returns the dhcp leases information for a
           given virtual network and specified MAC Address.
      
      * virNetworkDHCPLeaseFree: allows the upper layer application to free the
           network interface object conveniently.
      
      There is no support for flags, so user is expected to pass 0 for
      both the APIs.
      
      include/libvirt/libvirt.h.in:
        * Define virNetworkGetDHCPLeases
        * Define virNetworkGetDHCPLeasesForMAC
        * Define virNetworkDHCPLeaseFree
      
      src/driver.h:
        * Define networkGetDHCPLeases
        * Define networkGetDHCPLeasesForMAC
      
      src/libvirt.c:
        * Implement virNetworkGetDHCPLeases
        * Implement virNetworkGetDHCPLeasesForMAC
        * Implement virNetworkDHCPLeaseFree
      
      src/libvirt_public.syms:
        * Export the new symbols
      03e0e79e
  6. 19 6月, 2014 1 次提交
    • M
      Introduce virNodeGetFreePages · 34f2d031
      Michal Privoznik 提交于
      The aim of the API is to get information on number of free pages
      on the system. The API behaves similar to the
      virNodeGetCellsFreeMemory(). User passes starting NUMA cell, the
      count of nodes that he's interested in, pages sizes (yes,
      multiple sizes can be queried at once) and the counts are
      returned in an array.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      34f2d031
  7. 15 5月, 2014 1 次提交
    • M
      Introduce virDomain{Get,Set}Time APIs · 0abb3693
      Michal Privoznik 提交于
      These APIs allow users to get or set time in a domain, which may come
      handy if the domain has been resumed just recently and NTP is not
      configured or hasn't kicked in yet and the guest is running
      something time critical. In addition, NTP may refuse to re-set the clock
      if the skew is too big.
      
      In addition, new ACL attribute is introduced 'set_time'.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0abb3693
  8. 07 5月, 2014 1 次提交
  9. 25 4月, 2014 1 次提交
  10. 25 3月, 2014 1 次提交
  11. 21 3月, 2014 1 次提交
    • E
      qemu: new API for tracking arbitrary monitor events · 26295203
      Eric Blake 提交于
      Several times in the past, qemu has implemented a new event,
      but libvirt has not yet caught up to reporting that event to
      the user applications.  While it is possible to track libvirt
      logs to see that an unknown event was received and ignored,
      it would be nicer to copy what 'virsh qemu-monitor-command'
      does, and expose this information to the end developer as
      one of our unsupported qemu-specific commands.
      
      If you find yourself needing to use this API for more than
      just development purposes, please ask on the libvirt list
      for a supported counterpart event to be added in libvirt.so.
      
      While the supported virConnectDomainEventRegisterAny() API
      takes an id which determines the signature of the callback,
      this version takes a string filter and always uses the same
      signature.  Furthermore, I chose to expose this as a new API
      instead of trying to add a new eventID at the top level, in
      part because the generic option lacks event name filtering,
      and in part because the normal domain event namespace should
      not be polluted by a qemu-only event.  I also added a flags
      argument; unused for now, but we might decide to use it to
      allow a user to request event names by glob or regex instead
      of literal match.
      
      This API intentionally requires full write access (while
      normal event registration is allowed on read-only clients);
      this is in part due to the fact that it should only be used
      by debugging situations, and in part because the design of
      per-event filtering in later patches ended up allowing for
      duplicate registrations that could potentially be abused to
      exhaust server memory - requiring write privileges means
      that such abuse will not serve as a denial of service attack
      against users with higher privileges.
      
      * include/libvirt/libvirt-qemu.h
      (virConnectDomainQemuMonitorEventCallback)
      (virConnectDomainQemuMonitorEventRegister)
      (virConnectDomainQemuMonitorEventDeregister): New prototypes.
      * src/libvirt-qemu.c (virConnectDomainQemuMonitorEventRegister)
      (virConnectDomainQemuMonitorEventDeregister): New functions.
      * src/libvirt_qemu.syms (LIBVIRT_QEMU_1.2.1): Export them.
      * src/driver.h (virDrvConnectDomainQemuMonitorEventRegister)
      (virDrvConnectDomainQemuMonitorEventDeregister): New callbacks.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      26295203
  12. 18 3月, 2014 1 次提交
  13. 19 2月, 2014 1 次提交
    • R
      bhyve: add a basic driver · 0eb4a5f4
      Roman Bogorodskiy 提交于
      At this point it has a limited functionality and is highly
      experimental. Supported domain operations are:
      
        * define
        * start
        * destroy
        * dumpxml
        * dominfo
      
      It's only possible to have only one disk device and only one
      network, which should be of type bridge.
      0eb4a5f4
  14. 07 1月, 2014 1 次提交
    • P
      maint: Fix messy include of libvirt_internal.h · aef39eb0
      Peter Krempa 提交于
      The libvirt_internal.h header was included by the internal.h header.
      This made it painful to add new stuff to the header file that would
      require some more specific types. Remove inclusion by internal.h and add
      it to appropriate places manually.
      aef39eb0
  15. 11 12月, 2013 1 次提交
    • C
      Added Network events API and virNetworkEventLifecycle. · 9ff38c54
      Cédric Bosdonnat 提交于
      Define the public API for (de-)registering network events
      and the callbacks for receiving lifecycle events. The lifecycle
      event includes a 'detail' parameter to match the domain lifecycle
      event data, but this is currently unused.
      
      The network events related code goes into its own set of internal
      files src/conf/network_event.[ch]
      9ff38c54
  16. 24 9月, 2013 1 次提交
  17. 26 7月, 2013 1 次提交
  18. 18 7月, 2013 1 次提交
    • D
      Introduce new domain create APIs to pass pre-opened FDs to LXC · d76227be
      Daniel P. Berrange 提交于
      With container based virt, it is useful to be able to pass
      pre-opened file descriptors to the container init process.
      This allows for containers to be auto-activated from incoming
      socket connections, passing the active socket into the container.
      
      To do this, introduce a pair of new APIs, virDomainCreateXMLWithFiles
      and virDomainCreateWithFiles, which accept an array of file
      descriptors. For the LXC driver, UNIX file descriptor passing
      will be used to send them to libvirtd, which will them pass
      them down to libvirt_lxc, which will then pass them to the container
      init process.
      
      This will only be implemented for LXC right now, but the design
      is generic enough it could work with other hypervisors, hence
      I suggest adding this to libvirt.so, rather than libvirt-lxc.so
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d76227be
  19. 16 7月, 2013 1 次提交
  20. 25 6月, 2013 1 次提交
  21. 05 6月, 2013 1 次提交
    • E
      maint: don't use config.h in .h files · 1add9c78
      Eric Blake 提交于
      Enforce the rule that .h files don't need to (redundantly)
      include <config.h>.
      
      * cfg.mk (sc_prohibit_config_h_in_headers): New rule.
      (_virsh_includes): Delete; instead, inline a smaller number of
      exclusions...
      (exclude_file_name_regexp--sc_require_config_h)
      (exclude_file_name_regexp--sc_require_config_h_first): ...here.
      * daemon/libvirtd.h (includes): Fix offenders.
      * src/driver.h (includes): Likewise.
      * src/gnutls_1_0_compat.h (includes): Likewise.
      * src/libxl/libxl_conf.h (includes): Likewise.
      * src/libxl/libxl_driver.h (includes): Likewise.
      * src/lxc/lxc_conf.h (includes): Likewise.
      * src/lxc/lxc_driver.h (includes): Likewise.
      * src/lxc/lxc_fuse.h (includes): Likewise.
      * src/network/bridge_driver.h (includes): Likewise.
      * src/phyp/phyp_driver.h (includes): Likewise.
      * src/qemu/qemu_conf.h (includes): Likewise.
      * src/util/virnetlink.h (includes): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1add9c78
  22. 21 5月, 2013 1 次提交
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  23. 26 4月, 2013 1 次提交
    • L
      hypervisor api: new virNodeDeviceDetachFlags · 35394196
      Laine Stump 提交于
      The existing virNodeDeviceDettach() assumes that there is only a
      single PCI device assignment backend driver appropriate for any
      hypervisor. This is no longer true, as the qemu driver is getting
      support for PCI device assignment via VFIO. The new API
      virNodeDeviceDetachFlags adds a driverName arg that should be set to
      the exact same string set in a domain <hostdev>'s <driver name='x'/>
      element (i.e. "vfio", "kvm", or NULL for default). It also adds a
      flags arg for good measure (and because it's possible we may need it
      when we start dealing with VFIO's "device groups").
      35394196
  24. 24 4月, 2013 5 次提交
  25. 08 3月, 2013 1 次提交
  26. 23 2月, 2013 2 次提交
  27. 12 2月, 2013 1 次提交
    • O
      Introduce API virNodeDeviceLookupSCSIHostByWWN · efed366e
      Osier Yang 提交于
      Since the name (like scsi_host10) is not stable for vHBA, (it can
      be changed either after recreating or system rebooting), current
      API virNodeDeviceLookupByName is not nice to use for management app
      in this case. (E.g. one wants to destroy the vHBA whose name has
      been changed after system rebooting, he has to find out current
      name first).
      
      Later patches will support the persistent vHBA via storage pool,
      with which one can identify the vHBA stably by the wwnn && wwpn
      pair.
      
      So this new API comes.
      efed366e
  28. 14 1月, 2013 1 次提交
    • D
      Introduce an LXC specific public API & library · 3d1596b0
      Daniel P. Berrange 提交于
      This patch introduces support for LXC specific public APIs. In
      common with what was done for QEMU, this creates a libvirt_lxc.so
      library and libvirt/libvirt-lxc.h header file.
      
      The actual APIs are
      
        int virDomainLxcOpenNamespace(virDomainPtr domain,
                                      int **fdlist,
                                      unsigned int flags);
      
        int virDomainLxcEnterNamespace(virDomainPtr domain,
                                       unsigned int nfdlist,
                                       int *fdlist,
                                       unsigned int *noldfdlist,
                                       int **oldfdlist,
                                       unsigned int flags);
      
      which provide a way to use the setns() system call to move the
      calling process into the container's namespace. It is not
      practical to write in a generically applicable manner. The
      nearest that we could get to such an API would be an API which
      allows to pass a command + argv to be executed inside a
      container. Even if we had such a generic API, this LXC specific
      API is still useful, because it allows the caller to maintain
      the current process context, in particular any I/O streams they
      have open.
      
      NB the virDomainLxcEnterNamespace() API is special in that it
      runs client side, so does not involve the internal driver API.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3d1596b0
  29. 05 1月, 2013 1 次提交
    • J
      api: Add API to tunnel a guest channel via stream · d52add46
      John Eckersberg 提交于
      This patch adds a new API, virDomainOpenChannel, that uses streams to
      connect to a virtio channel on a guest.  This creates a secure
      communication channel between a guest and a libvirt client.
      
      This behaves the same as virDomainOpenConsole, except on channels
      instead of console/serial/parallel devices.
      d52add46
  30. 04 12月, 2012 1 次提交
  31. 30 11月, 2012 2 次提交
  32. 29 11月, 2012 1 次提交
    • D
      Add virDomainSendProcessSignal API · 46c329bc
      Daniel P. Berrange 提交于
      Add an API for sending signals to arbitrary processes in the
      guest OS. This is primarily useful for container based virt,
      but can be used for machine virt too, if there is a suitable
      guest agent,
      
      * include/libvirt/libvirt.h.in: Add virDomainSendProcessSignal
        and virDomainProcessSignal enum
      * src/driver.h: Driver entry point
      * src/libvirt.c, src/libvirt_public.syms: Impl for new API
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      46c329bc
  33. 28 11月, 2012 1 次提交
    • M
      Introduce virDomainFSTrim() public API · 0fbf3704
      Michal Privoznik 提交于
      This will call FITRIM within guest. The API has 4 arguments,
      however, only 2 will be used for now (@dom and @minumum).
      The rest two are there if in future qemu guest agent learns them.
      0fbf3704
  34. 24 10月, 2012 1 次提交
    • V
      virNodeGetCPUMap: Define public API. · 7ecc1d81
      Viktor Mihajlovski 提交于
      Adding a new API to obtain information about the
      host node's present, online and offline CPUs.
      
      int virNodeGetCPUMap(virConnectPtr conn,
                           unsigned char **cpumap,
                           unsigned int *online,
                           unsigned int flags);
      
      The function will return the number of CPUs present on the host
      or -1 on failure;
      If cpumap is non-NULL virNodeGetCPUMap will allocate an array
      containing a bit map representation of the online CPUs. It's
      the callers responsibility to deallocate cpumap using free().
      If online is non-NULL, the variable pointed to will contain
      the number of online host node CPUs.
      The variable flags has been added to support future extensions
      and must be set to 0.
      
      Extend the driver structure by nodeGetCPUMap entry in support of the
      new API virNodeGetCPUMap.
      Added implementation of virNodeGetCPUMap to libvirt.c
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7ecc1d81