1. 15 5月, 2015 1 次提交
  2. 06 5月, 2015 1 次提交
    • J
      vbox: Resolve Coverity RESOURCE_LEAK · 74aab575
      John Ferlan 提交于
      If the virStringSearch() returns a 0 (zero), then each of the uses
      of the call will just jump to cleanup forgetting to free the returned
      empty list. Expand the scope a bit of each use and free at cleanup.
      74aab575
  3. 21 4月, 2015 4 次提交
  4. 08 4月, 2015 2 次提交
    • D
      vbox: Implement virDomainSendKey · 306a242d
      Dawid Zamirski 提交于
      Since the holdtime is not supported by VBOX SDK, it's being simulated
      by sleeping before sending the key-up codes. The key-up codes are
      auto-generated based on XT codeset rules (adding of 0x80 to key-down)
      which results in the same behavior as for QEMU implementation.
      306a242d
    • D
      vbox: Register IKeyboard with the unified API. · 445733f3
      Dawid Zamirski 提交于
      The IKeyboard COM object is needed to implement virDomainSendKey and is
      available in all supported VBOX versions.
      445733f3
  5. 23 3月, 2015 2 次提交
  6. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  7. 13 3月, 2015 1 次提交
  8. 02 3月, 2015 1 次提交
  9. 21 2月, 2015 1 次提交
  10. 06 2月, 2015 1 次提交
  11. 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
      Remove use of storagePrivateData/networkPrivateData from vbox · 47b7f661
      Daniel P. Berrange 提交于
      The vbox driver can use the main hypervisor private data and
      so does not need to use the storage/network private data fields.
      47b7f661
  12. 16 1月, 2015 1 次提交
  13. 14 1月, 2015 1 次提交
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
  14. 13 1月, 2015 1 次提交
  15. 06 1月, 2015 2 次提交
  16. 03 12月, 2014 1 次提交
    • J
      Replace virDomainFree with virObjectUnref · 8fb3aee2
      John Ferlan 提交于
      Since virDomainFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      8fb3aee2
  17. 19 11月, 2014 1 次提交
  18. 15 11月, 2014 1 次提交
  19. 07 11月, 2014 1 次提交
  20. 03 11月, 2014 1 次提交
    • M
      vbox: don't register NULL driver · 55bbc342
      Martin Kletzander 提交于
      We were missing check for the fact that the storage driver was found and
      in case there is no vbox storage driver available, daemon raised the
      following error each start:
      
        error : virRegisterStorageDriver:592 : driver in
        virRegisterStorageDriver must not be NULL
      
      Fixing this makes the condition unified with networkDriver registration
      in vbox as well.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      55bbc342
  21. 01 11月, 2014 1 次提交
  22. 29 10月, 2014 12 次提交
    • E
      maint: avoid static zero init in drivers · ec81cf89
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/libxl/libxl_driver.c: Fix initialization.
      * src/lxc/lxc_controller.c: Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81cf89
    • T
      vbox: Remove unused things in vbox_tmpl.c · 2f055b00
      Taowei Luo 提交于
      After rewriting the whole driver, Only version specified code is
      remained in vbox_tmpl.c. So, this patch removes those unused macros
      header files in vbox_tmpl.c.
      2f055b00
    • 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 vboxStorageVolGetPath · 013aa081
      Taowei Luo 提交于
      013aa081
    • T
      vbox: Rewrite vboxStorageVolGetXMLDesc · 4df7b206
      Taowei Luo 提交于
      4df7b206
    • T
      vbox: Rewrite vboxStorageVolGetInfo · 80f35e6e
      Taowei Luo 提交于
      80f35e6e
    • T
      vbox: Rewrite vboxStorageVolDelete · 1c2c3906
      Taowei Luo 提交于
      The API on IHardDiskAttachment is merged into IMediumAttachment.
      So, we don't need it anymore.
      1c2c3906
    • T
      vbox: Make IMediumAttachment work with vbox2.2 and 3.0 · 3d33e388
      Taowei Luo 提交于
      The GetMedium will always return a IHardDisk object them.
      In 2.2 and 3.0, it is what GetHardDisk exactly do. In 3.1 and later,
      The IMedium is same as IHardDisk.
      3d33e388
    • T
      vbox: Rewrite vboxStorageVolCreateXML · 0cd409cd
      Taowei Luo 提交于
      If the <path> in target element is not given, libvirt will put the
      new volume in ~/.VirtualBox by default.
      0cd409cd
    • T
      vbox: Make CreateHardDisk support all vbox versions · 382e655d
      Taowei Luo 提交于
      The CreateHardDiskMedium only support create HardDisk for medium
      type, and it only works when vbox version >= 3.1. This patch make
      the function workable with all vbox versions and rename it as
      CreateHardDisk.
      
      In vbox 2.2 and 3.0 this function will create a IHardDisk object.
      In vbox later than 3.0, this function will create a IMedium object.
      382e655d
    • T
      vbox: Rewrite vboxStorageVolLookupByPath · fc41e003
      Taowei Luo 提交于
      fc41e003
    • T
      vbox: Make FindMedium support old vbox versions · 1599319c
      Taowei Luo 提交于
      In old version, function FindMedium in UIVirtualBox doesn't work
      for vbox2.2 and 3.0. We assume it will not be used when vbox in
      these versions.
      
      But when rewriting vboxStorageVolLookupByPath, we found it was
      compatibe to use FindMedium to get a IHardDisk object, even in
      vbox old versions. To achieve this, first make FindMedium call
      FindHardDisk when VBOX_API_VERSION < 4000000.
      Then change the argument type **IMedium to **IHardDisk. (As the
      rules in heriachy, we can't transfer a IHardDisk to match
      IMedium in output)
      
      In vbox 2.2 and 3.0, the caller must be aware that they will get
      a IHardDisk object in return.
      1599319c