News for hackers. Stuff that matters.
Re:macOS Containers v0.0.1 by WesolyKubeczek on Tuesday September 26, 2023 @12:02PM (#37661330)
> But Apple provides a neat virtualization framework, and you get security + isolation + reproducibility + decent performance.

You also get limits on how many VMs your machine can run, each VM needs gobs of storage and locked-out RAM blocks, and sharing directories between the host and guest, compared to bind mounts, is something that makes me remember for my root canal dental jobs wistfully.

Re:macOS Containers v0.0.1 by duped on Tuesday September 26, 2023 @12:07PM (#37661405)
I've only used it with Linux kernels, but that has not been my experience with the new Virtualization.framework. The perf of virtio shares is reasonably fast.

I can see how you'd need a crap ton of disk for MacOS virtualization, but again, why do you need it?

If it's isolation for builds, fix your build. If it's isolation for tests, live with it. If it's for running your app, write your app to properly run in the app sandbox.

Re:macOS Containers v0.0.1 by WesolyKubeczek on Tuesday September 26, 2023 @12:16PM (#37661531)
> reasonably fast.

But still not "as fast as it gets". And I want it to be as fast as it gets.

Re:macOS Containers v0.0.1 by duped on Tuesday September 26, 2023 @12:23PM (#37661635)
Neither is using macfuse as a stand in for overlayfs and bind mounts.

My point is "as fast as it gets" is using MacOS how MacOS is designed: ie, through sandboxing and not containerization that pretends the MacOS userspace is Linux. It's not Linux.

There is a fundamental trade off between isolation and performance. You cannot securely share resources without overhead.

Re:macOS Containers v0.0.1 by slonopotamus on Tuesday September 26, 2023 @02:04PM (#37663368)
FUSE is only used for bind mounts. If you write to a directory that belongs to container, you get the raw speed of host OS.
Re:macOS Containers v0.0.1 by duped on Tuesday September 26, 2023 @08:20PM (#37667893)
How do you support layers without overlayfs?
Re:macOS Containers v0.0.1 by slonopotamus on Wednesday September 27, 2023 @03:44AM (#37671418)
It's not me, it's containerd "native" snapshotter. It turns to be efficient on macOS thanks to `clonefile` syscall.
Re:macOS Containers v0.0.1 by starttoaster on Tuesday September 26, 2023 @01:46PM (#37663036)
> If it's isolation for builds, fix your build

Isolation fixes the problem for free and is more similar to how I build for Linux. Why would I want another solution?

Re:macOS Containers v0.0.1 by duped on Tuesday September 26, 2023 @02:04PM (#37663369)
MacOS apps are designed to be self contained and not require isolation, unlike most Linux distros, which are designed to use FHS and share their state/dependencies with everything else on the system.

Further you can sandbox processes just fine on MacOS without needing to mock the whole userspace, like you do on Linux. This will give you the same degree of isolation that a container does.