{"record":{"id":"4e9456a1028069c8","repo":"abiosoft/colima","slug":"invalid-vmtype-s","errorCode":null,"errorMessage":"invalid vmType: '%s'","messagePattern":"invalid vmType: '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/configmanager/configmanager.go","lineNumber":72,"sourceCode":"\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}\n\t}\n\tif c.VMType == \"krunkit\" {\n\t\tif err := util.AssertKrunkit(); err != nil {\n\t\t\treturn fmt.Errorf(\"cannot use vmType: '%s', error: %w\", c.VMType, err)\n\t\t}\n\t}\n\n\tif c.DiskImage != \"\" {\n\t\tif strings.HasPrefix(c.DiskImage, \"http://\") || strings.HasPrefix(c.DiskImage, \"https://\") {\n\t\t\treturn fmt.Errorf(\"cannot use diskImage: remote URLs not supported, only local files can be specified\")\n\t\t}\n\t}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/config/configmanager/configmanager.go#L54-L90","documentation":"ValidateConfig rejects the vmType field against a platform-dependent allowlist: 'qemu' is always valid, 'vz' is added on macOS 13+, and 'krunkit' on macOS 13+ ARM. Any value not present in validVMTypes after those platform adjustments is refused with the value echoed.","triggerScenarios":"vmType set to 'vz' on Linux or macOS older than 13; values with typos or wrong case such as 'QEMU', 'vz ', or 'krun-kit'; an empty vmType after a bad merge of config profiles.","commonSituations":"Configs moved between Linux and macOS hosts; using vz after a macOS downgrade; older colima versions accepting values the current build no longer registers; copy-paste introducing stray characters.","solutions":["Set vmType to exactly 'qemu', or 'vz' (macOS 13+), or 'krunkit' (macOS 13+ ARM)","On Linux or macOS <13 use 'qemu', the only universally valid driver","Check 'colima version' and the matching release notes for the driver names supported by your build"],"exampleFix":"# before (on Linux)\nvmType: vz\n\n# after\nvmType: qemu","handlingStrategy":"validation","validationCode":"func validVMType(vmType string, macOS13OrNewer, macOS13OrNewerOnArm bool) bool {\n    valid := map[string]bool{\"qemu\": true}\n    if macOS13OrNewer {\n        valid[\"vz\"] = true\n    }\n    if macOS13OrNewerOnArm {\n        valid[\"krunkit\"] = true\n    }\n    return valid[vmType]\n}","typeGuard":null,"tryCatchPattern":"if err := configmanager.ValidateConfig(c); err != nil {\n    if strings.HasPrefix(err.Error(), \"invalid vmType\") {\n        // show the allowlist for this host instead of retrying blindly\n        log.Println(\"supported vmType: qemu; vz (macOS 13+); krunkit (macOS 13+ ARM)\")\n    }\n}","preventionTips":["Use 'qemu' in any config shared across platforms","Set vmType via CLI flags so tab-completion prevents typos","Revalidate configs with 'colima start' after OS upgrades or downgrades"],"tags":["config","validation","vm-type"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}