lima-vm/lima · error
daemon %#q (path=%#q) is not available
Error message
daemon %#q (path=%#q) is not available
What it means
Config.User resolves the OS user that should run a network daemon. First it checks IsDaemonInstalled; if the daemon binary path is not configured/executable, it returns 'daemon %#q (path=%#q) is not available' instead of attempting a lookup. The embedded path in the message shows exactly which configured path failed.
Source
Thrown at pkg/networks/commands.go:84
// Sock returns a socket_vmnet socket.
func (c *Config) Sock(name string) string {
return filepath.Join(c.Paths.VarRun, fmt.Sprintf("socket_vmnet.%s", name))
}
func (c *Config) PIDFile(name, daemon string) string {
return filepath.Join(c.Paths.VarRun, fmt.Sprintf("%s_%s.pid", name, daemon))
}
func (c *Config) LogFile(name, daemon, stream string) string {
networksDir, _ := dirnames.LimaNetworksDir()
return filepath.Join(networksDir, fmt.Sprintf("%s_%s.%s.log", name, daemon, stream))
}
func (c *Config) User(daemon string) (osutil.User, error) {
if ok, _ := c.IsDaemonInstalled(daemon); !ok {
daemonPath, _ := c.DaemonPath(daemon)
return osutil.User{}, fmt.Errorf("daemon %#q (path=%#q) is not available", daemon, daemonPath)
}
//nolint:gocritic // singleCaseSwitch: should rewrite switch statement to if statement
switch daemon {
case SocketVMNet:
return osutil.LookupUser("root")
}
return osutil.User{}, fmt.Errorf("daemon %#q not defined", daemon)
}
func (c *Config) MkdirCmd() string {
return fmt.Sprintf("/bin/mkdir -m 775 -p %s", c.Paths.VarRun)
}
func (c *Config) StartCmd(name, daemon string) string {
if ok, _ := c.IsDaemonInstalled(daemon); !ok {
panic(fmt.Errorf("daemon %#q is not available", daemon))
}
var cmd stringView on GitHub (pinned to dd909d0973)
Solutions
- Install socket_vmnet (on macOS: brew install socket_vmnet) and note the binary path
- Set paths.socketVMNet in $LIMA_HOME/_config/networks.yaml to the installed binary path
- Re-run `limactl sudoers` setup so the daemon user/permissions are configured
Example fix
// networks.yaml // before paths: socketVMNet: "" // after paths: socketVMNet: /opt/homebrew/bin/socket_vmnet
Defensive patterns
Strategy: validation
Validate before calling
installed, err := cfg.IsDaemonInstalled(networks.SocketVMNet)
if err != nil || !installed {
return fmt.Errorf("install socket_vmnet and set paths.socketVMNet in networks.yaml")
} Try / catch
u, err := cfg.User(networks.SocketVMNet)
if err != nil {
// message includes the failing daemon path; surface it to the user
return err
} Prevention
- Install socket_vmnet before starting instances with port forwarding requiring it
- Verify the binary path exists with os.Stat after configuring networks.yaml
- Run the documented `limactl sudoers` post-install step on macOS
When it happens
Trigger: startDaemon, stopNetwork, or passwordLessSudo calls User(daemon) while Paths.SocketVMNet is empty in networks.yaml or points to a non-existent binary, so IsDaemonInstalled reports false.
Common situations: socket_vmnet not installed (e.g. `brew install socket_vmnet` skipped on macOS); networks.yaml paths section pointing at a wrong/old binary location; fresh machine without the post-install setup steps run (limactl sudoers).
Related errors
- unknown daemon type %#q
- daemon %#q is not available
- unexpected daemon %#q
- daemon %#q not defined
- c.Paths.SocketVMNet is empty
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/3870d0922f6bb25f.
Report an issue: GitHub.