abiosoft/colima · error
failed to pull model %q: %w
Error message
failed to pull model %q: %w
What it means
EnsureModelAvailable runs `ramalama pull <model>` inside the Lima VM through guest.RunInteractive, after ramalamaModelExists reported the model absent locally; the error means that interactive shell command exited non-zero. %q carries the requested model name and %w the shell exit error from the VM.
Source
Thrown at model/ramalama.go:141
return name
}
// EnsureRamalamaModel ensures a ramalama model is available, pulling if necessary.
func EnsureRamalamaModel(modelName string) error {
if ramalamaModelExists(modelName) {
return nil
}
// Model not found locally, pull it
guest := lima.New(host.New())
shellCmd := fmt.Sprintf(
`export RAMALAMA_CONTAINER_ENGINE=docker PATH="$HOME/.local/bin:$PATH"; ramalama pull %s`,
modelName,
)
if err := guest.RunInteractive("sh", "-c", shellCmd); err != nil {
return fmt.Errorf("failed to pull model %q: %w", modelName, err)
}
return nil
}
// ProvisionRamalama installs ramalama and its dependencies in the VM.
func ProvisionRamalama() error {
guest := lima.New(host.New())
script := `set -e
export PATH="$HOME/.local/bin:$PATH"
# ensure pipx is available
sudo apt-get update -y && sudo apt-get install -y pipx
# install ramalama via pipx; upgrade if ramalama is already installed
if command -v ramalama >/dev/null 2>&1; then
pipx upgrade ramalamaView on GitHub (pinned to c3a5f9184d)
Solutions
- Reproduce inside the VM to see ramalama's own error: colima ssh -- sh -c 'PATH=$HOME/.local/bin:$PATH ramalama pull <model>'
- Check VM disk headroom: colima ssh -- df -h, and grow with colima stop && colima start --disk if full
- Verify VM internet egress and DNS: colima ssh -- curl -I https://ollama.com
- Use the exact model identifiers listed by colima model list / ramalama ls
Defensive patterns
Strategy: validation
Validate before calling
// sanity-check the reference shape before triggering a pull
var modelRef = regexp.MustCompile(`^(ollama://|huggingface://|hf.co/|quay.io/)[\w./:-]+$`)
func looksLikeModelRef(name string) bool {
return modelRef.MatchString(name)
} Prevention
- List installed models before pulling to avoid duplicate or typo'd pulls
- Keep VM disk headroom above the largest model you plan to pull
- Run large pulls on a stable network; a Ctrl-C abort surfaces as this error
When it happens
Trigger: The model identifier does not exist on its source registry (typo in an ollama/hf.co/quay reference); the VM has no internet egress; registry authentication is required; the VM disk is full; the user aborts the interactive pull with Ctrl-C.
Common situations: Typo'd model names passed to colima model run; VPN cut-offs isolating the VM; VM disk (colima disk size) exhausted after pulling several multi-GB models.
Related errors
- error setting up AI model runner: %w
- error listing models: %w
- dependency check failed for VM: %w
- error retrieving current runtime: empty value
- error listing networks: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/749f7bad25bf3921.
Report an issue: GitHub.