abiosoft/colima · error

mount path with spaces is not supported by the underlying Li

Error message

mount path with spaces is not supported by the underlying Lima runtime: %q

What it means

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.

Source

Thrown at config/configmanager/configmanager.go:157

		return fmt.Errorf("gateway %q is not IPv4", gateway)
	}

	// Check last octet
	if ip4[3] != 2 {
		return fmt.Errorf("the last octet of gateway %q is not 2", gateway)
	}

	return nil
}

// validateMounts ensures mount paths do not contain spaces, which are not
// supported by the underlying Lima runtime and otherwise fail silently.
// See https://github.com/abiosoft/colima/issues/1471.
func validateMounts(mounts []config.Mount) error {
	for _, m := range mounts {
		for _, p := range []string{m.Location, m.MountPoint} {
			if strings.Contains(p, " ") {
				return fmt.Errorf("mount path with spaces is not supported by the underlying Lima runtime: %q", p)
			}
		}
	}
	return nil
}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Mount a space-free parent directory and access the spaced subfolder from inside it
  2. Create a symlink without spaces (ln -s "$HOME/My Projects" "$HOME/my-projects") and mount the symlink path
  3. Rename the directory if feasible, or drop the mount if it is optional

Example fix

# before
mounts:
  - location: ~/My Projects

# after (symlink workaround)
ln -s "$HOME/My Projects" "$HOME/my-projects"
mounts:
  - location: ~/my-projects
Defensive patterns

Strategy: validation

Validate before calling

for _, m := range c.Mounts {
    for _, p := range []string{m.Location, m.MountPoint} {
        if strings.Contains(p, " ") {
            // create a space-free symlink or mount a parent dir without spaces
        }
    }
}

Try / catch

if err := configmanager.ValidateConfig(c); err != nil {
    if strings.Contains(err.Error(), "spaces is not supported") {
        // the offending path is printed; symlink it to a space-free name
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/92da004b1bdf739b. Report an issue: GitHub.