abiosoft/colima · warning

error saving provisioning state: %w

Error message

error saving provisioning state: %w

What it means

After the ramalama install script has already succeeded, ProvisionRamalama persists RamalamaProvisioned=true via store.Set; this error means only that state write failed. The root cause is a store save failure (marshal/write of the store file in store/store.go), typically permissions or disk — the misleading part is that the runner is actually installed.

Source

Thrown at model/ramalama.go:186

# fix ownership of persistent data dir and symlink to expected location
sudo chown -R $(id -u):$(id -g) /var/lib/ramalama
mkdir -p "$HOME/.local/share"
ln -sfn /var/lib/ramalama "$HOME/.local/share/ramalama"
`

	log.Println("installing AI model runner...")

	if err := guest.RunInteractive("sh", "-c", script); err != nil {
		return fmt.Errorf("error setting up AI model runner: %w", err)
	}

	log.Println("AI model runner installed")

	// mark as provisioned
	if err := store.Set(func(s *store.Store) {
		s.RamalamaProvisioned = true
	}); err != nil {
		return fmt.Errorf("error saving provisioning state: %w", err)
	}

	return nil
}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Fix ownership of the colima store/config directory back to your user (chown -R $(id -u):$(id -g) <colima config dir>)
  2. Free space on the home volume if it is full
  3. Re-run the command that triggered provisioning — installation already succeeded, only the flag write failed; if the store file is corrupt, delete it and re-provision

Example fix

// before
if err := store.Set(func(s *store.Store) {
	s.RamalamaProvisioned = true
}); err != nil {
	return fmt.Errorf("error saving provisioning state: %w", err)
}
return nil

// after: installation already succeeded; treat flag persistence as non-fatal
if err := store.Set(func(s *store.Store) {
	s.RamalamaProvisioned = true
}); err != nil {
	log.Warnf("AI model runner installed but provisioning state not saved: %v", err)
}
return nil
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure the store file is writable before starting a long provisioning run
func storeWritable(p string) bool {
	f, err := os.OpenFile(p, os.O_RDWR|os.O_CREATE, 0o644)
	if err != nil {
		return false
	}
	_ = f.Close()
	return true
}

Try / catch

if err := runner.EnsureProvisioned(); err != nil {
	if strings.Contains(err.Error(), "error saving provisioning state") {
		// install actually succeeded: retry the command; only the flag write is repeated
	}
}

Prevention

When it happens

Trigger: Store file or its directory not writable (ownership changed by an earlier sudo run); home partition full; store directory deleted mid-run.

Common situations: One sudo colima invocation leaves root-owned files under the colima config dir; later normal runs then fail every persist.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/8c357de7fe0eb786. Report an issue: GitHub.