{"record":{"id":"514b30b805e73629","repo":"lima-vm/lima","slug":"limactl-start-foreground-is-not-supported-on-w","errorCode":null,"errorMessage":"`limactl start --foreground` is not supported on Windows","messagePattern":"`limactl start --foreground` is not supported on Windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/instance/start_windows.go","lineNumber":12,"sourceCode":"// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage instance\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n)\n\nfunc execHostAgentForeground(_ string, _ *exec.Cmd) error {\n\treturn errors.New(\"`limactl start --foreground` is not supported on Windows\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":14,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/instance/start_windows.go#L1-L14","documentation":"On Windows, the foreground hostagent mode (`limactl start --foreground`) is unimplemented: the unix implementation relies on exec/fork semantics unavailable on Windows, so the Windows stub returns this error unconditionally.","triggerScenarios":"Running `limactl start --foreground` (or Restart with foreground hostagent) on a Windows host.","commonSituations":"Windows users trying to see hostagent logs interactively, or following unix-oriented documentation/tutorials that use --foreground.","solutions":["Drop the --foreground flag; run `limactl start` normally and read ~/.lima/<instance>/ha.stderr.log for logs","Use WSL2 and run lima inside Linux where --foreground works","If you need foreground behavior on Windows, contribute a windows implementation of execHostAgentForeground"],"exampleFix":":: before\nlimactl start --foreground my-instance\n:: after\nlimactl start my-instance\n:: logs: %USERPROFILE%\\.lima\\my-instance\\ha.stderr.log\n","handlingStrategy":"fallback","validationCode":"if runtime.GOOS == \"windows\" && foreground {\n    return errors.New(\"--foreground is not supported on Windows; run without the flag\")\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"not supported on Windows\") {\n    logrus.Warn(\"falling back to background hostagent\")\n    return startBackground()\n}","preventionTips":["Don't pass --foreground on Windows hosts","Read hostagent logs from the instance dir instead","Run Linux VMs under WSL2 if foreground mode is required"],"tags":["windows","unsupported","hostagent"],"backgroundTag":"unsupported-on-windows","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}