abiosoft/colima · error
config missing for colima profile '%s': %w
Error message
config missing for colima profile '%s': %w
What it means
Returned by `colima clone` (cmd/clone.go:58) during the 'copying config' phase when a second os.Stat on the source Lima instance directory fails. The same directory passed the initial existence check, so this fires only if it disappeared or became unreadable between the two checks.
Source
Thrown at cmd/clone.go:58
return fmt.Errorf("error preparing to copy VM: %w", err)
}
if err := cli.Command("cp",
filepath.Join(from.LimaInstanceDir(), "basedisk"),
filepath.Join(from.LimaInstanceDir(), "diffdisk"),
filepath.Join(from.LimaInstanceDir(), "cidata.iso"),
filepath.Join(from.LimaInstanceDir(), "lima.yaml"),
to.LimaInstanceDir(),
).Run(); err != nil {
return fmt.Errorf("error copying VM: %w", err)
}
}
{
logrus.Info("copying config...")
// verify source config exists
if _, err := os.Stat(from.LimaInstanceDir()); err != nil {
return fmt.Errorf("config missing for colima profile '%s': %w", from.ShortName, err)
}
// ensure destination config directory
if err := cli.Command("mkdir", "-p", filepath.Dir(to.LimaInstanceDir())).Run(); err != nil {
return fmt.Errorf("cannot copy config to new profile '%s': %w", to.ShortName, err)
}
if err := cli.Command("cp", from.LimaInstanceDir(), to.LimaInstanceDir()).Run(); err != nil {
return fmt.Errorf("error copying VM config: %w", err)
}
}
logrus.Info("clone successful")
logrus.Infof("run `colima start %s` to start the newly cloned profile", to.ShortName)
return nil
},
}
View on GitHub (pinned to c3a5f9184d)
Solutions
- Ensure no other colima/limactl operation touches the source profile during the clone, then retry
- Verify the directory still exists: `ls -ld ~/.colima/_lima/<src-profile>`
- If the source was deleted, recreate it with `colima start -p <src>` before cloning again
Defensive patterns
Strategy: validation
Validate before calling
// Serialize profile operations: hold a lock or simply verify presence right before the call
if _, err := os.Stat(from.LimaInstanceDir()); err != nil {
return fmt.Errorf("source profile vanished; concurrent colima operation detected: %w", err)
} Prevention
- Never run two colima/limactl commands against the same profile concurrently
- In automation, serialize clone/delete/start per profile (flock or job queue)
- Re-clone after fixing the source profile if this race triggers
When it happens
Trigger: Concurrent removal of the source profile (a parallel `colima delete` or `limactl delete`), or a permission/IO error surfacing on the second stat (e.g. ACL change mid-clone).
Common situations: Running two colima commands against the same profile simultaneously; automation scripts racing cleanup jobs against clones.
Related errors
- error preparing to copy VM: %w
- cannot copy config to new profile '%s': %w
- error copying VM config: %w
- error reading pid file: %w
- error reading ssh config: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/002fda4a009ed1ca.
Report an issue: GitHub.