1. 04 11月, 2017 7 次提交
    • D
      vbox: Support empty removable drives. · 1bf7e977
      Dawid Zamirski 提交于
      Original code was checking for non empty disk source before proceeding
      to actually attach disk device to VM. This prevented from creating
      empty removable devices like DVD or floppy. Therefore, this patch
      re-organizes the loop work-flow to allow such configurations as well as
      makes the code follow better libvirt practices. Additionally, adjusted
      debug logs to be more helpful - removed old ones and added new which
      give more valuable info for troubleshooting.
      1bf7e977
    • D
      vbox: Errors in vboxAttachDrives are now critical · e3ecf4b8
      Dawid Zamirski 提交于
      Previously, if one tried to define a VBOX VM and the API failed to
      perform the requested actions for some reason, it would just log the
      error and move on to process remaining disk definitions. This is not
      desired as it could result in incorrectly defined VM without the caller
      even knowing about it. So now all the code paths that call
      virReportError are now treated as hard failures as they should have
      been.
      e3ecf4b8
    • D
      vbox: Remove unused mediumEmpty · 60227fd5
      Dawid Zamirski 提交于
      Remove the setting since it's unused as of commit 34364df3 which should
      have never copied it in from the old code which ended up getting removed
      as part of commit c7c286c6.
      60227fd5
    • D
      vbox: Cleanup vboxAttachDrives implementation · ff67685b
      Dawid Zamirski 提交于
      This commit primes vboxAttachDrives for further changes so when they
      are made, the diff is less noisy:
      
      * move variable declarations to the top of the function
      * add disk variable to replace all the def->disks[i] instances
      * add cleanup at the end of the loop body, so it's all in one place
        rather than scattered through the loop body. It's purposefully
        called 'cleanup' rather than 'skip' or 'continue' because future
        commit will treat errors as hard-failures.
      ff67685b
    • D
      vbox: vboxAttachDrives now relies on address info · c739a6bd
      Dawid Zamirski 提交于
      Previously, the driver was computing VBOX's devicePort/deviceSlot values
      based on device name and max port/slot values. While this worked, it
      completely ignored <address> values. Additionally, libvirt's built-in
      virDomainDiskDefAssignAddress already does a good job  setting default
      values on virDomainDeviceDriveAddress struct which we can use to set
      devicePort and deviceSlot and accomplish the same result while allowing
      the customizing those via XML. Also, this allows to remove some code
      which will make further patches smaller.
      c739a6bd
    • 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 29 次提交
  3. 02 11月, 2017 2 次提交
  4. 31 10月, 2017 1 次提交
    • J
      spec: Restart libvirtd in posttrans · 1bf89340
      Jiri Denemark 提交于
      When upgrading libvirt packages, there's no strict ordering for the
      installation or removal of the individual libvirt sub packages. Thus
      libvirt-daemon may be upgraded (and its %postun scriptlet) started
      before all sub packages with driver libraries are upgraded. When
      libvirt-daemon's %postun scriptlet restarts the daemon old drivers may
      still be laying around and the daemon may crash when it tries to use
      them.
      
      Let's restart the daemon in %posttrans to make sure libvirtd is
      restarted only after all sub packages are at the same version.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1464300Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1bf89340
  5. 27 10月, 2017 1 次提交