{"record":{"id":"0d0a2c26dbbf2474","repo":"abiosoft/colima","slug":"error-starting-vm-w","errorCode":null,"errorMessage":"error starting vm: %w","messagePattern":"error starting vm: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/app.go","lineNumber":124,"sourceCode":"\tlog.Println(\"starting\", config.CurrentProfile().DisplayName)\n\t// print the full path of current profile being used\n\tlog.Tracef(\"starting with config file: %s\\n\", config.CurrentProfile().File())\n\n\tvar containers []environment.Container\n\tif !environment.IsNoneRuntime(conf.Runtime) {\n\t\tcs, err := c.startWithRuntime(conf)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcontainers = cs\n\t}\n\n\t// the order for start is:\n\t//   vm start -> container runtime provision -> container runtime start\n\n\t// start vm\n\tif err := c.guest.Start(ctx, conf); err != nil {\n\t\treturn fmt.Errorf(\"error starting vm: %w\", err)\n\t}\n\n\t// run after-boot provision scripts\n\tc.runProvisionScripts(conf, config.ProvisionModeAfterBoot)\n\n\t// provision and start container runtimes\n\tfor _, cont := range containers {\n\t\tlog := log.WithField(\"context\", cont.Name())\n\t\tlog.Println(\"provisioning ...\")\n\t\tif err := cont.Provision(ctx); err != nil {\n\t\t\treturn fmt.Errorf(\"error provisioning %s: %w\", cont.Name(), err)\n\t\t}\n\t\tlog.Println(\"starting ...\")\n\t\tif err := cont.Start(ctx); err != nil {\n\t\t\treturn fmt.Errorf(\"error starting %s: %w\", cont.Name(), err)\n\t\t}\n\t}\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/app/app.go#L106-L142","documentation":"Returned from Start when the Lima guest machine itself fails to boot; c.guest.Start wraps the limactl start error. This happens before any container runtime provisioning, so nothing inside the VM is the cause yet. The underlying limactl error plus the QEMU/VZ console output under ~/.lima/<profile>/ carry the real reason.","triggerScenarios":"colima start with a virtualization driver the host cannot provide (VZ on an unsupported macOS build, missing/outdated QEMU); requested CPU/memory larger than the host can allocate; a leftover locked or corrupted VM instance after a crash or forced shutdown; insufficient host disk space.","commonSituations":"macOS upgrade breaking the Virtualization.framework; qemu removed or downgraded by brew; VM wedged after the host slept or force-rebooted; `--cpu 8 --memory 16` on a small machine; full disk.","solutions":["Rerun with `colima start --verbose` and read the logs in ~/.lima/colima/ (ha.stderr.log and friends) for the hypervisor-level cause","Recreate the VM: `colima delete && colima start`","Lower requested resources (`colima start --cpu 2 --memory 2`) and free host disk space","If using VZ confirm macOS 13+, otherwise use the QEMU driver; if using QEMU ensure `brew install qemu` is current"],"exampleFix":"# before\ncolima start\n# error: error starting vm: ...\n\n# after\ncolima delete\ncolima start --verbose\ncat ~/.lima/colima/ha.stderr.log","handlingStrategy":"retry","validationCode":"// avoid booting on top of a wedged instance\nout, _ := exec.Command(\"limactl\", \"list\", \"--json\").CombinedOutput()\nif strings.Contains(string(out), \"colima\") {\n    // clean up first (colima delete) or confirm the instance is stopped cleanly\n}","typeGuard":null,"tryCatchPattern":"if err := a.Start(ctx, conf); err != nil {\n    if strings.Contains(err.Error(), \"error starting vm\") {\n        // first retry after cleanup; recreate the instance on repeated failure\n        _ = a.Delete(false, true)\n        err = a.Start(ctx, conf)\n    }\n    if err != nil {\n        return err\n    }\n}","preventionTips":["Stop colima cleanly before host shutdown/sleep","Keep qemu and lima versions matched with colima","Do not request more CPU/memory than the host has","Recreate the VM after macOS major upgrades"],"tags":["vm","startup","qemu","virtualization","lima"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}