lima-vm/lima · error

limactl is running under rosetta, please reinstall lima with

Error message

limactl is running under rosetta, please reinstall lima with native arch

What it means

On macOS, limactl refuses to run under Rosetta 2 binary translation except for a small allowlist of commands (completion, generate-doc, validate), because the translated runtime reports the wrong GOARCH and can break VM architecture decisions (lima-vm/lima issue #543). The check is osutil.IsBeingRosettaTranslated() in the PersistentPreRunE in cmd/limactl/main.go:146.

Source

Thrown at cmd/limactl/main.go:146

		SilenceUsage:      true,
		SilenceErrors:     true,
		DisableAutoGenTag: true,
	}
	rootCmd.PersistentFlags().String("log-level", "", "Set the logging level [trace, debug, info, warn, error]")
	rootCmd.PersistentFlags().String("log-format", "text", "Set the logging format [text, json]")
	rootCmd.PersistentFlags().Bool("debug", false, "Debug mode")
	// TODO: "survey" does not support using cygwin terminal on windows yet
	rootCmd.PersistentFlags().Bool("tty", isatty.IsTerminal(os.Stdout.Fd()), "Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.")
	rootCmd.PersistentFlags().BoolP("yes", "y", false, "Alias of --tty=false")
	rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
		if err := processGlobalFlags(rootCmd); err != nil {
			return err
		}

		if osutil.IsBeingRosettaTranslated() && cmd.Parent().Name() != "completion" && cmd.Name() != "generate-doc" && cmd.Name() != "validate" {
			// running under rosetta would provide inappropriate runtime.GOARCH info, see: https://github.com/lima-vm/lima/issues/543
			// allow commands that are used for packaging to run under rosetta to allow cross-architecture builds
			return errors.New("limactl is running under rosetta, please reinstall lima with native arch")
		}

		// Make sure either $HOME or $LIMA_HOME is defined, so we don't need
		// to check for errors later
		dir, err := dirnames.LimaDir()
		if err != nil {
			return err
		}
		nfs, err := fsutil.IsNFS(dir)
		if err != nil {
			return err
		}
		if nfs {
			logrus.Warn("LIMA_HOME should not be on an NFS mount")
		}

		if cmd.Flags().Changed("yes") && cmd.Flags().Changed("tty") {
			return errors.New("cannot use both --tty and --yes flags at the same time")

View on GitHub (pinned to dd909d0973)

Solutions

  1. Install the native-arm64 build of Lima (`brew install lima` on Apple Silicon picks the right arch)
  2. Check the binary arch with `file $(which limactl)` and replace an x86_64 binary with the arm64 one
  3. If a packaging task genuinely needs cross-arch, use the allowed commands (validate, generate-doc, completion) or run in a VM/container
  4. Ensure the terminal itself isn't launched via Rosetta (Finder > Get Info > Open using Rosetta)

Example fix

// before
$ file $(which limactl)
... Mach-O 64-bit executable x86_64   # on Apple Silicon
// after
$ brew reinstall lima
$ file $(which limactl)
... Mach-O 64-bit executable arm64
Defensive patterns

Strategy: validation

Validate before calling

# refuse to run translated builds in scripts
ARCH=$(uname -m)
BIN_ARCH=$(file "$(command -v limactl)" | grep -o 'arm64\|x86_64' | head -1)
[ "$ARCH" = "$BIN_ARCH" ] || { echo "Rosetta-translated limactl; reinstall native arch" >&2; exit 1; }

Try / catch

if err := cmd.Execute(); err != nil {
	if strings.Contains(err.Error(), "running under rosetta") {
		fmt.Fprintln(os.Stderr, "install the native-arm64 lima build (brew install lima)")
	}
	os.Exit(1)
}

Prevention

When it happens

Trigger: Executing an x86_64 limactl binary on an Apple Silicon Mac (or vice versa via Rosetta) with any command other than completion, generate-doc, or validate.

Common situations: Installing the amd64 Homebrew/Intel build of Lima on an M-series Mac; copying a binary from an Intel machine; shell or terminal app forced to run under Rosetta; downloading the wrong release artifact.

Related errors


AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01). Data as JSON: /api/errors/cd21b482f126c15c. Report an issue: GitHub.