{"record":{"id":"b09301a75b79fada","repo":"lima-vm/lima","slug":"field-mounttype-must-be-q-or-q-for-vz-driver","errorCode":null,"errorMessage":"field `mountType` must be %#q or %#q for VZ driver , got %#q","messagePattern":"field `mountType` must be %#q or %#q for VZ driver , got %#q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vz_driver_darwin.go","lineNumber":277,"sourceCode":"\nfunc validateConfig(cfg *limatype.LimaYAML) error {\n\tif cfg == nil {\n\t\treturn errors.New(\"configuration is nil\")\n\t}\n\tmacOSProductVersion, err := osutil.ProductVersion()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif macOSProductVersion.LessThan(*semver.New(\"13.0.0\")) {\n\t\treturn errors.New(\"VZ driver requires macOS 13 or higher to run\")\n\t}\n\tif runtime.GOARCH == \"amd64\" && macOSProductVersion.LessThan(*semver.New(\"15.5.0\")) {\n\t\tlogrus.Warnf(\"vmType %s: On Intel Mac, macOS 15.5 or later is required to run Linux 6.12 or later. \"+\n\t\t\t\"Update macOS, or change vmType to `qemu` if the VM does not start up. (https://github.com/lima-vm/lima/issues/3334)\",\n\t\t\t*cfg.VMType)\n\t}\n\tif cfg.MountType != nil && *cfg.MountType == limatype.NINEP {\n\t\treturn fmt.Errorf(\"field `mountType` must be %#q or %#q for VZ driver , got %#q\", limatype.REVSSHFS, limatype.VIRTIOFS, *cfg.MountType)\n\t}\n\tif cfg.TPM != nil && *cfg.TPM {\n\t\treturn errors.New(\"field `tpm` is not supported on VZ driver\")\n\t}\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\tif *cfg.Firmware.LegacyBIOS {\n\t\tlogrus.Warnf(\"vmType %s: ignoring `firmware.legacyBIOS`\", *cfg.VMType)\n\t}\n\tfor _, f := range cfg.Firmware.Images {\n\t\tswitch f.VMType {\n\t\tcase \"\", limatype.VZ:\n\t\t\tif f.Arch == *cfg.Arch {\n\t\t\t\treturn errors.New(\"`firmware.images` configuration is not supported for VZ driver\")\n\t\t\t}\n\t\t}\n\t}","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vz_driver_darwin.go#L259-L295","documentation":"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.","triggerScenarios":"Config sets mountType: \"9p\" (or limatype.NINEP) while vmType is \"vz\".","commonSituations":"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.","solutions":["Set mountType to \"virtiofs\" or \"reverse-sshfs\" in the instance YAML","Use the QEMU driver if 9p mounts are required"],"exampleFix":"// before (lima.yaml)\nvmType: vz\nmountType: 9p\n// after\nvmType: vz\nmountType: virtiofs","handlingStrategy":"validation","validationCode":"if vmType == \"vz\" && mountType == \"9p\" {\n    mountType = \"virtiofs\" // pre-correct before starting\n}","typeGuard":null,"tryCatchPattern":"if err := start(); err != nil && strings.Contains(err.Error(), \"field `mountType`\") {\n    // change mountType to virtiofs and retry\n}","preventionTips":["Use virtiofs with the VZ driver","Run `limactl validate` before starting","Keep per-driver config profiles instead of copying QEMU configs"],"tags":["config-validation","mount","vz"],"backgroundTag":"invalid-enum-config-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}