(detach=True, force=False)
Unmounts all currently attached disk images with optional force param.

  Args:
    detach: whether to detach
    force: whether to force the unmount
Unmounts all currently attached disk images with optional force param.
Unmounts all currently attached disk images with optional force param .
def UnmountAllDiskImages(detach=True, force=False):
  """Unmounts all currently attached disk images with optional force param.

  Args:
    detach: whether to detach
    force: whether to force the unmount
  """
  for image in AttachedImages():
    if detach:
      image["image"].Detach(force=force)
    else:
      try:
        for disk in image["disks"]:
          if disk.Mounted():
            disk.Unmount(force=force)
      except KeyError:
        pass
def UnmountAllDiskImages ( detach = True , force = False ) : for image in AttachedImages ( ) : if detach : image [ "image" ] . Detach ( force = force ) else : try : for disk in image [ "disks" ] : if disk . Mounted ( ) : disk . Unmount ( force = force ) except KeyError : pass