lima-vm/lima · error
unknown daemon type %#q
Error message
unknown daemon type %#q
What it means
Config.DaemonPath returns the executable path configured for a network daemon (currently only socket_vmnet). Any daemon name other than the known SocketVMNet constant falls into the default case and yields 'unknown daemon type %#q'. It is a lookup guard for the supported daemon set.
Source
Thrown at pkg/networks/commands.go:45
}
return fmt.Errorf("network %#q is not defined", name)
}
// Usernet returns true if the mode of given network is ModeUserV2.
func (c *Config) Usernet(name string) (bool, error) {
if nw, ok := c.Networks[name]; ok {
return nw.Mode == ModeUserV2, nil
}
return false, fmt.Errorf("network %#q is not defined", name)
}
// DaemonPath returns the daemon path.
func (c *Config) DaemonPath(daemon string) (string, error) {
switch daemon {
case SocketVMNet:
return c.Paths.SocketVMNet, nil
default:
return "", fmt.Errorf("unknown daemon type %#q", daemon)
}
}
// IsDaemonInstalled checks whether the daemon is installed.
func (c *Config) IsDaemonInstalled(daemon string) (bool, error) {
p, err := c.DaemonPath(daemon)
if err != nil {
return false, err
}
if p == "" {
return false, nil
}
if _, err := exec.LookPath(p); err != nil {
if errors.Is(err, fs.ErrNotExist) {
return false, nil
}
return false, err
}View on GitHub (pinned to dd909d0973)
Solutions
- Pass the networks.SocketVMNet constant as the daemon argument
- Remove/replace legacy daemon references (vde_vmnet is no longer supported)
- Extend the switch in DaemonPath if you genuinely maintain a fork adding new daemons
Example fix
// before
path, err := cfg.DaemonPath("vde_vmnet")
// after
path, err := cfg.DaemonPath(networks.SocketVMNet) Defensive patterns
Strategy: type-guard
Validate before calling
if daemon != networks.SocketVMNet {
return fmt.Errorf("unsupported daemon %q; only socket_vmnet is supported", daemon)
} Type guard
func isSupportedDaemon(d string) bool { return d == networks.SocketVMNet } Try / catch
p, err := cfg.DaemonPath(daemon)
if err != nil {
return fmt.Errorf("daemon lookup failed: %w", err)
} Prevention
- Always use the exported networks.SocketVMNet constant, never raw strings
- Remember vde_vmnet is not supported by this Lima version
- Only daemon argument accepted by the API is "socket_vmnet"
When it happens
Trigger: Calling DaemonPath (directly or via IsDaemonInstalled/User) with a string other than networks.SocketVMNet, e.g. "vde_vmnet" (legacy) or a typo like "socketvmnet".
Common situations: Code copied from older Lima versions that supported vde_vmnet; hand-written integration scripts passing a display name instead of the constant; plugins extending daemon support incorrectly.
Related errors
- daemon %#q (path=%#q) is not available
- 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/013e720309683453.
Report an issue: GitHub.