1. 12 4月, 2016 1 次提交
    • N
      vz: factor out config update flags checks · 3fbb7dba
      Nikolay Shirokovskiy 提交于
      Actually this is not pure refactoring. Part of common code is
      replaced with virDomainObjUpdateModificationImpact and this
      a good replacement. It includes removed check of inactive
      domain and active flags set. Additionally we resolve
      current flag in accordance with current state of domain.
      Thus it becames possible to attach/detach devices for
      inactive domains if this flag is set.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      3fbb7dba
  2. 18 3月, 2016 1 次提交
    • M
      Drop paths.h include · 865764de
      Michal Privoznik 提交于
      We include the file in plenty of places. This is mostly due to
      historical reasons. The only place that needs something from the
      header file is storage_backend_fs which opens _PATH_MOUNTED. But
      it gets the file included indirectly via mntent.h. At no other
      place in our code we need _PATH_.*. Drop the include and
      configure check then.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      865764de
  3. 17 3月, 2016 5 次提交
  4. 09 3月, 2016 1 次提交
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
  5. 01 3月, 2016 1 次提交
  6. 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
  7. 04 2月, 2016 1 次提交
  8. 11 1月, 2016 1 次提交
  9. 24 12月, 2015 2 次提交
  10. 09 12月, 2015 2 次提交
  11. 24 11月, 2015 1 次提交
  12. 19 11月, 2015 1 次提交
  13. 10 11月, 2015 1 次提交
  14. 21 10月, 2015 1 次提交
  15. 20 10月, 2015 3 次提交
  16. 08 10月, 2015 1 次提交
  17. 06 10月, 2015 2 次提交
  18. 22 9月, 2015 1 次提交
  19. 14 7月, 2015 3 次提交
  20. 08 7月, 2015 2 次提交
  21. 06 7月, 2015 1 次提交
    • D
      vz: fix building capabilities · 651426e9
      Dmitry Guryanov 提交于
      There should be at least one domain for each guest
      in cababilities. And in current code we don't add
      domain for this guest for example.
      
          if ((guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM,
                                               VIR_ARCH_X86_64,
                                               "vz",
                                               NULL, 0, NULL)) == NULL)
      
      Anyway, with two virt types it looks a litte messy, so let's
      move adding guest and domain to a separate function.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      651426e9
  22. 28 6月, 2015 1 次提交
  23. 26 6月, 2015 4 次提交
  24. 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
  25. 17 6月, 2015 1 次提交