Skip to content

Commit

Permalink
Orbstack warning about device sharing
Browse files Browse the repository at this point in the history
Signed-off-by: Dramelac <[email protected]>
  • Loading branch information
Dramelac committed Jul 8, 2024
1 parent bc11684 commit c11ff72
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions exegol/model/ContainerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,9 +1280,13 @@ def addRawVolume(self, volume_string):

def addUserDevice(self, user_device_config: str):
"""Add a device from a user parameters"""
if EnvInfo.isDockerDesktop() and user_device_config not in self.__whitelist_dd_devices:
logger.warning("Docker desktop (Windows & macOS) does not support USB device passthrough.")
logger.verbose("Official doc: https://docs.docker.com/desktop/faqs/#can-i-pass-through-a-usb-device-to-a-container")
if (EnvInfo.isDockerDesktop() or EnvInfo.isOrbstack()) and user_device_config not in self.__whitelist_dd_devices:
if EnvInfo.isDockerDesktop():
logger.warning("Docker desktop (Windows & macOS) does not support USB device passthrough.")
logger.verbose("Official doc: https://docs.docker.com/desktop/faqs/#can-i-pass-through-a-usb-device-to-a-container")
elif EnvInfo.isOrbstack():
logger.warning("Orbstack does not support (yet) USB device passthrough.")
logger.verbose("Official doc: https://docs.orbstack.dev/machines/#usb-devices")
logger.critical("Device configuration cannot be applied, aborting operation.")
self.__addDevice(user_device_config)

Expand Down

0 comments on commit c11ff72

Please sign in to comment.