|
| 1 | +# cocoon-macos |
| 2 | + |
| 3 | +macOS VM engine for x86 Linux/KVM, built on |
| 4 | +[cocoon](https://github.com/cocoonstack/cocoon). Boots real macOS guests |
| 5 | +(Sequoia 15, Tahoe 26) as fully-virtualized [QEMU](https://www.qemu.org/)/KVM |
| 6 | +VMs via [OpenCore](https://github.com/acidanthera/OpenCorePkg) + OVMF. A GitHub |
| 7 | +Action installs macOS from scratch and publishes a golden qcow2 to ghcr; a thin |
| 8 | +Go CLI clones that image and boots VMs from it. |
| 9 | + |
| 10 | +``` |
| 11 | +cocoon-macos CLI ──► image: pull the golden macOS qcow2 from ghcr (parallel Range, sha256) |
| 12 | + ──► vm: create/run/console/clone ── QEMU + OpenCore + OVMF, CoW disk, CNI real IP |
| 13 | + ──► snapshot: save/restore ── offline qcow2-internal, per-VM Apple identity |
| 14 | +``` |
| 15 | + |
| 16 | +## Guides |
| 17 | + |
| 18 | +- [Installation](install.md) — host prerequisites, the doctor script (deps + |
| 19 | + firmware), the state directory, and building the CLI |
| 20 | +- [CLI reference](cli.md) — the `image` and `vm` commands, key flags, and what |
| 21 | + `vm run` does under the hood |
| 22 | +- [Images](images.md) — golden images on ghcr, the local cloudimg store, and the |
| 23 | + parallel-Range `image pull` |
| 24 | +- [VM boot & firmware](vm.md) — the OpenCore/OVMF/CPU recipe, the desktop/GUI |
| 25 | + status, and the Setup-Assistant blocker |
| 26 | +- [Networking & VNC](networking.md) — `--net user/tap/bridge/cni`, TC-redirect |
| 27 | + real LAN IP, and per-mode / per-start VNC exposure |
| 28 | +- [Snapshots, clone & data disks](snapshots.md) — offline snapshots, CoW clones |
| 29 | + with a fresh identity, and extra data disks |
| 30 | +- [CI image pipeline](image-pipeline.md) — how the GitHub Action installs macOS |
| 31 | + and publishes the golden images |
| 32 | +- [E2E regression](e2e.md) — the `e2e.sh` lifecycle regression (`[DUMMY]` + |
| 33 | + `[REAL]` tiers) |
| 34 | +- [Known issues](known-issues.md) — no-GPU video, display-sleep VNC blanking, |
| 35 | + and the Setup Assistant |
| 36 | +- [Roadmap](roadmap.md) — what's planned, and what's intentionally out of scope |
| 37 | + |
| 38 | +## Features |
| 39 | + |
| 40 | +- **Fully-automated macOS install** — CI boots OpenCore, erases APFS, drives the |
| 41 | + installer by OCR, and publishes a golden qcow2 (Tahoe 26 / Sequoia 15) to ghcr |
| 42 | +- **SSH-ready golden images** — `tahoe:26` ships an admin `cocoon`/`cocoon` user, |
| 43 | + a complete home, and Remote Login on first boot (plus a `-base` tier) |
| 44 | +- **Parallel Range image pull** — the multi-GB qcow2 is pulled in 8 concurrent |
| 45 | + HTTP Range chunks with an sha256 digest check (oras-go for auth; no `oras` binary) |
| 46 | +- **COW overlays** — an instant copy-on-write clone of the immutable golden base |
| 47 | + per VM |
| 48 | +- **Per-VM Apple identity** — `--random-smbios` injects a unique serial/MLB/UUID/ROM |
| 49 | + (guest MAC = ROM) into a per-VM OpenCore, so clones never share a serial |
| 50 | +- **CNI networking with TC redirect** — `--net cni` joins cocoon's forwarding |
| 51 | + plane so the guest DHCPs a real LAN IP; also `user`/`tap`/`bridge` |
| 52 | +- **Reachable VNC** — loopback VNC on user/tap/bridge; a host-side proxy fronts |
| 53 | + CNI VNC on the host port (password required); launch-scoped, off by default |
| 54 | +- **Snapshot, clone & restore** — offline qcow2-internal snapshots and CoW clones |
| 55 | + that cold-boot a fresh Apple identity |
| 56 | +- **Data disks** — up to 4 extra qcow2 data disks on the AHCI ports the OS disk |
| 57 | + and OpenCore leave free (macOS has no virtio-blk driver) |
| 58 | +- **Intel & AMD** — one boot recipe (Skylake-Client spoofing GenuineIntel + the |
| 59 | + LongQT OpenCore) boots identically on both; `ignore_msrs` auto-set on AMD |
| 60 | +- **Docker-like CLI** — `create`, `run`, `start`, `stop`, `list`, `inspect`, |
| 61 | + `console`, `rm`, `snapshot`, `restore`, `clone` |
| 62 | +- **Built on cocoon** — imports cocoon's `cloudimg` store, `network` plane, and |
| 63 | + copy-on-write conventions rather than reimplementing them |
| 64 | + |
| 65 | +## Repository |
| 66 | + |
| 67 | +Source and issue tracker: |
| 68 | +[github.com/cocoonstack/cocoon-macos](https://github.com/cocoonstack/cocoon-macos). |
| 69 | +Upstream engine: |
| 70 | +[github.com/cocoonstack/cocoon](https://github.com/cocoonstack/cocoon) |
| 71 | +(Lightweight MicroVM engine with Cloud Hypervisor and Firecracker backends). |
0 commit comments