{"record":{"id":"a922ea8037de2324","repo":"lima-vm/lima","slug":"field-tpm-is-not-supported-in-krunkit-driver","errorCode":null,"errorMessage":"field `tpm` is not supported in krunkit driver","messagePattern":"field `tpm` is not supported in krunkit driver","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/krunkit/krunkit_driver_darwin_arm64.go","lineNumber":239,"sourceCode":"\t\treturn errors.New(\"krunkit driver requires macOS 13 or higher to run\")\n\t}\n\tif cfg.Arch != nil && !limatype.IsNativeArch(*cfg.Arch) {\n\t\treturn fmt.Errorf(\"unsupported arch: %#q (krunkit requires native arch)\", *cfg.Arch)\n\t}\n\tif _, err := exec.LookPath(vmType); err != nil {\n\t\treturn errors.New(\"krunkit CLI not found in PATH. Install it via:\\nbrew tap slp/krun\\nbrew install krunkit\")\n\t}\n\t// Also check if krunkit version >= 1.2.1 because of the vsock forwarder feature\n\tif err := checkKrunkitVersion(); err != nil {\n\t\treturn err\n\t}\n\n\tif cfg.MountType != nil && (*cfg.MountType != limatype.VIRTIOFS && *cfg.MountType != limatype.REVSSHFS) {\n\t\treturn fmt.Errorf(\"field `mountType` must be %#q or %#q for krunkit driver, got %#q\", limatype.VIRTIOFS, limatype.REVSSHFS, *cfg.MountType)\n\t}\n\n\tif cfg.TPM != nil && *cfg.TPM {\n\t\treturn errors.New(\"field `tpm` is not supported in krunkit driver\")\n\t}\n\n\tif cfg.NestedVirtualization != nil && *cfg.NestedVirtualization {\n\t\tif macOSProductVersion.LessThan(*semver.New(\"15.0.0\")) {\n\t\t\treturn errors.New(\"nested virtualization requires macOS 15 or newer\")\n\t\t}\n\t}\n\n\tif cfg.OS != nil && *cfg.OS == limatype.WINDOWS {\n\t\treturn errors.New(\"currently Windows guest OS is only supported on QEMU\")\n\t}\n\n\treturn nil\n}\n\nfunc isFedoraConfigured(cfg *limatype.LimaYAML) bool {\n\tfor _, b := range cfg.Base {\n\t\tif strings.Contains(strings.ToLower(b.URL), \"fedora\") {","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/krunkit/krunkit_driver_darwin_arm64.go#L221-L257","documentation":"Returned when the instance YAML enables the TPM device, which the krunkit driver does not support.","triggerScenarios":"Setting `tpm: true` in lima.yaml while vmType is krunkit, then validating or starting the instance.","commonSituations":"Configs written for the vz driver (which supports TPM) reused with krunkit; enabling TPM for Windows guests that krunkit cannot host anyway.","solutions":["Disable the `tpm` field in the instance config","Switch to the QEMU driver if TPM is required"],"exampleFix":"// before (lima.yaml)\ntp: true\n// after\ntp: false","handlingStrategy":"validation","validationCode":"if cfg[\"tpm\"] == true && cfg[\"vmType\"] == \"krunkit\" {\n    return errors.New(\"tpm is unsupported on krunkit; use vmType vz\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Leave `tpm` unset/false for krunkit instances","Use vz driver when TPM features are required","Validate configs before start"],"tags":["krunkit","config-validation","tpm"],"backgroundTag":"unsupported-config-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}