{"record":{"id":"5b4293d3bc5bdb35","repo":"lima-vm/lima","slug":"networks-yaml-field-paths-s-error-w","errorCode":null,"errorMessage":"networks.yaml field `paths.%s` error: %w","messagePattern":"networks\\.yaml field `paths\\.(.+?)` error: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/networks/validate.go","lineNumber":78,"sourceCode":"\t\tpath := paths.Field(i).Interface().(string)\n\t\tpathsMap[name] = path\n\t\t// varPath will be created securely, but any existing parent directories must already be secure\n\t\tif name == \"varRun\" {\n\t\t\tpath = findBaseDirectory(path)\n\t\t}\n\t\terr := validatePath(path, name == \"varRun\")\n\t\tif err != nil {\n\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\tswitch name {\n\t\t\t\t// sudoers file does not need to exist; otherwise `limactl sudoers` couldn't bootstrap\n\t\t\t\tcase \"sudoers\":\n\t\t\t\t\tcontinue\n\t\t\t\tcase \"socketVMNet\":\n\t\t\t\t\tsocketVMNetNotFound = true\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"networks.yaml field `paths.%s` error: %w\", name, err)\n\t\t}\n\t}\n\tif socketVMNetNotFound {\n\t\treturn fmt.Errorf(\"networks.yaml: %#q (`paths.socketVMNet`) has to be installed\", pathsMap[\"socketVMNet\"])\n\t}\n\treturn nil\n}\n\n// findBaseDirectory removes non-existing directories from the end of the path.\nfunc findBaseDirectory(path string) string {\n\tif _, err := os.Lstat(path); errors.Is(err, os.ErrNotExist) {\n\t\tif path != \"/\" {\n\t\t\treturn findBaseDirectory(filepath.Dir(path))\n\t\t}\n\t}\n\treturn path\n}\n","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/networks/validate.go#L60-L96","documentation":"networks.Validate stats each required path in networks.yaml `paths` (vdeSwitch, vdeRouter, socketVMNet, etc.) to check existence/executability. Any stat/permission error on a configured path is wrapped as 'networks.yaml field `paths.<name>` error', pointing at the misconfigured or missing binary.","triggerScenarios":"A `paths.*` entry in networks.yaml points to a file that does not exist, is not executable, or is inaccessible; validation stats the path and wraps the OS error.","commonSituations":"socket_vmnet or vde binaries not installed or installed to a different prefix (Homebrew path changes between Intel and Apple Silicon); upgrading macOS/lima and the binary path changed; typos in the path.","solutions":["Install the missing binary (e.g. `brew install socket_vmnet` or build lima's vde components) so the configured path exists and is executable.","Correct the `paths.<name>` value in networks.yaml to the actual binary location (e.g. /opt/homebrew/opt/socket_vmnet/bin/socket_vmnet).","Check permissions: the file must be executable by the invoking user.","Re-run limactl start after fixing the path."],"exampleFix":"# before (networks.yaml)\npaths:\n  socketVMNet: /usr/local/opt/socket_vmnet/bin/socket_vmnet\n# after (Apple Silicon Homebrew)\npaths:\n  socketVMNet: /opt/homebrew/opt/socket_vmnet/bin/socket_vmnet","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction validatePaths(config) {\n  for (const [k, p] of Object.entries(config.paths || {})) {\n    if (!p) continue;\n    try {\n      fs.accessSync(p, fs.constants.X_OK);\n    } catch (e) {\n      return `networks.yaml field 'paths.${k}' error: ${p} missing or not executable`;\n    }\n  }\n  return null;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await validateNetworks(config);\n} catch (err) {\n  const m = err.message.match(/networks\\.yaml field `paths\\.(\\w+)` error/);\n  if (m) console.error(`Fix paths.${m[1]} in networks.yaml`);\n  throw err;\n}","preventionTips":["Install socket_vmnet/vde via a package manager so paths are predictable.","Update networks.yaml after Homebrew prefix changes (Intel vs Apple Silicon).","Check executability (chmod +x) of configured binaries.","Run limactl (which validates) before scripting around the config."],"tags":["config","networks-yaml","paths","macos"],"backgroundTag":"missing-binary-on-path","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}