Skip to content

SMB mount issue on Windows #33

Description

@joeyhage

Sandbox works when I don't mount anything but fails on a cifs mount. I tried readonly mounts, formatting the windows path as both /c/Users/... and r"C:\Users\...". I've tried both python 3.11 and 3.14, and both python from python.org and the Astral python-build-standalone python builds.

quicksand run  --mount "$PWD.Path:/workspace" --log-level debug quicksand-agent
Starting quicksand-agent sandbox...
quicksand.image: Resolved base image via entry point: ubuntu
quicksand.image: Loaded save: parent=ubuntu, own_overlays=1, total_chain=2
quicksand.image: Resolved base image via entry point: quicksand-agent
quicksand.sandbox: Using WHPX - increasing boot timeout to 120.0s
quicksand.smb: QuicksandSMBTCPServer listening on 127.0.0.1:61204 (config=<USER_HOME>\AppData\Local\Temp\quicksand-smb-XXXXXXXX\smb_config.json)
quicksand.sandbox: Starting VM: port=61201, image=<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_ubuntu\images\ubuntu-24.04-amd64.qcow2
quicksand.sandbox: QEMU command: <USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_qemu\bin\qemu-system-x86_64.exe -nodefaults -machine q35 -m 512M -smp 1 -L <USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_qemu\bin\share\qemu -object iothread,id=iothread0 -drive file=<USER_HOME>\AppData\Local\Temp\quicksand-XXXXXXXX\overlay.qcow2,format=qcow2,if=none,id=drive0,cache=writethrough,discard=unmap,detect-zeroes=unmap -device virtio-blk-pci,drive=drive0,iothread=iothread0 -serial stdio -nographic -vga none -global virtio-net-pci.romfile= -accel whpx,kernel-irqchip=off -qmp tcp:127.0.0.1:61202,server,nowait -device virtio-serial-pci -chardev socket,host=127.0.0.1,port=61203,server=on,wait=off,id=vserial0 -device virtserialport,chardev=vserial0,name=quicksand.agent.0 -kernel <USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_ubuntu\images\ubuntu-24.04-amd64.kernel -append root=/dev/vda rw rootflags=rw console=ttyS0 rootfstype=ext4 quiet loglevel=0 raid=noautodetect quicksand_token=<REDACTED_TOKEN> quicksand_port=61201 noapic -initrd <USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_ubuntu\images\ubuntu-24.04-amd64.initrd -netdev user,id=net0,restrict=on,hostfwd=tcp:127.0.0.1:61201-:61201,guestfwd=tcp:10.0.2.100:445-cmd:<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\python.exe <USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\_tcp_relay.py 127.0.0.1 61204 -device virtio-net-pci,netdev=net0
quicksand.process: Started QEMU via reaper, reaper PID 24120
quicksand.virtio_agent: Connecting to agent via virtio-serial: 127.0.0.1:61203
quicksand.virtio_agent: Virtio-serial agent authentication successful
quicksand.sandbox: Connected to agent via virtio-serial
quicksand.qmp: QMP connected on port 61202
quicksand.sandbox: QMP client connected on port 61202
quicksand.smb: Added share QUICKSAND_<REDACTED_ID> -> <REDACTED_PATH> (readonly=False)

Traceback (most recent call last):
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\sandbox\_lifecycle.py", line 245, in _post_boot_setup
    await self._mount_shares()
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\sandbox\_mounts.py", line 138, in _mount_shares
    await self._mount_cifs_share(share_name, mount.guest, mount.readonly)
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\sandbox\_mounts.py", line 107, in _mount_cifs_share
    raise RuntimeError(f"Failed to mount CIFS share {share_name}: {last_error}")
RuntimeError: Failed to mount CIFS share QUICKSAND_<REDACTED_ID>: mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Scripts\quicksand.exe\__main__.py", line 5, in <module>
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand\cli\__init__.py", line 35, in main
    return run.cmd(args)
           ^^^^^^^^^^^^^
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand\cli\run.py", line 149, in cmd
    return asyncio.run(_cmd_async(args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\asyncio\base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand\cli\run.py", line 242, in _cmd_async
    await sb.start()
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\sandbox\_sandbox.py", line 177, in start
    await self._post_boot_setup()
  File "<USER_HOME>\AppData\Local\mise\installs\python\3.11.15\Lib\site-packages\quicksand_core\sandbox\_lifecycle.py", line 248, in _post_boot_setup
    raise RuntimeError(f"Failed to mount shares: {e}") from e
RuntimeError: Failed to mount shares: Failed to mount CIFS share QUICKSAND_<REDACTED_ID>: mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions