lima-vm/lima · error
no RequestStart function available
Error message
no RequestStart function available
What it means
TemplateFileBasedManager.RequestStart delegates to an injected requestStart callback (e.g. the systemd package's systemctl-based start). If that callback was never wired, the manager cannot start the instance and returns this sentinel error immediately.
Source
Thrown at pkg/autostart/managers.go:141
data := map[string]string{
"Binary": selfExeAbs,
"Instance": instName,
"WorkDir": workDir,
}
maps.Copy(data, t.extraTemplateVars)
return textutil.ExecuteTemplate(t.template, data)
}
func (t *TemplateFileBasedManager) AutoStartedIdentifier() string {
if t.autoStartedIdentifier != nil {
return t.autoStartedIdentifier()
}
return ""
}
func (t *TemplateFileBasedManager) RequestStart(ctx context.Context, inst *limatype.Instance) error {
if t.requestStart == nil {
return errors.New("no RequestStart function available")
}
return t.requestStart(ctx, inst)
}
func (t *TemplateFileBasedManager) RequestStop(ctx context.Context, inst *limatype.Instance) (bool, error) {
if t.requestStop == nil {
return false, errors.New("no RequestStop function available")
}
return t.requestStop(ctx, inst)
}
View on GitHub (pinned to dd909d0973)
Solutions
- Use the standard OS-specific manager constructor so requestStart is wired to the systemd/launchd implementation
- If implementing your own manager, supply requestStart (e.g. pkg/autostart/systemd.RequestStart)
- Catch this error and fall back to starting the instance via `limactl start <instance>` directly
Example fix
// before: partial manager
mgr := &autostart.TemplateFileBasedManager{template: tpl}
// after: wire the callbacks
mgr := &autostart.TemplateFileBasedManager{
template: tpl,
requestStart: systemd.RequestStart,
requestStop: systemd.RequestStop,
} Defensive patterns
Strategy: fallback
Validate before calling
// only request start via autostart when the instance has a registered entry
registered, err := mgr.IsRegistered(ctx, inst)
if err != nil || !registered {
return limainstance.Start(ctx, inst) // normal path
}
Try / catch
if err := mgr.RequestStart(ctx, inst); err != nil {
if strings.Contains(err.Error(), "no RequestStart function available") {
return limainstance.Start(ctx, inst) // fallback to normal start
}
return err
}
Prevention
- Use the standard constructors which wire requestStart to the systemd/launchd implementation
- When embedding, always populate requestStart and requestStop together
- Start instances via limactl start unless you know autostart is fully configured on the platform
When it happens
Trigger: Calling RequestStart on a manager that lacks the requestStart function — typically a hand-constructed TemplateFileBasedManager, or a platform build where the callback is intentionally not implemented.
Common situations: Custom Lima builds or embedders constructing the manager directly; tests that construct partial managers; future platform ports where RequestStart is not yet supported.
Related errors
- no RequestStop function available
- no template available
- failed to register instance %#q to start at login: %w
- failed to unregister instance %#q from start at login: %w
- failed to check if the autostart entry for instance %#q is r
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/8fdc1d285ac4f3e0.
Report an issue: GitHub.