Preparing a build VM

Build a VM from OCI tags on one producer host, or on each runner with an Ankafile

You can prepare a build VM on one producer host, or on each runner with an Ankafile.

anka create and from darwin: use the stored .base_<ProductBuild> tag. See Reuse a macOS build. The first create on a host downloads the IPSW. The next create for that ProductBuild on the same host clones that tag. A runner that only pulls the finished template receives macOS inside that template.

On a producer host

The order of the OCI tags matters on the producer host. Create the VM, then pull each OCI tag in that order. Push the finished VM as a template.

❯ anka create build_vm 27.0.1
❯ anka pull build_vm http://registry.example.com/v2/xcode:27.1
❯ anka pull build_vm https://ghcr.io/homebrew/core/cmake:4.4.4
❯ anka push build_vm -t latest

anka push uses the registry in ANKA_REGISTRY. To use a different registry, add the registry URL:

❯ anka push build_vm -t latest http://registry.example.com/v2
Set push_mode to 1 before you push the finished template to an OCI registry. With push_mode 2, the push leaves the macOS disk out, and a runner cannot start the template. A push to the Anka Registry always includes the macOS disk.

A runner host does not have the OCI tag order. It does not know which OCI tags the producer used. It pulls the template and starts it. That registry can be the Anka Registry. It can also be an OCI registry.

❯ anka pull build_vm
❯ anka start build_vm

On each runner with an Ankafile

An Ankafile stores the same steps, including the OCI tag order. Each runner creates the VM from that file, so you do not need a producer host.

FROM darwin:27.0.1
FROM http://registry.example.com/v2/xcode:27.1
FROM https://ghcr.io/homebrew/core/cmake:4.4.4
❯ anka create build_vm ./Ankafile

For all Ankafile instructions, see Creating VMs with an Ankafile.