lima-vm/lima · error
field `mountType` must be %#q or %#q for VZ driver , got %#q
Error message
field `mountType` must be %#q or %#q for VZ driver , got %#q
What it means
Validation error from the VZ driver: the instance's `mountType` is neither of the two values allowed for VZ (typically "virtiofs" or "reverse-sshfs", printed via %#q). Other mount types (e.g. 9p) are unsupported with Virtualization.framework.
Source
Thrown at pkg/driver/vz/vz_driver_darwin.go:277
func validateConfig(cfg *limatype.LimaYAML) error {
if cfg == nil {
return errors.New("configuration is nil")
}
macOSProductVersion, err := osutil.ProductVersion()
if err != nil {
return err
}
if macOSProductVersion.LessThan(*semver.New("13.0.0")) {
return errors.New("VZ driver requires macOS 13 or higher to run")
}
if runtime.GOARCH == "amd64" && macOSProductVersion.LessThan(*semver.New("15.5.0")) {
logrus.Warnf("vmType %s: On Intel Mac, macOS 15.5 or later is required to run Linux 6.12 or later. "+
"Update macOS, or change vmType to `qemu` if the VM does not start up. (https://github.com/lima-vm/lima/issues/3334)",
*cfg.VMType)
}
if cfg.MountType != nil && *cfg.MountType == limatype.NINEP {
return fmt.Errorf("field `mountType` must be %#q or %#q for VZ driver , got %#q", limatype.REVSSHFS, limatype.VIRTIOFS, *cfg.MountType)
}
if cfg.TPM != nil && *cfg.TPM {
return errors.New("field `tpm` is not supported on VZ driver")
}
if cfg.OS != nil && *cfg.OS == limatype.WINDOWS {
return errors.New("currently Windows guest OS is only supported on QEMU")
}
if *cfg.Firmware.LegacyBIOS {
logrus.Warnf("vmType %s: ignoring `firmware.legacyBIOS`", *cfg.VMType)
}
for _, f := range cfg.Firmware.Images {
switch f.VMType {
case "", limatype.VZ:
if f.Arch == *cfg.Arch {
return errors.New("`firmware.images` configuration is not supported for VZ driver")
}
}
}View on GitHub (pinned to dd909d0973)
Solutions
- Set mountType to "virtiofs" or "reverse-sshfs" in the instance YAML
- Use the QEMU driver if 9p mounts are required
Example fix
// before (lima.yaml) vmType: vz mountType: 9p // after vmType: vz mountType: virtiofs
Defensive patterns
Strategy: validation
Validate before calling
if vmType == "vz" && mountType == "9p" {
mountType = "virtiofs" // pre-correct before starting
} Try / catch
if err := start(); err != nil && strings.Contains(err.Error(), "field `mountType`") {
// change mountType to virtiofs and retry
} Prevention
- Use virtiofs with the VZ driver
- Run `limactl validate` before starting
- Keep per-driver config profiles instead of copying QEMU configs
When it happens
Trigger: Config sets mountType: "9p" (or limatype.NINEP) while vmType is "vz".
Common situations: Copying a QEMU-instance config that used 9p mounts to a VZ instance; explicitly choosing 9p for QEMU performance reasons and switching drivers without updating the field.
Related errors
- field `mountType` must be %#q or %#q for krunkit driver, got
- unexpected audio device %#q
- configuration is nil
- field `tpm` is not supported on VZ driver
- currently Windows guest OS is only supported on QEMU
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/b09301a75b79fada.
Report an issue: GitHub.