{"record":{"id":"649b35703dc2dee9","repo":"abiosoft/colima","slug":"invalid-mounttype-s","errorCode":null,"errorMessage":"invalid mountType: '%s'","messagePattern":"invalid mountType: '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/configmanager/configmanager.go","lineNumber":59,"sourceCode":"\n\terr = yaml.Unmarshal(b, &c)\n\tif err != nil {\n\t\treturn c, fmt.Errorf(\"could not load config from file: %w\", err)\n\t}\n\n\treturn c, nil\n}\n\n// ValidateConfig validates config before we use it\nfunc ValidateConfig(c config.Config) error {\n\tvalidMountTypes := map[string]bool{\"9p\": true, \"sshfs\": true}\n\tvalidPortForwarders := map[string]bool{\"grpc\": true, \"ssh\": true, \"none\": true}\n\n\tif util.MacOS13OrNewer() {\n\t\tvalidMountTypes[\"virtiofs\"] = true\n\t}\n\tif _, ok := validMountTypes[c.MountType]; !ok {\n\t\treturn fmt.Errorf(\"invalid mountType: '%s'\", c.MountType)\n\t}\n\tvalidVMTypes := map[string]bool{\"qemu\": true}\n\tif util.MacOS13OrNewer() {\n\t\tvalidVMTypes[\"vz\"] = true\n\t}\n\tif util.MacOS13OrNewerOnArm() {\n\t\tvalidVMTypes[\"krunkit\"] = true\n\t}\n\tif c.VMType == \"krunkit\" && !util.MacOS13OrNewerOnArm() {\n\t\treturn fmt.Errorf(\"vmType 'krunkit' is only available on macOS with Apple Silicon\")\n\t}\n\tif _, ok := validVMTypes[c.VMType]; !ok {\n\t\treturn fmt.Errorf(\"invalid vmType: '%s'\", c.VMType)\n\t}\n\tif c.VMType == \"qemu\" {\n\t\tif err := util.AssertQemuImg(); err != nil {\n\t\t\treturn fmt.Errorf(\"cannot use vmType: '%s', error: %w\", c.VMType, err)\n\t\t}","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/config/configmanager/configmanager.go#L41-L77","documentation":"ValidateConfig rejects the mountType field. Allowed values are '9p' and 'sshfs' unconditionally, plus 'virtiofs' only when util.MacOS13OrNewer() reports macOS 13 Ventura or newer. Any other value, including virtiofs on older macOS or Linux, fails with the offending value echoed in the message.","triggerScenarios":"Loading or applying a config where mountType is 'virtiofs' on macOS 12 or older, or on Linux; a typo or case variant such as '9P', 'virtio_fs', 'sshFS'; an empty mountType left behind by a partial config migration.","commonSituations":"Config created on macOS 13+ then synced to an older Mac or a Linux host; copy-pasted configs from tutorials assuming virtiofs; downgrading macOS without adjusting the config; exact-match string comparison catching case differences.","solutions":["Set mountType to a supported value for your platform: '9p' or 'sshfs' anywhere, 'virtiofs' on macOS 13+ only","If virtiofs is required on a Mac, upgrade to macOS 13 or newer","Check spelling and case: validation is an exact lowercase key lookup in the validMountTypes map"],"exampleFix":"# before (on macOS 12 or Linux)\nmountType: virtiofs\n\n# after\nmountType: 9p","handlingStrategy":"validation","validationCode":"func validMountType(mountType string, macOS13OrNewer bool) bool {\n    switch mountType {\n    case \"9p\", \"sshfs\":\n        return true\n    case \"virtiofs\":\n        return macOS13OrNewer\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"if err := configmanager.ValidateConfig(c); err != nil {\n    if strings.HasPrefix(err.Error(), \"invalid mountType\") {\n        // reset to a portable value and revalidate\n        c.MountType = \"9p\"\n    }\n}","preventionTips":["Keep mountType '9p' in shared configs; only use 'virtiofs' on macOS 13+ machines","Prefer 'colima start --mount-type=' flag over editing YAML so values are checked at parse time","Document platform requirements next to any preset that uses virtiofs"],"tags":["config","validation","mounts","macos"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}