abiosoft/colima · error

error recovering storage pool: %w

Error message

error recovering storage pool: %w

What it means

The interactive 'sudo incus admin recover' command inside the guest exited non-zero while colima was replaying answers to recover the existing zfs pool. The wrapped error carries incus's own message; typical causes are corrupted pool data or unexpected prompts the automation did not anticipate.

Source

Thrown at environment/container/incus/incus.go:463

	disks = strings.Fields(str)
	if len(disks) == 0 {
		return fmt.Errorf("no existing storage pool disks found")
	}

	log := c.Logger(ctx)

	log.Println()
	log.Println("Running 'incus admin recover' ...")
	log.Println()
	log.Println(fmt.Sprintf("Found %d storage pool source(s):", len(disks)))
	for _, disk := range disks {
		log.Println("  " + poolDisksDir + "/" + disk)
	}
	log.Println()

	if err := c.guest.RunInteractive("sudo", "incus", "admin", "recover"); err != nil {
		return fmt.Errorf("error recovering storage pool: %w", err)
	}

	out, err := c.guest.RunOutput("sudo", "incus", "storage", "list", "name="+poolName, "-c", "n", "--format", "compact,noheader")
	if err != nil {
		return err
	}

	if out != poolName {
		return fmt.Errorf("default storage pool recovery failure")
	}

	return nil
}

func (c *incusRuntime) wipeDisk(size int) error {
	// prepare by deleting relevant files/directories
	deleteScript := strings.NewReplacer(
		"{disk_file}", poolDiskFile,

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Let colima retry the recovery (answer 'yes' at the prompt) — transient zfs import failures often clear
  2. Run recovery manually to see the real prompt/error: 'colima ssh -- sudo incus admin recover'
  3. If the pool is unrecoverable, answer 'no' to discard the disk and create a fresh pool (restore data from backup afterwards)
  4. Ensure incus in the guest matches the version that created the pool before retrying
Defensive patterns

Strategy: retry

Try / catch

if err := c.recoverDisk(ctx); err != nil {
    log.Warnln(err)
    if cli.Prompt("recovery failed for default storage pool, try again") {
        continue // retry loop already built in
    }
    log.Warnln("discarding disk, creating new storage pool")
    return c.wipeDisk(conf.Disk)
}

Prevention

When it happens

Trigger: guest.RunInteractive('sudo','incus','admin','recover') fails: zfs pool metadata corrupt, disk image truncated, incus recover asks an unexpected question and the answer stream ends, or the incus version changed prompt order.

Common situations: VM stopped abruptly during pool write (zfs intent log issues), resized/moved disk image, incus version upgrade between the backup and the recovery attempt.

Related errors


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