Skip to content

[Bug]: "container system start" hangs when app root is placed on an external disk #621

Open

Description

@GarthSnyder

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

The container system start command hangs indefinitely for me whenever the app root is on an external disk. It prints "Verifying apiserver is running..." but never progresses beyond that.

Things I've tried that all fail in this same way:

  • Starting the 0.4.1 release version installed via package with container system start --app-root path-to-existing-dir, where path-to-existing-dir is on an external drive.
  • Symbolic linking ~/Library/Application Support/com.apple.container to path-to-existing dir.
  • Cloning the current repo to an external disk and running make all test integration as suggested in the BUILDING document.
  • Cloning the current repo to a second external disk and running make all test integration.

Things that work fine:

  • Using container normally with no special configuration.
  • Cloning to my home directory (on the root disk) and running make all test integration.

I would imagine it fails similarly on any non-root disk, but in true Apple style, I have only the one internal disk to test with. When failing during make, the process hangs at:

Running the integration tests...
Warning! Running debug build. Performance may be degraded.
Verifying apiserver is running...

Note that the make test phase always seems to work fine--even on an external disk--and it runs without errors, even though testing also appears to depend on the apiserver.

Control-C'ing the container start command after it hangs leaves the container system in a wedged and unrecoverable state. Containers can't be used until after a reboot.

Current behavior

As described above.

Expected behavior

I just want containers stored on an external disk that I specify. In other ways, I don't think there's anything unusual about what I'm trying to do.

Environment

- OS: Tahoe 26.0 release version
- Xcode: 26.0, tool chain 6.2
- Container: Doesn't get far enough to run containers

Relevant log output

