1. 18 5月, 2017 3 次提交
    • M
      Introduce virStreamRecvHole · b6aedd2f
      Michal Privoznik 提交于
      This function is basically a counterpart for virStreamSendHole().
      If one side of a stream called virStreamSendHole() the other
      should call virStreamRecvHole() to get the size of the hole.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b6aedd2f
    • M
      Introduce virStreamSendHole · 69a573d0
      Michal Privoznik 提交于
      This API is used to tell the other side of the stream to skip
      some bytes in the stream. This can be used to create a sparse
      file on the receiving side of a stream.
      
      It takes @length argument, which says how big the hole is. This
      skipping is done from the current point of stream. Since our
      streams are not rewindable like regular files, we don't need
      @whence argument like seek(2) has.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      69a573d0
    • M
      Introduce virStreamRecvFlags · a35e2836
      Michal Privoznik 提交于
      This patch is adding the virStreamRecvFlags as a variant to the
      virStreamRecv function in order to allow for future expansion of
      functionality for processing sparse streams using a @flags
      argument.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a35e2836
  2. 27 3月, 2017 1 次提交
  3. 21 2月, 2017 1 次提交
    • P
      lib: Add API for specific vCPU hot(un)plug · 8f657259
      Peter Krempa 提交于
      Similarly to domainSetGuestVcpus this commit adds API which allows to
      modify state of individual vcpus rather than just setting the count.
      
      This allows to enable CPUs in specific guest NUMA nodes to achieve any
      necessary configuration.
      8f657259
  4. 09 1月, 2017 1 次提交
  5. 21 12月, 2016 1 次提交
    • J
      storage: Introduce virStorageVolInfoFlags · 0c234889
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1332019
      
      This function will essentially be a wrapper to virStorageVolInfo in order
      to provide a mechanism to have the "physical" size of the volume returned
      instead of the "allocation" size. This will provide similar capabilities to
      the virDomainBlockInfo which can return both allocation and physical of a
      domain storage volume.
      
      NB: Since we're reusing the _virStorageVolInfo and not creating a new
      _virStorageVolInfoFlags structure, we'll need to generate the rpc APIs
      remoteStorageVolGetInfoFlags and remoteDispatchStorageVolGetInfoFlags
      (although both were originally created from gendispatch.pl and then
      just copied into daemon/remote.c and src/remote/remote_driver.c).
      
      The new API will allow the usage of a VIR_STORAGE_VOL_GET_PHYSICAL flag
      and will make the decision to return the physical or allocation value
      into the allocation field.
      
      In order to get that physical value, virStorageBackendUpdateVolTargetInfoFD
      adds logic to fill in physical value matching logic in qemuStorageLimitsRefresh
      used by virDomainBlockInfo when the domain is inactive.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0c234889
  6. 02 8月, 2016 1 次提交
    • J
      Introduce node device lifecycle event APIs · fcabc1ca
      Jovanka Gulicoska 提交于
      Node device lifecycle event API entry points for registering and
      deregistering node deivce events, as well as types of events
      associated with node device.
      These entry points will be used for implementing asynchronous
      lifecycle events.
      
      Node device API:
      virConnectNodeDeviceEventRegisterAny
      virConnectNodeDeviceEventDeregisterAny
      virNodeDeviceEventLifecycleType which has events CREATED and DELETED
      fcabc1ca
  7. 22 6月, 2016 2 次提交
  8. 17 6月, 2016 1 次提交
    • J
      Introduce storage lifecycle event APIs · 1328f982
      Jovanka Gulicoska 提交于
      Storage pool lifecycle event API entry points for registering and deregistering
      storage pool events, as well as types of events associated with storage pools.
      These entry points will be used for implementing asynchronous lifecycle events.
      
      Storage pool API:
      virConnectStoragePoolEventRegisterAny
      virConnectStoragePoolEventDeregisterAny
      virStoragePoolEventLifecycleType which has events STARTED, STOPPED, DEFINED,
      UNDEFINED, and REFRESHED
      1328f982
  9. 29 3月, 2016 1 次提交
  10. 21 3月, 2016 1 次提交
  11. 14 8月, 2015 1 次提交
  12. 28 6月, 2015 1 次提交
  13. 18 6月, 2015 1 次提交
  14. 21 5月, 2015 1 次提交
  15. 28 4月, 2015 1 次提交
  16. 26 3月, 2015 2 次提交
  17. 17 3月, 2015 1 次提交
    • N
      domifaddr: Implement the public APIs · 5b5242a7
      Nehal J Wani 提交于
      Define helper function virDomainInterfaceFree, which allows
      the upper layer application to free the domain interface object
      conveniently.
      
      The API is going to provide multiple methods by flags, e.g.
        * Query guest agent
        * Parse DHCP lease file
      
      include/libvirt/libvirt-domain.h
        * Define virDomainInterfaceAddresses, virDomainInterfaceFree
        * Define structs virDomainInterface, virDomainIPAddress
      
      src/driver-hypervisor.h:
        * Define domainInterfaceAddresses
      
      src/libvirt-domain.c:
        * Implement virDomainInterfaceAddresses
        * Implement virDomainInterfaceFree
      
      src/libvirt_public.syms:
        * Export the new symbols
      Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      5b5242a7
  18. 12 3月, 2015 1 次提交
    • J
      Implement public API for virDomainPinIOThread · 71b234ce
      John Ferlan 提交于
      Add virDomainPinIOThread to allow setting the CPU affinity for a specific
      IOThread based on the output generated from virDomainGetIOThreadsInfo
      
      The API supports updating both the --live domain and the --config data
      71b234ce
  19. 06 3月, 2015 1 次提交
    • J
      Implement public API for virDomainGetIOThreadsInfo · 11a5a095
      John Ferlan 提交于
      Add virDomainGetIOThreadInfo in order to return a list of
      virDomainIOThreadInfoPtr structures which list the IOThread ID
      and the CPU Affinity map for each IOThread for the domain.
      
      For an active domain, the live data will be returned, while for
      an inactive domain, the config data will be returned.
      
      The API supports either the --live or --config flag, but not both.
      
      Also added virDomainIOThreadsInfoFree in order to free the cpumap
      and the IOThreadInfo structure.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      11a5a095
  20. 13 1月, 2015 1 次提交
    • D
      Add new virDomainDefineXMLFlags public API · 2a5ee954
      Daniel P. Berrange 提交于
      The virDomainDefineXML method is one of the few that still lacks
      an 'unsigned int flags' parameter. This will be needed for adding
      XML validation to this API. virDomainCreateXML fortunately already
      has flags.
      2a5ee954
  21. 24 11月, 2014 1 次提交
  22. 25 9月, 2014 1 次提交
    • M
      Introduce virNodeAllocPages · fa5c5580
      Michal Privoznik 提交于
      A long time ago in a galaxy far, far away it has been decided
      that libvirt will manage not only domains but host as well. And
      with my latest work on qemu driver supporting huge pages, we miss
      the cherry on top: an API to allocate huge pages on the run.
      Currently users are forced to log into the host and adjust the
      huge pages pool themselves.  However, with this API the problem
      is gone - they can both size up and size down the pool.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      fa5c5580
  23. 27 8月, 2014 3 次提交
    • E
      blockcopy: virDomainBlockCopy with XML destination, typed params · 993fa528
      Eric Blake 提交于
      This commit (finally) adds the virDomainBlockCopy API, with the
      intent that it will provide more power to the existing 'virsh
      blockcopy' command.
      
      'virsh blockcopy' was first added in Apr 2012 (v0.9.12), which
      corresponds to the upstream qemu 1.2 timeframe.  It was done as
      a hack on top of the existing virDomainBlockRebase() API call,
      for two reasons: 1) it was targetting a feature that landed first
      in downstream RHEL qemu, but had not stabilized in upstream qemu
      at the time (and indeed, 'drive-mirror' only landed upstream in
      qemu 1.3 with slight differences to the first RHEL attempt,
      and later gained further parameters like granularity and buf-size
      that are also worth exposing), and 2) extending an existing API
      allowed it to be backported without worrying about bumping .so
      versions.  A virDomainBlockCopy() API was proposed at that time
      [1], but we decided not to accept it into libvirt until after
      upstream qemu stabilized, and it ended up getting scrapped.
      Whether or not RHEL should have attempted adding a new feature
      without getting it upstream first is a debate that can be held
      another day; but enough time has now elapsed that we are ready to
      do the interface cleanly.
      
      [1] https://www.redhat.com/archives/libvir-list/2012-April/msg00768.html
      
      Delaying the creation of a clean API until now has also had a
      benefit: we've only recently learned of a few shortcomings in the
      original design: 1) it is unable to target a network destination
      (such as a gluster volume) because it hard-coded the assumption
      that the destination is a local file name.  Because of all the
      refactoring we've done to add virStorageSourcePtr, we are in a
      better position to declare an API that parses XML describing a
      host storage source as the copy destination, which was not
      possible had we implemented virDomainBlockCopy as it had been
      originally envisioned (although a network target will have to wait
      until a later libvirt release compared to the API addition to
      actually be implemented).  2) the design of using MiB/sec as the
      bandwidth throttle is rather coarse; qemu is actually tuned to
      bytes/second, and libvirt is preventing access to that level of
      detail.  A later patch will add flags to existing block job API
      that can request bytes/second instead of back-compat MiB/s, but as
      this is a new API, we can get it right to begin with.
      
      At least I had the foresight to create 'virsh blockcopy' as a
      separate command at the UI level (commit 1f06c007) rather than
      leaking the underlying API overload of virDomainBlockRebase onto
      shell users.
      
      A further note on the bandwidth option: virTypedParameters
      intentionally lacks unsigned long (since variable-width
      interaction between mixed 32- vs. 64-bit client/server setups is
      nasty), but we have to deal with the fact that we are interacting
      with existing older code that mistakenly chose unsigned long
      bandwidth at a point before we decided to prohibit it in all new
      API.  The typed parameter is therefore unsigned long long, but
      the implementation (in a later patch) will have to do overflow
      detection on 32-bit platforms, as well as capping the value to
      match the LLONG_MAX>>20 cap of the existing MiB/s interfaces.
      
      * include/libvirt/libvirt.h.in (virDomainBlockCopy): New API.
      (virDomainBlockJobType, virConnectDomainEventBlockJobStatus):
      Update related documentation.
      * src/libvirt.c (virDomainBlockCopy): Implement it.
      * src/libvirt_public.syms (LIBVIRT_1.2.8): Export it.
      * src/driver.h (_virDriver): New driver callback.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      993fa528
    • P
      lib: Introduce API for retrieving bulk domain stats · 76a5bc4e
      Peter Krempa 提交于
      The motivation for this API is that management layers that use libvirt
      usually poll for statistics using various split up APIs we currently
      provide. To get all the necessary stuff, the app needs to issue a lot of
      calls and aggregate the results.
      
      The APIs I'm introducing here:
      1) Returns data in a format that we can expand in the future and is
      (pseudo) hierarchical. The data is returned as typed parameters where
      the fields are constructed as dot-separated strings containing names and
      other stuff in a list of typed params.
      
      2) Stats for multiple (all) domains can be queried at once and are
      returned in one call. This will decrease the overhead necessary to issue
      multiple calls per domain multiplied by the count of domains.
      
      3) Selectable (bit mask) fields in the returned format. This will allow
      to retrieve only specific stats according to the app's need.
      
      The stats groups will be enabled using a bit field @stats passed as the
      function argument. A few sample stats groups that this API will support:
      
      VIR_DOMAIN_STATS_STATE
      VIR_DOMAIN_STATS_CPU
      VIR_DOMAIN_STATS_BLOCK
      VIR_DOMAIN_STATS_INTERFACE
      
      (Note that this is only an example, the initial implementation supports
       only VIR_DOMAIN_STATS_STATE while others will be added later.)
      
      the returned typed params will use the following scheme
      
      state.state = VIR_DOMAIN_RUNNING
      state.reason = VIR_DOMAIN_RUNNING_BOOTED (the actual values according to
                                                the enum)
      cpu.count = 8
      cpu.0.state = running
      cpu.0.time = 1234
      76a5bc4e
    • J
      Introduce virDomainOpenGraphicsFD API · 3ddc8544
      Ján Tomko 提交于
      Define the public API implementation and declare internal
      driver prototype.
      3ddc8544
  24. 03 7月, 2014 1 次提交
  25. 27 6月, 2014 1 次提交
  26. 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
  27. 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
  28. 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
  29. 07 5月, 2014 1 次提交
  30. 25 3月, 2014 1 次提交
  31. 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
  32. 24 9月, 2013 1 次提交
  33. 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
  34. 16 7月, 2013 1 次提交