lima-vm/lima · warning
unimplemented
Error message
unimplemented
What it means
The WSL2 driver does not implement snapshot or display-connection operations. Callers of CreateSnapshot, ApplySnapshot, DeleteSnapshot, ListSnapshots, ChangeDisplayPassword, or DisplayConnection receive this sentinel error (errUnimplemented) unconditionally — the feature simply does not exist on the WSL2 backend.
Source
Thrown at pkg/driver/wsl2/errors_windows.go:10
//go:build windows && !no_wsl
// SPDX-FileCopyrightText: Copyright The Lima Authors
// SPDX-License-Identifier: Apache-2.0
package wsl2
import "errors"
var errUnimplemented = errors.New("unimplemented")
View on GitHub (pinned to dd909d0973)
Solutions
- Check driver type before calling: only the QEMU/VZ backends support these operations
- Use WSL-native alternatives (export/import the distro: `wsl.exe --export/--import`) for snapshot-like backups
- Skip display-password calls on WSL2 — there is no VNC-style display; use `wsl.exe` direct shell access
- Guard feature probes by treating this error as 'not supported' rather than retrying
Example fix
// before
err := driver.CreateSnapshot(ctx, "snap1") // "unimplemented"
// after
if driverName == "wsl2" {
return errors.New("snapshots unsupported on wsl2; use wsl --export instead")
}
err := driver.CreateSnapshot(ctx, "snap1") Defensive patterns
Strategy: validation
Validate before calling
var snapshotCapable = map[string]bool{"qemu": true, "vz": true}
func canSnapshot(driverName string) bool { return snapshotCapable[driverName] } Type guard
func supportsSnapshots(driver driver.Driver) bool {
type snapper interface { CreateSnapshot(context.Context, string) error }
_, ok := driver.(snapper)
return ok
} Try / catch
if err := driver.CreateSnapshot(ctx, name); err != nil {
if errors.Is(err, errUnimplemented) || err.Error() == "unimplemented" {
return fallbackExportDistro(ctx) // wsl --export based backup
}
return err
} Prevention
- Check the driver type (qemu/vz vs wsl2) before snapshot operations
- Use `wsl --export/--import` as the WSL2 backup mechanism
- Probe capabilities once at startup and store them
- Treat 'unimplemented' as a permanent capability gap, not a transient error
When it happens
Trigger: Calling any of the snapshot-related driver methods (CreateSnapshot, ApplySnapshot, DeleteSnapshot, ListSnapshots) or display methods (ChangeDisplayPassword, DisplayConnection) on an instance driven by the wsl2 driver on Windows.
Common situations: Scripts or tools written against the QEMU driver ported to Windows/WSL2; automation that snapshots VMs before changes; UI/tooling probing capabilities without checking the driver type first.
Related errors
- unimplemented
- cannot use `--sync` with a wsl2 instance, the host directory
- unimplemented by the krunkit driver
- failed to run `wsl.exe --distribution %s`: %w (out=%#q)
- failed to run `wsl.exe --import %s %s %s`: %w (out=%#q)
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/597bae63ae78a374.
Report an issue: GitHub.