lima-vm/lima · error
field `mountType` must be %#q or %#q for krunkit driver, got
Error message
field `mountType` must be %#q or %#q for krunkit driver, got %#q
What it means
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.
Source
Thrown at pkg/driver/krunkit/krunkit_driver_darwin_arm64.go:235
if err != nil {
return err
}
if macOSProductVersion.LessThan(*semver.New("13.0.0")) {
return errors.New("krunkit driver requires macOS 13 or higher to run")
}
if cfg.Arch != nil && !limatype.IsNativeArch(*cfg.Arch) {
return fmt.Errorf("unsupported arch: %#q (krunkit requires native arch)", *cfg.Arch)
}
if _, err := exec.LookPath(vmType); err != nil {
return errors.New("krunkit CLI not found in PATH. Install it via:\nbrew tap slp/krun\nbrew install krunkit")
}
// Also check if krunkit version >= 1.2.1 because of the vsock forwarder feature
if err := checkKrunkitVersion(); err != nil {
return err
}
if cfg.MountType != nil && (*cfg.MountType != limatype.VIRTIOFS && *cfg.MountType != limatype.REVSSHFS) {
return fmt.Errorf("field `mountType` must be %#q or %#q for krunkit driver, got %#q", limatype.VIRTIOFS, limatype.REVSSHFS, *cfg.MountType)
}
if cfg.TPM != nil && *cfg.TPM {
return errors.New("field `tpm` is not supported in krunkit driver")
}
if cfg.NestedVirtualization != nil && *cfg.NestedVirtualization {
if macOSProductVersion.LessThan(*semver.New("15.0.0")) {
return errors.New("nested virtualization requires macOS 15 or newer")
}
}
if cfg.OS != nil && *cfg.OS == limatype.WINDOWS {
return errors.New("currently Windows guest OS is only supported on QEMU")
}
return nil
}View on GitHub (pinned to dd909d0973)
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
Example fix
// before (lima.yaml) mountType: 9p // after mountType: virtiofs
Defensive patterns
Strategy: validation
Validate before calling
mountType := "virtiofs" // allowed: virtiofs | revsshfs for krunkit
if mt != "virtiofs" && mt != "revsshfs" {
return fmt.Errorf("mountType %q unsupported for krunkit", mt)
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Reusing a QEMU-oriented config (QEMU supports 9p) with krunkit; typos like `virtio-fs` or `sshfs`; older templates with removed mount types.
Related errors
- invalid network spec %+v
- field `tpm` is not supported in krunkit driver
- currently Windows guest OS is only supported on QEMU
- field `mountType` must be %#q or %#q for VZ driver , got %#q
- errors inspecting instance: %+v
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/947710d68ddca438.
Report an issue: GitHub.