{"record":{"id":"34162c68fe8f775d","repo":"abiosoft/colima","slug":"error-preparing-vmnet-w","errorCode":null,"errorMessage":"error preparing vmnet: %w","messagePattern":"error preparing vmnet: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"daemon/daemon.go","lineNumber":68,"sourceCode":"\thost environment.HostActions\n}\n\nfunc (l processManager) Dependency(ctx context.Context, conf config.Config, name string) (deps process.Dependency, root bool) {\n\tprocesses := processesFromConfig(conf)\n\n\tfor _, p := range processes {\n\t\tif p.Name() == name {\n\t\t\treturn process.Dependencies(p)\n\t\t}\n\t}\n\n\treturn process.Dependencies()\n}\n\nfunc (l processManager) init() error {\n\t// dependencies for network\n\tif err := fsutil.MkdirAll(process.Dir(), 0755); err != nil {\n\t\treturn fmt.Errorf(\"error preparing vmnet: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc (l processManager) Running(ctx context.Context, conf config.Config) (s Status, err error) {\n\terr = l.host.RunQuiet(osutil.Executable(), \"daemon\", \"status\", config.CurrentProfile().ShortName)\n\tif err != nil {\n\t\treturn\n\t}\n\ts.Running = true\n\n\tctx = context.WithValue(ctx, process.CtxKeyDaemon(), s.Running)\n\n\tfor _, p := range processesFromConfig(conf) {\n\t\tpErr := p.Alive(ctx)\n\t\ts.Processes = append(s.Processes, processStatus{\n\t\t\tName:    p.Name(),\n\t\t\tRunning: pErr == nil,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/daemon/daemon.go#L50-L86","documentation":"processManager.init creates the per-profile daemon directory (process.Dir() = <profile ConfigDir>/daemon, e.g. ~/.colima/_default/daemon) via fsutil.MkdirAll(..., 0755). Despite the 'vmnet' wording (leftover from a comment about network dependencies), this is plain directory creation for all daemon files. The error wraps whatever filesystem failure MkdirAll hit (a *fs.PathError: permission denied, read-only filesystem, no space left on device).","triggerScenarios":"MkdirAll on ~/.colima/<profile>/daemon fails: a root-owned file or directory inside the path left by earlier sudo usage; $HOME or COLIMA_HOME unwritable; disk full; profile config dir replaced by a regular file.","commonSituations":"running colima once with sudo leaves ~/.colima entries owned by root; corporate machines with managed/read-only home directories; COLIMA_HOME exported to a protected location; a '~/.colima/_default' regular file blocking the dir.","solutions":["reproduce the real errno manually: mkdir -p ~/.colima/_default/daemon (or $COLIMA_HOME equivalent) and read the OS error","fix ownership: sudo chown -R $(whoami) ~/.colima","verify HOME/COLIMA_HOME point to a writable path for the invoking user","check disk space and read-only mounts: df -h ~"],"exampleFix":"// before\n$ colima start --mount-inotify\nerror preparing vmnet: mkdir /Users/me/.colima/_default/daemon: permission denied\n\n// after (root-owned dir from a previous sudo run)\n$ sudo chown -R $(whoami) ~/.colima\n$ colima start --mount-inotify   # succeeds","handlingStrategy":"try-catch","validationCode":"dir := filepath.Join(config.CurrentProfile().ConfigDir(), \"daemon\")\nif err := fsutil.MkdirAll(dir, 0755); err != nil {\n    return fmt.Errorf(\"daemon dir not preparable, fix before start: %w\", err)\n}\n// also probe writability, not just existence\nprobe := filepath.Join(dir, \".probe\")\nif err := os.WriteFile(probe, nil, 0600); err != nil {\n    return fmt.Errorf(\"daemon dir not writable: %w\", err)\n}\n_ = os.Remove(probe)","typeGuard":null,"tryCatchPattern":"if err := manager.Start(ctx, conf); err != nil {\n    var perr *fs.PathError\n    if errors.As(err, &perr) {\n        // perr.Path names the exact directory; check os.Stat(perr.Path) ownership/perms\n        log.Printf(\"daemon dir %s failed: %v — chown or free space\", perr.Path, perr.Err)\n    }\n}","preventionTips":["never run colima under sudo — it leaves root-owned entries under ~/.colima","if sudo was ever used, run sudo chown -R $(whoami) ~/.colima as cleanup","keep HOME and COLIMA_HOME exported and writable wherever colima runs (launchd/CI included)","monitor free disk space on the home volume"],"tags":["filesystem","daemon","permissions","startup"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}