{"record":{"id":"2ac02cc9d42d4627","repo":"abiosoft/colima","slug":"failed-to-create-bundle-directory-w","errorCode":null,"errorMessage":"failed to create bundle directory: %w","messagePattern":"failed to create bundle directory: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"model/docker.go","lineNumber":87,"sourceCode":"\t// Find the GGUF layer (mediaType contains \"gguf\")\n\tvar blobPath string\n\tfor _, layer := range manifest.Layers {\n\t\tif strings.Contains(layer.MediaType, \"gguf\") {\n\t\t\tif blobHash, ok := strings.CutPrefix(layer.Digest, \"sha256:\"); ok {\n\t\t\t\tblobPath = fmt.Sprintf(\"/models/blobs/sha256/%s\", blobHash)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif blobPath == \"\" {\n\t\treturn \"\", fmt.Errorf(\"no GGUF layer found in model manifest\")\n\t}\n\n\t// Create bundle directory and hard-link the blob (same approach as Docker Model Runner)\n\tbundleDir := fmt.Sprintf(\"/models/bundles/sha256/%s/model\", modelHash)\n\tif err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"mkdir\", \"-p\", bundleDir); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create bundle directory: %w\", err)\n\t}\n\n\tif err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"ln\", blobPath, bundlePath); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to link model file: %w\", err)\n\t}\n\n\treturn bundlePath, nil\n}\n\n// InspectDockerModel returns information about a Docker model.\nfunc InspectDockerModel(modelName string) (*DockerModelInfo, error) {\n\tguest := lima.New(host.New())\n\toutput, err := guest.RunOutput(\"docker\", \"model\", \"inspect\", modelName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error inspecting model %q: %w\", modelName, err)\n\t}\n\n\tvar info DockerModelInfo","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/docker.go#L69-L105","documentation":"findGGUFPath creates the bundle parent with guest.RunQuiet(\"docker\",\"exec\",\"docker-model-runner\",\"mkdir\",\"-p\",\"/models/bundles/sha256/<hash>/model\"). The exec returned non-zero: the container filesystem/volume backing /models is read-only or full, the container exited mid-command, or the /models volume is not mounted in this runner container.","triggerScenarios":"VM disk exhausted (colima default disk full from images/models); runner container stopped between the manifest read and the mkdir; /models not present because the runner container was recreated with a different volume layout.","commonSituations":"Large models filling the 60-100GB default disk; mixing docker model commands with pruned volumes; runner recreated by reinstall-runner without its data volume.","solutions":["Free space in the VM (docker system prune, remove unused models, or colima stop + disk resize) and retry","Check the volume: docker inspect docker-model-runner --format '{{json .Mounts}}' — /models must be present and writable","Restart the runner (docker model start-runner) and retry serve","If the runner layout is broken, run SetupOrUpdateDocker (reinstall-runner) to rebuild it"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before serve: ensure the runner container is Running, not just inspectable.\nfunc runnerRunning(guest environment.VM) bool {\n    return guest.RunQuiet(\"docker\", \"inspect\", \"-f\", \"{{.State.Running}}\",\n        \"docker-model-runner\") == nil\n}","typeGuard":null,"tryCatchPattern":"if err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"mkdir\", \"-p\", bundleDir); err != nil {\n    return \"\", fmt.Errorf(\"failed to create bundle directory: %w — check runner container state and VM disk space\", err)\n}","preventionTips":["Monitor VM disk usage; multi-GB models exhaust small default disks quickly","Run docker model start-runner and confirm Running state before invoking serve flows","After runner reinstall, verify /models volume mounts are intact"],"tags":["docker","disk-space","model-runner","filesystem"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}