See above.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Sep 17, 2025
  2. changed the title [-][Bug]: container hangs when app root is placed on an external disk[/-] [+][Bug]: **container system start** hangs when app root is placed on an external disk[/+] on Sep 17, 2025
  3. changed the title [-][Bug]: **container system start** hangs when app root is placed on an external disk[/-] [+][Bug]: "container system start" hangs when app root is placed on an external disk[/+] on Sep 17, 2025
  4. jglogan commented on Sep 18, 2025

    @jglogan
    Contributor

    Thanks for the issue...we'll see if we can reproduce this!

  5. jglogan commented on Sep 19, 2025

    @jglogan
    Contributor

    @GarthSnyder what sort of external storage are you using, and what kind of volume is on it?

  6. GarthSnyder commented on Sep 19, 2025

    @GarthSnyder
    Author

    Ah, I should have specified. As mentioned above, I've reproduced this behavior with --app-root set to two different devices, both external.

    The "really wish it worked on" drive is a 4TB Western Digital SN850X SSD in a One World Computing 1M2 enclosure connected by a Thunderbolt 4 cable and (near as I can tell) using the Thunderbolt 4 protocol. The drive is one large APFS container that includes multiple volumes. This setup has been rock solid, although it's only six months old or so.

    The other drive is a Micron/Crucial MX500 1TB SATA SSD in a Wavlink WL-ST334U dual 3.5" SATA cradle. The cradle is junk, but when it's not spontaneously disconnecting it generally works fine. This drive is also APFS, but with a single APFS volume. The connection is some variant of USB3 SuperSpeed.

    I ran both the APFS volumes through Disk Utility First Aid, and they both check out OK.

  7. outcoldman commented on Nov 4, 2025

    @outcoldman

    Playing with the app-root as well, for me it does not hang but fails to start (similar to how other people have issues with home directory being on external drive).

    I have NVMe RAID0 (APFS (Encrypted)). Where I was able to run Docker for Mac, and Parallels. But container fails to start there

    container system start  --app-root /Volumes/DATA/com.apple.container
    Verifying apiserver is running...
    Error: interrupted: "internalError: "failed to get a response from apiserver: interrupted: "XPC connection error: Connection invalid""
    Ensure container system service has been started with `container system start`."
    

    I see that it creates /Volumes/DATA/com.apple.container/apiserver/apiserver.plist file but that is it. Nothing else.

  8. added this to the 2026-02 milestone on Jan 25, 2026
  9. self-assigned this
    on Jan 25, 2026
  10. added
    facet/storage
    facet/builder-native
    and removed
    facet/builder-native
    on Feb 2, 2026
  11. jongross commented on Feb 3, 2026

    @jongross

    I have been able to sort of do this with an NVMe external drive formatted to apfs by mounting it into the library folder in place of the container folder, but it's not ideal.

  12. outcoldman commented on Feb 3, 2026

    @outcoldman

    Mount the whole volume there? Or just make a symlink?

  13. jongross commented on Feb 3, 2026

    @jongross

    I tried symlink first, as that was the easy path, but container complained and bailed out, and looking through the logs, it didn't like that it was a file.

    So I mounted it directly under:

    /Users/[username]/Library/Application Support/com.apple.container/containers

    which seemed to be where the bulk of the files were kept.

    which seems to work until we have a more elegant solution.

  14. erikswedberg commented on Feb 9, 2026

    @erikswedberg

    Watching this. Very keen on having container work on an external drive / Volume, since my MacBook is only 500gb and i'm always flirting with a full disk.

  15. modified the milestones: 2026-02, 2026-03 on Feb 23, 2026
  16. self-assigned this
    on Mar 8, 2026
  17. modified the milestones: 2026-04, 2026-05 on Apr 22, 2026
  18. jglogan commented on Apr 28, 2026

    @jglogan
    Contributor

    @adityaramani Related to #205. The first root cause we need to address is launchd refusing to start services; see #205 (comment).

  19. removed this from the 2026-05 milestone on May 19, 2026
  20. hexonal commented on Aug 2, 2026

    @hexonal

    A positive data point, since the failing reports here are all on older versions or different volume shapes: --app-root on an external drive works for me on 1.2.0, including container system start, image pull, and a long-running container with a bind mount back to the same volume.

    The exact configuration:

    container 1.2.0 (Homebrew)
    macOS 26.5.2 (25F84), Apple silicon
    Drive 512 GB NVMe in an external enclosure, Protocol: PCI-Express
    Volume APFS, single volume in the container
    Encrypted No
    Owners Enabled — mount shows no noowners
    app-root /Volumes/<vol>/Developer/caches/container (nested, not the volume root)

    Differences I can see from the reports above, offered only as comparison points rather than a diagnosis:


    A separate gap, which I think is what #1121 was actually asking for when it was closed into this issue: --app-root does not persist.

    After container system start --app-root /Volumes/…, the generated <appRoot>/apiserver/apiserver.plist is correct — it has RunAtLoad = true and CONTAINER_APP_ROOT pointing at the external path. But that plist is not in ~/Library/LaunchAgents, and a launchctl bootstrap gui/$UID registration is session-scoped. So:

    • a later plain container system start silently reverts appRoot to ~/Library/Application Support/com.apple.container (verified: container system status reports the internal path again, and a fresh empty tree is created there), and
    • nothing auto-starts after a reboot.

    For anyone landing here wanting images off their boot disk, that means the flag alone is not enough — the setting has to be re-applied on every start, and forgetting it quietly refills the internal disk. config.toml has no key for this either (the schema in docs/container-system-config.md covers [build] [container] [dns] [kernel] [network] [registry] [vminit] [plugin.<id>] only).

    I worked around it with a small user LaunchAgent that runs container system start --app-root … at login, with a guard that does nothing if the volume is not mounted — deliberately preferring "services do not start" over "silently falls back to the boot disk". Happy to open a separate issue for the persistence half if you would rather keep this one scoped to the hang.

  21. GarthSnyder commented on Aug 3, 2026

    @GarthSnyder
    Author

    Thanks for this follow-up! I'm going to give this another try.

  22. andbez commented on Sep 2, 2026

    @andbez

    @hexonal I am trying to setup my env like yours, because I need the external storage for my setup. If I start 'container system start --app-root /Volumes/.../ContainerRoot/AppRoot' it tries to test access to container-apiserver ("Testing access to container-apiserver..."). But - if I understood correctly - the service is not started, because the plist-file is not in the correct folder (~/Library/LaunchAgents) but in the AppRoot-Folder. Did I miss something or can you provide your LaunchAgent-File, please?
    Thank you!

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

Metadata

Metadata

Labels

facet/storage

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions