{"record":{"id":"2a3b42f588a1dc78","repo":"lima-vm/lima","slug":"unimplemented-by-the-krunkit-driver","errorCode":null,"errorMessage":"unimplemented by the krunkit driver","messagePattern":"unimplemented by the krunkit driver","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/driver/krunkit/errors_darwin_arm64.go","lineNumber":8,"sourceCode":"// SPDX-FileCopyrightText: Copyright The Lima Authors\n// SPDX-License-Identifier: Apache-2.0\n\npackage krunkit\n\nimport \"errors\"\n\nvar errUnimplemented = errors.New(\"unimplemented by the krunkit driver\")\n","sourceCodeStart":1,"sourceCodeEnd":9,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/krunkit/errors_darwin_arm64.go#L1-L9","documentation":"The krunkit driver ( Lima's driver on macOS arm64 that runs the VM via libkrun/krunkit) does not implement VM snapshot operations or display-password/connection APIs. The sentinel `errUnimplemented` is returned by CreateSnapshot, ApplySnapshot, DeleteSnapshot, ListSnapshots, ChangeDisplayPassword and DisplayConnection to signal that the backend has no support for these features. Callers get this error whenever they invoke these limactl commands on an instance whose VM type resolves to the krunkit driver.","triggerScenarios":"Running `limactl snapshot create/apply/delete/list`, or any code path that calls Driver.CreateSnapshot/ApplySnapshot/DeleteSnapshot/ListSnapshots, on an instance started with the krunkit driver; also calling ChangeDisplayPassword or DisplayConnection for a krunkit instance.","commonSituations":"A user of snapshot workflows (e.g. pre-upgrade checkpoints) whose instance config selects vmType krunkit on macOS arm64; CI scripts that iterate snapshots across drivers; automation that assumes snapshot parity with qemu/vz drivers.","solutions":["Do not use snapshot commands on krunkit instances; switch the instance to a driver that supports snapshots (e.g. vz or qemu) by creating a new instance with `vmType: vz` or `qemu`.","Check driver capability before calling: wrap the snapshot calls and treat `errors.Is(err, errUnimplemented)` as 'unsupported feature', not a transient failure.","Export/copy instance data manually (e.g. copy the instance dir and disk image) instead of snapshotting, then restore manually.","Update Lima in case a newer krunkit driver implements the feature; check the Lima changelog."],"exampleFix":"// before\nif err := inst.Driver.CreateSnapshot(ctx, tag); err != nil {\n    return err\n}\n// after\nif err := inst.Driver.CreateSnapshot(ctx, tag); err != nil {\n    if errors.Is(err, krunkit.ErrUnimplemented) {\n        log.Warnf(\"snapshots unsupported by driver %q; skipping\", inst.VMType)\n        return nil\n    }\n    return err\n}","handlingStrategy":"try-catch","validationCode":"// Go: check instance vmType before attempting snapshot ops\nif inst.VMType == \"krunkit\" {\n    return fmt.Errorf(\"snapshots are not supported with the krunkit driver\")\n}","typeGuard":"func supportsSnapshots(vmType string) bool {\n    return vmType != \"krunkit\"\n}","tryCatchPattern":"if err := d.CreateSnapshot(ctx, tag); err != nil {\n    if errors.Is(err, krunkit.ErrUnimplemented) {\n        // treat as unsupported feature, not a failure\n        return nil\n    }\n    return err\n}","preventionTips":["Avoid snapshot subcommands on krunkit instances","Document driver capability differences in team runbooks","Use vz or qemu when snapshot workflows are required","Check driver support matrix before automating limactl commands"],"tags":["krunkit","macos","driver","unimplemented","snapshots"],"backgroundTag":"driver-feature-unimplemented","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}