←back to thread

159 points GreenGames | 4 comments | | HN request time: 0.001s | source

Hey HN, we're excited to share Lumier (https://github.com/trycua/cua/tree/main/libs/lumier), an open-source tool for running macOS and Linux virtual machines in Docker containers on Apple Silicon Macs.

When building virtualized environments for AI agents, we needed a reproducible way to package and distribute macOS VMs. Inspired by projects like dockur/windows (https://github.com/dockur/windows) that pioneered running Windows in Docker, we wanted to create something similar but optimized for Apple Silicon. The existing solutions either didn't support M-series chips or relied on KVM/Intel emulation, which was slow and cumbersome. We realized we could leverage Apple's Virtualization Framework to create a much better experience.

Lumier takes a different approach: it uses Docker as a delivery mechanism (not for isolation) and connects to a lightweight virtualization service (lume) running on your Mac. This creates true hardware-accelerated VMs using Apple's native virtualization capabilities.

With Lumier, you can: - Launch a ready-to-use macOS VM in minutes with zero manual setup - Access your VM through any web browser via VNC - Share files between your host and VM effortlessly - Use persistent storage or ephemeral mode for quick tests - Automate VM startup with custom scripts

All of this works natively on Apple Silicon (M1/M2/M3/M4) - no emulation required.

To get started:

1. Install Docker for Apple Silicon: https://desktop.docker.com/mac/main/arm64/Docker.dmg

2. Install lume background service with our one-liner:

  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
3. Start a VM (ephemeral mode):

  docker run -it --rm \
  --name lumier-vm \
    -p 8006:8006 \
    -e VM_NAME=lumier-vm \
    -e VERSION=ghcr.io/trycua/macos-sequoia-cua:latest \
    -e CPU_CORES=4 \
    -e RAM_SIZE=8192 \
    trycua/lumier:latest
4. Open http://localhost:8006/vnc.html in your browser. The container will generate a unique password for each VM instance - you'll see it in the container logs.

For persistent storage (so your changes survive container restarts):

mkdir -p storage docker run -it --rm \ --name lumier-vm \ -p 8006:8006 \ -v $(pwd)/storage:/storage \ -e VM_NAME=lumier-vm \ -e HOST_STORAGE_PATH=$(pwd)/storage \ trycua/lumier:latest

Want to share files with your VM? Just add another volume:

mkdir -p shared docker run ... -v $(pwd)/shared:/shared -e HOST_SHARED_PATH=$(pwd)/shared ...

You can even automate VM startup by placing an on-logon.sh script in shared/lifecycle/.

We're seeing people use Lumier for: - Development and testing environments that need macOS - CI/CD pipelines for Apple platform apps - Disposable macOS instances for security research - Automated UI testing across macOS versions - Running AI agents in isolated environments

Lumier is 100% open-source under the MIT license. We're actively developing it as part of our work on C/ua (https://github.com/trycua/cua), and we'd love your feedback, bug reports, or feature ideas.

We'll be here to answer any technical questions and look forward to your comments!

Show context
OsrsNeedsf2P ◴[] No.43987772[source]
Slightly off topic, does anyone know a good way to run Mac VMs on Linux hosts?
replies(3): >>43987927 #>>43988015 #>>43988072 #
busterarm ◴[] No.43988015[source]
Apple's licensing requires the host machine to be OSX. You cannot do what you're asking and be in license compliance.
replies(1): >>43988132 #
1. frabonacci ◴[] No.43988132[source]
Correct. Apple's licensing requires macOS to run on Apple hardware, and limits you to 2 concurrent macOS VMs per host. This is enforced by the Apple Vz framework itself. Some KVM-based solutions bypass these checks, but they aren’t compliant for production use.

There’s instead no such limitation when running Linux VMs on a macOS host.

replies(1): >>43988963 #
2. jamesy0ung ◴[] No.43988963[source]
I'm pretty sure the requirement is that the hardware is an Apple Mac, I don't remember macOS being your Hypervisor a requirement. ESXI supports running macOS on Apple Hardware (it extracts the key from the SMC).
replies(1): >>43991723 #
3. busterarm ◴[] No.43991723[source]
That's not correct.

See Sequoia's license. Search for 'virtualization'.

    D. Virtualization. For each copy of the Apple Software subject to a lease under this Section 3, either a Lessor or a Lessee (but not both) may install, use and run additional copies or instances of the Apple Software within virtual operating system environments in accordance with Section 2B(iii), provided that a Lessor may only virtualize a single instance or copy of the Apple Software as a provisioning tool for the purpose of providing a Lessee with access to and use of the Apple Software pursuant to this Section 3. 

    (Section 2B) (iii) to install, use and run up to two (2) additional copies or instances of the Apple Software, or any prior macOS or OS X operating system software or subsequent release of the Apple Software, within virtual operating system environments on each Apple-branded computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use.

The key phrase is "on each Apple-branded computer you own or control that is already running the Apple Software". It needs to be both an Apple host machine and already running the Apple OS that you're virtualizing.
replies(1): >>43992304 #
4. fragmede ◴[] No.43992304{3}[source]
I've read that three times, and it doesn't seem to prohibit running it on a LinuxVM, as long as the hypervisor is also macOS. Specifically, you'd use macOS as the hypervisor, run a Linux guest, then use nested virtualization (which is supported recently on M3+ mac's) to run macOS on top of that Linux guest.

Why you might ask? Because your existing tooling is already on Linux, so it's easier to manage (for whatever reason) with a semi-homogeneous control plane.