abiosoft/colima · warning
unable to enable rosetta: %w
Error message
unable to enable rosetta: %w
What it means
On macOS Virtualization Framework with Rosetta enabled, Colima registers the Rosetta binfmt handler in the guest by echoing a magic/mask registration line into /proc/sys/fs/binfmt_misc/register (guarded by a stat so it is idempotent). On failure it only warns and returns nil, so start proceeds; x86_64 binaries on Apple Silicon will then fall back to slower qemu emulation or fail to run.
Source
Thrown at environment/vm/lima/lima.go:325
// registry certs
a.Add(l.copyCerts)
// cross-platform emulation
a.Add(func() error {
// use binfmt when emulation is disabled i.e. host arch
if conf.Binfmt != nil && *conf.Binfmt {
if arch := environment.HostArch(); arch == environment.Arch(conf.Arch).Value() {
if err := core.SetupBinfmt(l.host, l, environment.Arch(conf.Arch)); err != nil {
logrus.Warn(fmt.Errorf("unable to enable qemu %s emulation: %w", arch, err))
}
}
}
if l.limaConf.VMOpts.VZOpts.Rosetta.Enabled {
// enable rosetta
err := l.Run("sudo", "sh", "-c", `stat /proc/sys/fs/binfmt_misc/rosetta || echo ':rosetta:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/mnt/lima-rosetta/rosetta:OCF' > /proc/sys/fs/binfmt_misc/register`)
if err != nil {
logrus.Warn(fmt.Errorf("unable to enable rosetta: %w", err))
return nil
}
// disable qemu
if err := l.RunQuiet("stat", "/proc/sys/fs/binfmt_misc/qemu-x86_64"); err == nil {
err = l.Run("sudo", "sh", "-c", `echo 0 > /proc/sys/fs/binfmt_misc/qemu-x86_64`)
if err != nil {
logrus.Warn(fmt.Errorf("unable to disable qemu x86_84 emulation: %w", err))
}
}
}
return nil
})
// replicate addresses when network address is disabled
a.Add(func() error {
if err := l.replicateHostAddresses(conf); err != nil {View on GitHub (pinned to c3a5f9184d)
Solutions
- Ensure prerequisites: macOS host, VZ driver (`--vm-type vz`), Rosetta support enabled, and the official image that mounts /mnt/lima-rosetta.
- If Rosetta is not required, disable it (`--vz-rosetta=false`) to silence the warning and rely on qemu.
- Verify inside the guest: `colima ssh -- ls /proc/sys/fs/binfmt_misc /mnt/lima-rosetta/rosetta`.
- Update macOS/Colima; older VZ stacks had Rosetta issues resolved in later releases.
Example fix
# before colima start --vm-type vz --vz-rosetta # warns: unable to enable rosetta # after (if Rosetta not needed) colima start --vm-type vz --vz-rosetta=false
Defensive patterns
Strategy: fallback
Try / catch
Non-fatal (warn + return nil). If foreign-arch binaries are slow/failing afterwards, fall back to qemu by disabling Rosetta (--vz-rosetta=false).
Prevention
- Rosetta requires macOS + VZ; don't enable on Linux hosts
- Use official images so /mnt/lima-rosetta exists
- Update macOS and Colima for current Rosetta support
When it happens
Trigger: VZ driver + rosetta enabled (`colima start --vz-rosetta` / config rosetta) on guests where binfmt_misc is unavailable or read-only, on Linux hosts (Rosetta is macOS-only and requires /mnt/lima-rosetta sharing), or when the rosetta binary mount is missing in the guest.
Common situations: Apple Silicon users with VZ+Rosetta on custom images lacking the rosetta mount; kernel/security settings blocking binfmt registration; expecting Rosetta on Linux hosts where it cannot work.
Related errors
- unable to disable qemu x86_84 emulation: %w
- unable to enable qemu %s emulation: %w
- unable to resize disk: %w
- error retrieving current runtime: empty value
- runtime cannot be updated, %s is not running
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/e044f6d17f0187dd.
Report an issue: GitHub.