1. 04 11月, 2017 2 次提交
    • D
      vbox: Close media when undefining domains · 7651debb
      Dawid Zamirski 提交于
      When registering a VM we call OpenMedium on each disk image which adds it
      to vbox's global media registry. Therefore, we should make sure to call
      Close when unregistering VM so we cleanup the media registry entries
      after ourselves - this does not remove disk image files. This follows
      the behaviour of the VBoxManage unregistervm command.
      7651debb
    • D
      vbox: Update ATTRIBUTE_UNUSED usage · 6f8ddbb8
      Dawid Zamirski 提交于
      Since the removal of VBOX <= 3x, the function arguments are actually
      used so they should not be marked with ATTRIBUTE_UNUSED anymore.
      6f8ddbb8
  2. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  3. 26 10月, 2017 1 次提交
    • D
      vbox: Read runtime RDP port and handle autoport · 55223c2b
      Dawid Zamirski 提交于
      VirutalBox has a IVRDEServerInfo structure available that
      gives the effective runtime port that the VM is using when it's
      running. This is useful when the "TCP/Ports" VBox property was set to
      port range (e.g. via autoport = "yes" or via VBoxManage) in which
      case it would be impossible to get the "active" port otherwise.
      55223c2b
  4. 25 10月, 2017 2 次提交
    • D
      vbox: Make autoport set RDP port range. · 380815f8
      Dawid Zamirski 提交于
      Originally autoport in vbox driver was setting the port to default value
      (3389) which caused multiple VM instances use the same port. Since
      libvirt XML does not allow to set port ranges, this patch changes the
      "autoport" behavior to set VBox's "TCP/Ports" property to an arbitrary
      port range (3389-3689) to avoid that issue.
      380815f8
    • D
      vbox: Remove old unflexible macros · 32845fd6
      Dawid Zamirski 提交于
      The VBOX_SESSION_OPEN/CLOSE macros are only called in
      _vboxDomainSnapshotRestore and they are unflexible because:
      
      * assume the caller will have variable named "data"
      * can only create Write lock type
      
      As per above, it's not that hard to simply use the VBOX API directly.
      32845fd6
  5. 18 10月, 2017 1 次提交
  6. 14 8月, 2017 1 次提交
  7. 27 7月, 2017 1 次提交
  8. 21 7月, 2017 1 次提交
  9. 07 6月, 2017 2 次提交
  10. 05 6月, 2017 1 次提交
  11. 09 5月, 2017 1 次提交
  12. 27 4月, 2017 1 次提交
  13. 03 4月, 2017 1 次提交
    • M
      virGetDomain: Set domain ID too · 5683b213
      Michal Privoznik 提交于
      So far our code is full of the following pattern:
      
        dom = virGetDomain(conn, name, uuid)
        if (dom)
            dom->id = 42;
      
      There is no reasong why it couldn't be just:
      
        dom = virGetDomain(conn, name, uuid, id);
      
      After all, client domain representation consists of tuple (name,
      uuid, id).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5683b213
  14. 27 3月, 2017 2 次提交
    • M
      Remove src/nodeinfo · 26ae4e48
      Martin Kletzander 提交于
      There is no "node driver" as there was before, drivers have to do
      their own ACL checking anyway, so they all specify their functions and
      nodeinfo is basically just extending conf/capablities.  Hence moving
      the code to src/conf/ is the right way to go.
      
      Also that way we can de-duplicate some code that is in virsysfs and/or
      virhostcpu that got duplicated during the virhostcpu.c split.  And
      Some cleanup is done throughout the changes, like adding the vir*
      prefix etc.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      26ae4e48
    • M
      Move src/fdstream to src/util/virfdstream · bdcb1995
      Martin Kletzander 提交于
      There is no reason for it not to be in the utils, all global symbols
      under that file already have prefix vir* and there is no reason for it
      to be part of DRIVER_SOURCES because that is just a leftover from
      older days (pre-driver modules era, I believe).
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      bdcb1995
  15. 11 1月, 2017 11 次提交
    • D
      vbox: consolidate vbox IID structures. · 73c6f16b
      Dawid Zamirski 提交于
      * remove _vboxIID_v2_x and _vboxIID_v3_x structs and repalce with one
        _vboxIID as all supprted vbox versions have the same IID structure.
      * remove vboxIIDUnion that was used to abstract version depended IID
        differences.
      * remove IID_MEMBER macro and use the new vboxIID directly.
      73c6f16b
    • D
      vbox: fix _displayTakeScreenShotPNGToArray · 36288917
      Dawid Zamirski 提交于
      This function was not implemented for vbox 5+ which removed
      TakeScreenShotPNGToArray but provides TakeScreenShotToArray with
      BitmapFormat_PNG argument which is the same thing.
      36288917
    • D
      vbox: IVRDxServer to IVRDEServer. · 5a5c6de3
      Dawid Zamirski 提交于
      The IVRDxServer was used because vbox < 4 used to have IVRDPServer
      whereas vbox >= 4 has IVRDEServer. Now that support for legacy
      versions is being removed, we can use IVRDEServer.
      5a5c6de3
    • D
      vbox: remove code dealing with oldMediumInterface · f2f70c21
      Dawid Zamirski 提交于
      * removed oldMediumInterface flag and related code that was used for
        vbox 2.x
      * remove accelerate2DVideo and networkRemoveInterface flags which were
        also conditionals for handling legacy vbox versions.
      f2f70c21
    • D
      vbox: remove domain events support. · 1d963578
      Dawid Zamirski 提交于
      this was implemented only for vbox 3 series and was mostly stubs
      anyway.
      1d963578
    • D
      vbox: remove getMachineForSession flag. · 374422ea
      Dawid Zamirski 提交于
      * the getMachineForSession is always true for 4.0+. This also means that
        checkflag argument in openSessionForMachine no longer has any meaning
        because it was or'ed with getMachineForSession (always true)
      * remove supportScreenshot flag - vbox 4.0+ supports it
      * remove detachDevicesExplicitly flag only relevant for < 4.0
      374422ea
    • D
      vbox: do not use IHardDisk anymore. · d7f369b5
      Dawid Zamirski 提交于
      VirtualBox 4.0+ uses IMedium and IHardDisk is no longer used, so
      
      * remove typef IMedium IHardDisk
      * merge UIHardDisk into UIMedium
      * update all references accordingly
      d7f369b5
    • D
      vbox: remove _vboxAttachDrivesOld · c7c286c6
      Dawid Zamirski 提交于
      and fold vboxAttachDrivesNew into vboxAttachDrives
      c7c286c6
    • D
      vbox: remove code for old API versions. · c8d7e90f
      Dawid Zamirski 提交于
      This removes most of the code wrapped in VBOX_API_VERSION < 4000000
      preprocessor checks. Those are the ones that can be safely removed
      without needing to update driver code to accomodate it.
      c8d7e90f
    • D
      vbox: remove calls to *InstallUniformedAPI macros. · 655a99f1
      Dawid Zamirski 提交于
      That is, for versions older than 4.0. Also do not try to include
      headers for those old versions.
      655a99f1
    • D
      vbox: remove SDK header files for vbox 3 and older. · 7f10ac33
      Dawid Zamirski 提交于
      * delete SDK header files for vbox older than 4.0
      * delete .c files for vbox older than 4.0
      * update vbox_XPCOMCGlue to use oldest supported header file, that is 4.0
        going forward.
      * remove deleted files from Makefile.am
      7f10ac33
  16. 02 12月, 2016 1 次提交
  17. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  18. 24 11月, 2016 2 次提交
    • D
      vbox: get rid of g_pVBoxGlobalData · 63586535
      Dawid Zamirski 提交于
      now that we have a new global vboxDriver object, remove the old
      vboxGlobalData struct and all references to it.
      63586535
    • D
      vbox: change how vbox API is initialized. · 04518c36
      Dawid Zamirski 提交于
      * add vboxDriver object to serve as a singleton global object that
        holds references to IVirtualBox and ISession to be shared among
        multiple connections. The vbox_driver is instantiated only once in
        the first call vboxGetDriverConnection function that is guarded by
        a mutex.
      
      * call vbox API initialize only when the first connection is
        established, and likewise uninitialize when last connection
        disconnects. The prevents each subsequent connection from overwriting
        IVirtualBox/ISession instances of any other active connection that
        led to libvirtd segfaults. The virConnectOpen and virConnectClose
        implementations are guarded by mutex on the global vbox_driver_lock
        where the global vbox_driver object counts connectios and decides
        when it's safe to call vbox's init/uninit routines.
      
      * add IVirutalBoxClient to vboxDriver and use it to in tandem with newer
        pfnClientInitialize/pfnClientUninitalize APIs for vbox versions that
        support it, to avoid usage of the old pfnComInitialize/Uninitialize.
      04518c36
  19. 08 11月, 2016 3 次提交
  20. 22 10月, 2016 1 次提交
  21. 12 10月, 2016 1 次提交
  22. 27 9月, 2016 1 次提交
  23. 26 9月, 2016 1 次提交