{"record":{"id":"3bbe5379149484b5","repo":"lima-vm/lima","slug":"networks-yaml-q-paths-socketvmnet-has-to-be","errorCode":null,"errorMessage":"networks.yaml: %#q (`paths.socketVMNet`) has to be installed","messagePattern":"networks\\.yaml: %#q \\(`paths\\.socketVMNet`\\) has to be installed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/networks/validate.go","lineNumber":82,"sourceCode":"\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\nfunc validatePath(path string, allowDaemonGroupWritable bool) error {\n\tif path == \"\" {\n\t\treturn nil\n\t}","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/networks/validate.go#L64-L100","documentation":"When validating networks.yaml, Lima detects whether `paths.socketVMNet` points to an installed binary. If the configured path was flagged as not found (or empty), validation fails stating that the socket_vmnet binary has to be installed, quoting the configured path.","triggerScenarios":"Using network mode `shared`/bridged on macOS requires socket_vmnet; networks.Validate sets socketVMNetNotFound when the stat of paths.socketVMNet fails, then returns this error at the end of validation.","commonSituations":"Fresh lima install on macOS without `brew install socket_vmnet`; socket_vmnet installed but the networks.yaml path points to the old /usr/local Homebrew prefix; user switched from vde to socket_vmnet and never configured the path.","solutions":["Install socket_vmnet: `brew install socket_vmnet` and follow lima's instructions to set up the launchd socket.","Update `paths.socketVMNet` in networks.yaml to the real binary path for your architecture (/opt/homebrew/... on Apple Silicon, /usr/local/... on Intel).","If you only need user-v2 networks, avoid shared/bridged modes so socketVMNet is not required.","Re-run `limactl start` after installation."],"exampleFix":"# before (networks.yaml)\npaths:\n  socketVMNet: \"\"\n# after\npaths:\n  socketVMNet: /opt/homebrew/opt/socket_vmnet/bin/socket_vmnet","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst p = config.paths?.socketVMNet;\nif (!p || !fs.existsSync(p)) {\n  console.error(`socket_vmnet must be installed; paths.socketVMNet='${p}' not found. Run: brew install socket_vmnet`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await validateNetworks(config);\n} catch (err) {\n  if (err.message.includes('has to be installed')) {\n    console.error('Install socket_vmnet and set paths.socketVMNet to its absolute path.');\n  }\n  throw err;\n}","preventionTips":["Run `brew install socket_vmnet` on macOS before using shared/bridged networks.","Use architecture-aware paths: /opt/homebrew on arm64, /usr/local on x86_64.","Only require socketVMNet if you actually use shared/bridged modes; prefer user-v2.","Re-check the path after major lima or macOS upgrades."],"tags":["config","networks-yaml","macos","socket-vmnet","missing-dependency"],"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"}