abiosoft/colima · error
disk image must be downloaded from
Error message
disk image must be downloaded from '%s', hash failure: %w
What it means
A user-supplied disk image must be byte-identical to Colima's official image: downloader.SHA (SHA-512) validates the file against the digest from limautil.Image. A mismatch means the file is not the expected artifact (different version, corrupted download, modified image). Unless ForceDiskImage is set, provisioning fails rather than booting an unverified image.
Solutions
- Download the exact official image from the location named in the error and retry with that file.
- If the custom image is intentional, bypass verification with the force flag (e.g. `colima start --disk-image /path --force-disk-image`) and accept the warning; the digest is cleared so Lima will not re-validate.
- Re-verify the file yourself (`shasum -a 512 image`) against the expected digest to detect corruption, then re-download if it differs.
- Upgrade/downgrade Colima so its embedded digest matches the image version you are supplying.
Example fix
# before colima start --disk-image ./my-customized.qcow2 # digest mismatch -> error # after colima start --disk-image ./my-customized.qcow2 --force-disk-image # warns and continues
Defensive patterns
Strategy: fallback
Validate before calling
// pre-verify the SHA-512 before handing the file to colima
// expected digest is published with the release artifact
if !sha512Matches(diskImagePath, expectedDigest) {
if !forceDiskImage { log.Fatal("digest mismatch; re-download or pass --force-disk-image") }
} Prevention
- Download images only from the official location named in the error
- Verify sha512 after every download/mirror copy
- Use --force-disk-image only for intentionally customized images
When it happens
Trigger: Passing --disk-image with a locally built, trimmed, re-compressed, or partially downloaded qcow2; supplying an image for a different Colima version than the embedded digest; truncated transfer. The error is skipped only when conf.ForceDiskImage is true (which logs a warning and clears the digest).
Common situations: Offline/air-gapped installs with hand-copied images; mirrors that re-encode artifacts; resumable-download corruption; teams pinning custom hardened images.
Related errors
- error getting disk image details
- error getting qcow image
- invalid disk image
- cannot copy config to new profile
- cannot make dir
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/45305303dce9579c.
Report an issue: GitHub.
Appendix: source
Thrown at environment/vm/lima/disk.go:165
// use a user specified disk image
if conf.DiskImage != "" {
if _, err := os.Stat(conf.DiskImage); err != nil {
return fmt.Errorf("invalid disk image: %w", err)
}
image, err := limautil.Image(l.limaConf.Arch, conf.Runtime)
if err != nil {
return fmt.Errorf("error getting disk image details: %w", err)
}
sha := downloader.SHA{Size: 512, Digest: image.Digest}
if err := sha.ValidateFile(l.host, conf.DiskImage); err != nil {
if conf.ForceDiskImage != nil && *conf.ForceDiskImage {
log.Warnln("unable to validate disk image, but continuing as requested...")
image.Digest = "" // clear so lima does not re-validate
} else {
return fmt.Errorf("disk image must be downloaded from '%s', hash failure: %w", image.Location, err)
}
}
image.Location = conf.DiskImage
l.limaConf.Images = []limaconfig.File{image}
return nil
}
// use a previously cached image
if image, ok := limautil.ImageCached(l.limaConf.Arch, conf.Runtime, conf.DiskImageMirror); ok {
l.limaConf.Images = []limaconfig.File{image}
return nil
}
// download image
log.Infoln("downloading disk image ...")
image, err := limautil.DownloadImage(l.limaConf.Arch, conf.Runtime, conf.DiskImageMirror)
if err != nil {View on GitHub (pinned to c3a5f9184d)