1. 18 5月, 2016 1 次提交
  2. 13 4月, 2016 1 次提交
    • M
      vz: introduce new vzDriver lockable structure and use it · 7762c5a2
      Maxim Nestratov 提交于
      This patch introduces a new 'vzDriver' lockable object and provides
      helper functions to allocate/destroy it and we pass it to prlsdkXxx
      functions instead of virConnectPtr.
      Now we store domain related objects such as domain list, capabitilies
      etc. within a single vz_driver vzDriver structure, which is shared by
      all driver connections. It is allocated during daemon initialization or
      in a lazy manner when a new connection to 'vz' driver is established.
      When a connection to vz daemon drops, vzDestroyConnection is called,
      which in turn relays disconnect event to all connection to 'vz' driver.
      Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
      7762c5a2
  3. 12 4月, 2016 1 次提交
  4. 17 3月, 2016 2 次提交
    • M
      vz: code refactoring · ad29dbb3
      Mikhail Feoktistov 提交于
      In prlsdkAddNet() Attach/DetachNet() functions
      privconn should be the first argument
      ad29dbb3
    • M
      vz: set default SCSI model · bb2f63da
      Mikhail Feoktistov 提交于
      Each version of virtuozzo supports only one type of SCSI controller
      So if we add disk on SCSI bus, we should set SCSI controller model.
      We can take it from vzCapabilities structure.
      bb2f63da
  5. 12 2月, 2016 1 次提交
    • M
      vz: fix race condition when adding domain to domains list · 9c14a9ab
      Mikhail Feoktistov 提交于
      Race condition:
      User calls defineXML to create new instance.
      The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm.
      Then this thread calls prlsdkAddDomain to add new domain to domains list.
      The second thread receives notification from hypervisor that new VM was created.
      It calls prlsdkHandleVmAddedEvent() and also tries to add new domain to domains list.
      These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain.
      So they add two domains with the same uuid to domains list.
      
      This fix splits logic of prlsdkAddDomain() into two functions.
      1. vzNewDomain() creates new empty domain in domains list with the specific uuid.
      2. prlsdkLoadDomain() add data from VM to domain object.
      
      New algorithm for creating an instance:
      In vzDomainDefineXMLFlags() we add new domain to domain list by calling vzNewDomain()
      and only after that we call CreateVm() to create VM.
      It means that we "reserve" domain object with the specific uuid.
      After creation of new VM we add info from this VM
      to reserved domain object by calling prlsdkLoadDomain().
      
      Before this patch prlsdkLoadDomain() worked in 2 different cases:
      1. It creates and initializes new domain. Then updates it from sdk handle.
      2. It updates existed domain from sdk handle.
      In this patch we remove code which creates new domain from LoadDomain()
      and move it to vzNewDomain().
      Now prlsdkLoadDomain() only updates domain from skd handle.
      
      In notification handler prlsdkHandleVmAddedEvent() we check
      the existence of a domain and if it doesn't exist we add new domain by calling
      vzNewDomain() and load info from sdk handle via prlsdkLoadDomain().
      9c14a9ab
  6. 24 12月, 2015 1 次提交
  7. 19 11月, 2015 1 次提交
  8. 26 6月, 2015 3 次提交
    • N
      vz: add memory statistics · bb7d275d
      Nikolay Shirokovskiy 提交于
      Implemented counters:
       VIR_DOMAIN_MEMORY_STAT_SWAP_IN
       VIR_DOMAIN_MEMORY_STAT_SWAP_OUT
       VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT
       VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT
       VIR_DOMAIN_MEMORY_STAT_AVAILABLE
       VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON
       VIR_DOMAIN_MEMORY_STAT_UNUSED
      
      Comments.
      
      1. Use vzDomObjFromDomainRef/virDomainObjEndAPI pair to get domain
      object as we use prlsdkGetStatsParam. See previous statistics
      comments.
      
      2. Balloon statistics is not applicable to containers. Fault
      statistics for containers not provided in PCS6 yet.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      bb7d275d
    • N
      vz: add vcpu statistics · b2f73ee2
      Nikolay Shirokovskiy 提交于
      Comments.
      
      Replace vzDomObjFromDomain/virObjectUnlock pair
      to vzDomObjFromDomainRef/virDomainObjEndAPI as we
      use prlsdkGetStatsParam. See previous statistics
      comments.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      b2f73ee2
    • N
      vz: add net dev statistiscs · b249069d
      Nikolay Shirokovskiy 提交于
      Populate counters SDK currenly supports:
       rx_bytes
       rx_packets
       tx_bytes
       tx_packets
      
      Comments.
      
      Use vzDomObjFromDomainRef/virDomainObjEndAPI pair to get domain
      object as we use prlsdkGetStatsParam that can release domain
      object lock and thus we need a reference in case domain
      is deleated meanwhile.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      b249069d
  9. 25 6月, 2015 1 次提交
  10. 24 6月, 2015 1 次提交
    • M
      vz: implementation of attach/detach network devices · 6de12b02
      Mikhail Feoktistov 提交于
      In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation
      for domainAttachDevice and domainDetachDevice callbacks.
      
      As soon as we don't support this operation for hypervisor type domains,
      we implement this functionality for containers only.
      
      In detach procedure we find network device by MAC address.
      Because PrlVmDevNet_GetMacAddress() returns MAC as a UTF-8 encoded
      null-terminated string, we use memcmp() to compare it.
      Also we remove corresponding virtual network by prlsdkDelNetAdapter call.
      6de12b02
  11. 17 6月, 2015 2 次提交
  12. 09 6月, 2015 1 次提交
    • N
      parallels: add block device statistics to driver · 489c81c0
      Nikolay Shirokovskiy 提交于
      Statistics provided through PCS SDK. As we have only async interface in SDK we
      need to be subscribed to statistics in order to get it. Trivial solution on
      every stat request to subscribe, wait event and then unsubscribe will lead to
      significant delays in case of a number of successive requests, as the event
      will be delivered on next PCS server notify cycle. On the other hand we don't
      want to keep unnesessary subscribtion. So we take an hibrid solution to
      subcsribe on first request and then keep a subscription while requests are
      active. We populate cache of statistics on subscribtion events and use this
      cache to serve libvirts requests.
      
       * Cache details.
      Cache is just handle to last arrived event, we call this cache
      as if this handle is valid it is used to serve synchronous
      statistics requests. We use number of successive events count
      to detect that user lost interest to statistics. We reset this
      count to 0 on every request. If more than PARALLELS_STATISTICS_DROP_COUNT
      successive events arrive we unsubscribe. Special value of -1
      of this counter is used to differentiate between subscribed/unsubscribed state
      to protect from delayed events.
      
      Values of PARALLELS_STATISTICS_DROP_COUNT and PARALLELS_STATISTICS_TIMEOUT are
      just drop-ins, choosen without special consideration.
      
       * Thread safety issues
      Use parallelsDomObjFromDomainRef in parallelsDomainBlockStats as
      we could wait on domain lock down on stack in prlsdkGetStatsParam
      and if we won't keep reference we could get dangling pointer
      on return from wait.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
      489c81c0
  13. 13 5月, 2015 1 次提交
    • N
      parallels: remove connection wide wait timeout · 2f1f2888
      Nikolay Shirokovskiy 提交于
      We have a lot of passing arguments code just to pass connection
      object cause it holds jobTimeout. Taking into account that
      right now this value is defined at compile time let's just
      get rid of it and make arguments list more clear in many
      places.
      
      In case we later need some runtime configurable timeout
      value we can provide this value through arguments
      function already operate such as a parallels domain
      object etc as this timeouts are operation( and thus
      object) specific in practice.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
      2f1f2888
  14. 29 4月, 2015 1 次提交
  15. 13 4月, 2015 1 次提交
  16. 10 4月, 2015 3 次提交
  17. 10 12月, 2014 8 次提交
  18. 25 9月, 2014 1 次提交
    • D
      parallels: login to parallels SDK · e7bb373f
      Dmitry Guryanov 提交于
      Add files parallels_sdk.c and parallels_sdk.h for code
      which works with SDK, so libvirt's code will not mix with
      dealing with parallels SDK.
      
      To use Parallels SDK you must first call PrlApi_InitEx function,
      and then you will be able to connect to a server with
      PrlSrv_LoginLocalEx function. When you've done you must call
      PrlApi_Deinit. So let's call PrlApi_InitEx on first .connectOpen,
      count number of connections and deinitialize, when this counter
      becomes zero.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e7bb373f
  19. 10 3月, 2014 1 次提交
  20. 21 9月, 2012 1 次提交
  21. 01 8月, 2012 1 次提交
  22. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  23. 18 12月, 2010 1 次提交
    • M
      vbox: Add glue layer for MSCOM on Windows · 448347f8
      Matthias Bolte 提交于
      Don't require dlopen, but link to ole32 and oleaut32 on Windows.
      
      Don't expose g_pVBoxFuncs anymore. It was only used to get the
      version of the API. Make VBoxCGlueInit return the version instead.
      This simplifies the implementation of the MSCOM glue layer.
      
      Get the VirtualBox version from the registry.
      
      Add a dummy implementation of the nsIEventQueue to the MSCOM glue
      as there seems to be no direct equivalent with MSCOM. It might be
      implemented using the normal window message loop. This requires
      additional investigation.
      448347f8
  24. 23 3月, 2010 1 次提交
  25. 10 3月, 2010 1 次提交
  26. 18 1月, 2010 1 次提交
  27. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055