{"record":{"id":"947710d68ddca438","repo":"lima-vm/lima","slug":"field-mounttype-must-be-q-or-q-for-krunkit-d","errorCode":null,"errorMessage":"field `mountType` must be %#q or %#q for krunkit driver, got %#q","messagePattern":"field `mountType` must be %#q or %#q for krunkit driver, got %#q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/krunkit/krunkit_driver_darwin_arm64.go","lineNumber":235,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\tif macOSProductVersion.LessThan(*semver.New(\"13.0.0\")) {\n\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}","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/krunkit/krunkit_driver_darwin_arm64.go#L217-L253","documentation":"The krunkit driver only supports virtiofs and revsshfs as mount types. validateConfig rejects any other value of `mountType` because libkrun-based VMs cannot use Lima's other mount mechanisms. The error reports the allowed values and the offending value using %#q formatting.","triggerScenarios":"Setting `mountType: 9p` (or any value other than virtiofs/revsshfs) in lima.yaml for an instance whose vmType is krunkit, then running limactl validate or limactl start.","commonSituations":"Reusing a QEMU-oriented config (QEMU supports 9p) with krunkit; typos like `virtio-fs` or `sshfs`; older templates with removed mount types.","solutions":["Change `mountType` to `virtiofs` (recommended for krunkit)","Or set `mountType: revsshfs` if SSHFS-based mounting is required","Remove the `mountType` field entirely so Lima defaults to a driver-supported value"],"exampleFix":"// before (lima.yaml)\nmountType: 9p\n// after\nmountType: virtiofs","handlingStrategy":"validation","validationCode":"mountType := \"virtiofs\" // allowed: virtiofs | revsshfs for krunkit\nif mt != \"virtiofs\" && mt != \"revsshfs\" {\n    return fmt.Errorf(\"mountType %q unsupported for krunkit\", mt)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use virtiofs or revsshfs in any krunkit config","Do not copy 9p-based QEMU configs to krunkit unchanged","Run `limactl validate lima.yaml` before start"],"tags":["krunkit","config-validation","mount"],"backgroundTag":"unsupported-config-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}