Skip to content

Disabling file sharing feature for isolation #169

Closed

Description

@siketyan

Is your feature request related to a problem? Please describe.
When I want to run a virtual machine as isolated from the host, such as running a GitHub Actions Self-Hosted Runner, I want to disable bidirectional file sharing between macOS and Linux.

Describe the solution you'd like
It would be great if we can disable file sharing for a specific Linux instance explicitly.

Describe alternatives you've considered
N/A

Additional context
N/A

Activity

  1. moved this to Planned in Feature Roadmapon Apr 16, 2023
  2. kdrag0n commented on May 2, 2023

    @kdrag0n
    Member

    This is planned but it's worth nothing that similar to WSL, the shared lightweight kernel/VM that runs Docker and machines will always have access to the underlying mounts. This means that it's not advisable to rely on them for true security purposes, as a Linux kernel vulnerability would allow mounting the shared file system anyway.

    However, as long as the Linux kernel's security is not compromised, this should be an effective form of access control.

  3. dnaq commented on Jun 4, 2023

    @dnaq

    It would be great for my use cases if it was possible to set up specific file shares between the host and VM, not just to have an all or nothing approach. Having support for that would allow me to move completely to orbstack and not have to use UTM/parallels anymore.

  4. kdrag0n commented on Jun 5, 2023

    @kdrag0n
    Member

    It would be great for my use cases if it was possible to set up specific file shares between the host and VM, not just to have an all or nothing approach. Having support for that would allow me to move completely to orbstack and not have to use UTM/parallels anymore.

    @dnaq Can you elaborate on why that's a must-have for your use case?

  5. dnaq commented on Jun 5, 2023

    @dnaq

    Sure. There are mostly two main reasons:

    1. Client requirements, e.g. it’s ok for the client that the VM can read/write a client specific folder on the host, as long as other VMs can’t read that folder. Host is trusted, VMs aren’t to that extent.
    2. Analysis of untrusted (potentially malicious) code, where the results of the analysis are needed outside of the VM. I realise that there is always the possibility of kernel/vm escapes, but that risk is much lower than malicious user space code.

    Hope that helps

  6. FreeIdom commented on Jun 29, 2023

    @FreeIdom

    I have the same needs, please consider allow specific file shares between the host and VM

  7. ludwig-gramberg commented on Jul 11, 2023

    @ludwig-gramberg

    +1 on chosing to share specific folders between mac and the vm
    just consider a badly ran command in the vm can delete a lot of files on the host

  8. kdrag0n commented on Jul 16, 2023

    @kdrag0n
    Member

    Update: This has been mostly implemented internally for several versions, but there are a few remaining gaps to close before it'll actually have any security value. That's why it hasn't been exposed yet.

    If you want specific file sharing paths, please open a separate issue.

  9. hkrutzer commented on Oct 5, 2023

    @hkrutzer

    For me, simply not sharing anything would be sufficient; a lot of software I run in the VM turns out to write config into the homedir. Probably the shell history too. I don't want that on my host machine.

  10. kdrag0n commented on Oct 5, 2023

    @kdrag0n
    Member

    @hkrutzer Linux and macOS home directories are already separate: /home/$USER and /Users/$USER.

  11. MisterMountain commented on Oct 5, 2023

    @MisterMountain

    @hkrutzer
    As far as i see it the homedir of the user in the VM is not /Users/MisterMountain:
    MisterMountain@gentoo ~ $ echo $HOME /home/MisterMountain

  12. hkrutzer commented on Oct 5, 2023

    @hkrutzer

    That is strange, I will test again!

  13. 57 remaining items

  14. tbodt commented on Mar 5, 2026

    @tbodt

    There's actually a secret API to enable "isolated" mode on a machine:

    1. Run orbctl info <machine name> and copy the "ID" it gives.
    2. Run curl -v --unix-socket ~/.orbstack/run/sconrpc.sock http://sconrpc --json '{"jsonrpc":"2.0","id":1,"method":"ContainerSetConfig","params":{"container_key":"<ID>","config":{"isolated":<true or false>}}}, substituting the ID and whether you want isolated mode on or off.
    3. Fully restart OrbStack.

    To be clear I do not know precisely what it does, it might not be a bulletproof sandbox. But it seems to prevent mounting the file shares, and more importantly makes the machine's container run as an unprivileged user in the real vm (without that, something running as root in the container could simply mount -t virtiofs mac /mnt/mac and get access to all your files).

    Edit: This is probably what this comment was referring to.

  15. z7311873 commented on Apr 5, 2026

    @z7311873

    我使用它做一些测试脚本的工作,当然也包括删除文件功能的脚本。
    虚拟机是一个很棒的测试环境,但它与mac共享文件夹使我非常苦恼。
    希望尽快实装这个功能,以免我不小心删除掉mac上的文件。

  16. Pribess commented on Apr 8, 2026

    @Pribess

    would be great to have a way to control mounts per path not just for isolation but also to avoid exposing things like /Users /Applications /Library by default

  17. witgaw commented on Apr 16, 2026

    @witgaw

    At least add a big fat warning to the docs explaining that there's no isolation at all while you're working on it.
    I don't think it's such a stretch for people finding your product more or less by chance to assume VMs will be isolated.

  18. added this to the v2.1.0 milestone on Apr 20, 2026
  19. kdrag0n commented on Apr 20, 2026

    @kdrag0n
    Member

    Fixed in v2.1.0.

  20. pbowyer commented on Apr 20, 2026

    @pbowyer

    The docs aren't updated yet, but when you create a new machine in the GUI there's a new option:

    Image

    And if you use orb create on the CLI there's a new flag:

    --isolated           Create an isolated machine (disables file sharing and integration)
    

    Very excited to try this out today 😀

  21. mcx808 commented on Apr 20, 2026

    @mcx808

    Fixed in v2.1.0.

    Is this only for newly created machines? There toggle doesn't work for an existing one.

  22. LeonMueller-OneAndOnly commented on Apr 20, 2026

    @LeonMueller-OneAndOnly

    Fixed in v2.1.0.

    Is this only for newly created machines? There toggle doesn't work for an existing one.

    What do you mean with it doesnt work? That it silently fails (and non isolates) or that this toggle is disabled?

    When the machine is stopped, that toggle can be used

  23. mcx808 commented on Apr 20, 2026

    @mcx808

    Fixed in v2.1.0.

    Is this only for newly created machines? There toggle doesn't work for an existing one.

    What do you mean with it doesnt work? That it silently fails (and non isolates) or that this toggle is disabled?

    When the machine is stopped, that toggle can be used

    I had an existing debian 13 x86 machine, but /mnt/mac and /mnt/machines and the symlinks in / were still traversable after toggling the isolated switch.

    I just re-tested with a new machine and confirmed the behaviour (same for arm), and it seems the same vice-versa is also true. If a machine is created with the isolated switch, then toggling it off does not present the mounts when the machine is started again.

  24. mcx808 commented on Apr 30, 2026

    @mcx808

    Managed to re-test isolation toggle in 2.1.1 and it works properly now.

  25. agnosticlines commented on May 5, 2026

    @agnosticlines

    @kdrag0n thanks for landing this! would it be possible to get some threat model docs up so we can see what it does/doesn't cover? I understand it covers the bind mounts but OrbStack does a lot of magic under the hood (I assume that's what "integration" covers)

  26. giautm commented on Jun 10, 2026

    @giautm

    Can you guys implement this feature for the VM that running docker engine? I want to isolate that machine so it unable to mount the host root FS into new container.

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

    f/machinesAffects Linux machine userst/featureNew feature

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions