{"record":{"id":"92da004b1bdf739b","repo":"abiosoft/colima","slug":"mount-path-with-spaces-is-not-supported-by-the-und","errorCode":null,"errorMessage":"mount path with spaces is not supported by the underlying Lima runtime: %q","messagePattern":"mount path with spaces is not supported by the underlying Lima runtime: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/configmanager/configmanager.go","lineNumber":157,"sourceCode":"\t\treturn fmt.Errorf(\"gateway %q is not IPv4\", gateway)\n\t}\n\n\t// Check last octet\n\tif ip4[3] != 2 {\n\t\treturn fmt.Errorf(\"the last octet of gateway %q is not 2\", gateway)\n\t}\n\n\treturn nil\n}\n\n// validateMounts ensures mount paths do not contain spaces, which are not\n// supported by the underlying Lima runtime and otherwise fail silently.\n// See https://github.com/abiosoft/colima/issues/1471.\nfunc validateMounts(mounts []config.Mount) error {\n\tfor _, m := range mounts {\n\t\tfor _, p := range []string{m.Location, m.MountPoint} {\n\t\t\tif strings.Contains(p, \" \") {\n\t\t\t\treturn fmt.Errorf(\"mount path with spaces is not supported by the underlying Lima runtime: %q\", p)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":139,"sourceCodeEnd":163,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/config/configmanager/configmanager.go#L139-L163","documentation":"validateMounts rejects any mounts entry whose location or mountPoint contains a space (strings.Contains(p, \" \")). The underlying Lima runtime fails silently on spaced paths (referenced issue abiosoft/colima#1471), so colima validates up front and names the offending path in the error.","triggerScenarios":"A mounts entry in colima.yaml such as location: ~/My Projects or mountPoint: /home/ubuntu.linux.coder/My Files. Trailing and embedded spaces both trigger it because the check is a substring scan.","commonSituations":"Mounting project folders like 'Google Drive', 'VirtualBox VMs', or 'My Documents'; macOS default folder names containing spaces; configs ported from docker-compose volume syntax where spaces were tolerated.","solutions":["Mount a space-free parent directory and access the spaced subfolder from inside it","Create a symlink without spaces (ln -s \"$HOME/My Projects\" \"$HOME/my-projects\") and mount the symlink path","Rename the directory if feasible, or drop the mount if it is optional"],"exampleFix":"# before\nmounts:\n  - location: ~/My Projects\n\n# after (symlink workaround)\nln -s \"$HOME/My Projects\" \"$HOME/my-projects\"\nmounts:\n  - location: ~/my-projects","handlingStrategy":"validation","validationCode":"for _, m := range c.Mounts {\n    for _, p := range []string{m.Location, m.MountPoint} {\n        if strings.Contains(p, \" \") {\n            // create a space-free symlink or mount a parent dir without spaces\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := configmanager.ValidateConfig(c); err != nil {\n    if strings.Contains(err.Error(), \"spaces is not supported\") {\n        // the offending path is printed; symlink it to a space-free name\n    }\n}","preventionTips":["Keep project directories mountable: avoid spaces in paths under version control","Use symlinks for legacy spaced directory names","Prefer mounting the home directory or a workspace root and referencing subpaths inside the VM"],"tags":["config","validation","mounts","filesystem"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}