lima-vm/lima · error
networks.yaml field `paths.%s` error: %w
Error message
networks.yaml field `paths.%s` error: %w
What it means
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.
Source
Thrown at pkg/networks/validate.go:78
path := paths.Field(i).Interface().(string)
pathsMap[name] = path
// varPath will be created securely, but any existing parent directories must already be secure
if name == "varRun" {
path = findBaseDirectory(path)
}
err := validatePath(path, name == "varRun")
if err != nil {
if errors.Is(err, os.ErrNotExist) {
switch name {
// sudoers file does not need to exist; otherwise `limactl sudoers` couldn't bootstrap
case "sudoers":
continue
case "socketVMNet":
socketVMNetNotFound = true
continue
}
}
return fmt.Errorf("networks.yaml field `paths.%s` error: %w", name, err)
}
}
if socketVMNetNotFound {
return fmt.Errorf("networks.yaml: %#q (`paths.socketVMNet`) has to be installed", pathsMap["socketVMNet"])
}
return nil
}
// findBaseDirectory removes non-existing directories from the end of the path.
func findBaseDirectory(path string) string {
if _, err := os.Lstat(path); errors.Is(err, os.ErrNotExist) {
if path != "/" {
return findBaseDirectory(filepath.Dir(path))
}
}
return path
}
View on GitHub (pinned to dd909d0973)
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.
Example fix
# before (networks.yaml) paths: socketVMNet: /usr/local/opt/socket_vmnet/bin/socket_vmnet # after (Apple Silicon Homebrew) paths: socketVMNet: /opt/homebrew/opt/socket_vmnet/bin/socket_vmnet
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
function validatePaths(config) {
for (const [k, p] of Object.entries(config.paths || {})) {
if (!p) continue;
try {
fs.accessSync(p, fs.constants.X_OK);
} catch (e) {
return `networks.yaml field 'paths.${k}' error: ${p} missing or not executable`;
}
}
return null;
} Try / catch
try {
await validateNetworks(config);
} catch (err) {
const m = err.message.match(/networks\.yaml field `paths\.(\w+)` error/);
if (m) console.error(`Fix paths.${m[1]} in networks.yaml`);
throw err;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- networks.yaml: %#q (`paths.socketVMNet`) has to be installed
- path %#q is not an absolute path
- path %#q contains whitespace
- failed to build network arguments: %w
- invalid group %#q: %w
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/5b4293d3bc5bdb35.
Report an issue: GitHub.