abiosoft/colima · error
'%s' overlaps '%s'
Error message
'%s' overlaps '%s'
What it means
Thrown while generating the Lima VM config at start: checkOverlappingMounts rejects any two mounts whose effective guest paths nest (one is a string prefix of the other). Lima itself cannot handle overlapping mounts (lima-vm/lima#302), so colima refuses to boot the VM rather than produce a broken 9p/virtiofs setup. The compared path is selectPath(m): MountPoint when set, otherwise Location, after util.CleanPath.
Source
Thrown at environment/vm/lima/yaml.go:444
return util.CleanPath(m.MountPoint)
}
return util.CleanPath(m.Location)
}
func checkOverlappingMounts(mounts []config.Mount) error {
for i := 0; i < len(mounts)-1; i++ {
a, err := selectPath(mounts[i])
if err != nil {
return err
}
for j := i + 1; j < len(mounts); j++ {
b, err := selectPath(mounts[j])
if err != nil {
return err
}
if strings.HasPrefix(a, b) || strings.HasPrefix(b, a) {
return fmt.Errorf("'%s' overlaps '%s'", a, b)
}
}
}
return nil
}
// disableHas checks if the provided feature is indeed found in the disable configuration slice.
func ingressDisabled(disableFlags []string) bool {
disabled := func(s string) bool { return s == "traefik" || s == "ingress" }
for i, f := range disableFlags {
if f == "--disable" {
if len(disableFlags)-1 <= i {
return false
}
if disabled(disableFlags[i+1]) {
return true
}
continueView on GitHub (pinned to c3a5f9184d)
Solutions
- Drop the narrower mount (e.g. remove '~/dev' and keep '~'), or drop '~' and mount only the subdirectory
- If both are needed, set the inner mount's MountPoint outside the outer mount's path so selectPath() results no longer nest
- Inspect the saved profile config (~/.colima/_lima/<profile>/*.yaml, 'colima list') for stale overlapping mounts and edit settings.yaml or recreate the profile with a non-overlapping set
- Apply changes with colima stop && colima start (or colima start --mount ... on a fresh profile)
Example fix
# before (overlaps: ~ contains ~/dev) colima start --mount ~ --mount ~/dev:w # after (single wide mount) colima start --mount ~:w
Defensive patterns
Strategy: validation
Validate before calling
// Run before colima start / writing mount config.
func mountsOverlap(a, b string) bool {
ac, _ := filepath.Abs(filepath.Clean(expandTilde(a)))
bc, _ := filepath.Abs(filepath.Clean(expandTilde(b)))
if ac == "/" || bc == "/" { return true } // root contains everything
return strings.HasPrefix(ac+"/", bc+"/") || strings.HasPrefix(bc+"/", ac+"/")
}
func validateMounts(mounts []string) error {
for i := 0; i < len(mounts)-1; i++ {
for j := i + 1; j < len(mounts); j++ {
locI := strings.Split(mounts[i], ":")[0]
locJ := strings.Split(mounts[j], ":")[0]
if mountsOverlap(locI, locJ) {
return fmt.Errorf("mount %q overlaps %q", locI, locJ)
}
}
}
return nil
} Try / catch
if err := checkOverlappingMounts(conf.Mounts); err != nil {
return fmt.Errorf("mounts invalid: %w — remove nested mounts or relocate one MountPoint", err)
} Prevention
- Mount the widest path once (e.g. just '~') instead of stacking subdirectory mounts
- When adding a mount, diff it against existing mounts (and their MountPoints) with a prefix check before applying
- Keep colima start scripts in version control so mount lists don't accrete flags across invocations
- Remember MountPoint counts too: the overlap test uses MountPoint when set, not just Location
When it happens
Trigger: colima start with mounts like --mount ~ and --mount ~/dev (or /Users/me plus /Users/me/projects); a mount whose MountPoint lands inside another mount's Location; paths that look distinct (trailing slash, relative, ~ vs /Users/x) but CleanPath to a nested prefix.
Common situations: Keeping the default '~' mount while adding a project-specific mount; profiles created by older colima versions whose persisted mounts are now validated on upgrade; reusing CI scripts that stack --mount flags.
Related errors
- dependency check failed for VM: %w
- error starting vm: %w
- error stopping vm: %w
- error during teardown of vm: %w
- error stopping :%w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/0cdd9a2aadbf718c.
Report an issue: GitHub.