{"record":{"id":"05f1aeb787bcde9f","repo":"abiosoft/colima","slug":"error-loading-oci-images-w","errorCode":null,"errorMessage":"error loading oci images: %w","messagePattern":"error loading oci images: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"environment/container/kubernetes/k3s.go","lineNumber":121,"sourceCode":"\t\treturn guest.Run(\"gzip\", \"-f\", \"-d\", downloadPathTarGz)\n\t})\n\n\tairGapDir := \"/var/lib/rancher/k3s/agent/images/\"\n\ta.Add(func() error {\n\t\treturn guest.Run(\"sudo\", \"mkdir\", \"-p\", airGapDir)\n\t})\n\ta.Add(func() error {\n\t\treturn guest.Run(\"sudo\", \"cp\", downloadPathTar, airGapDir)\n\t})\n\n\t// load OCI images for K3s\n\t// this can be safely ignored if failed as the images would be pulled afterwards.\n\tswitch containerRuntime {\n\tcase containerd.Name:\n\t\ta.Stage(\"loading oci images\")\n\t\ta.Add(func() error {\n\t\t\tif err := guest.Run(\"sudo\", \"nerdctl\", \"-n\", \"k8s.io\", \"load\", \"-i\", downloadPathTar, \"--all-platforms\"); err != nil {\n\t\t\t\tlog.Warnln(fmt.Errorf(\"error loading oci images: %w\", err))\n\t\t\t\tlog.Warnln(\"startup may delay a bit as images will be pulled from oci registry\")\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\tcase docker.Name:\n\t\ta.Stage(\"loading oci images\")\n\t\ta.Add(func() error {\n\t\t\tif err := guest.Run(\"sudo\", \"docker\", \"load\", \"-i\", downloadPathTar); err != nil {\n\t\t\t\tlog.Warnln(fmt.Errorf(\"error loading oci images: %w\", err))\n\t\t\t\tlog.Warnln(\"startup may delay a bit as images will be pulled from oci registry\")\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\t}\n}\n\nfunc installK3sCluster(\n\thost environment.HostActions,","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/container/kubernetes/k3s.go#L103-L139","documentation":"In air-gapped k3s provisioning, colima preloads the downloaded image tarball into the container runtime ('nerdctl -n k8s.io load -i ... --all-platforms' for containerd, or 'docker load -i' for docker) and that load failed. It is explicitly non-fatal: colima logs a warning that startup will be slower because images will be pulled from the registry instead.","triggerScenarios":"guest.Run('sudo','nerdctl','load','-i',tar,'--all-platforms') or the docker equivalent exits non-zero: tarball corrupt/incomplete download, architecture mismatch, containerd/docker socket unavailable at that moment, disk space exhausted while expanding layers.","commonSituations":"Flaky network during image download, guest disk nearly full, mismatch between image platforms and the VM architecture, containerd not ready when the chain step runs.","solutions":["Do nothing if slow first start is acceptable — images pull automatically later","Free guest disk space and re-run: 'colima stop && colima start --kubernetes'","Verify the tarball: 'colima ssh -- sudo nerdctl -n k8s.io load -i <path> --all-platforms' and read the error","For guaranteed air-gap, ensure the downloaded tar matches the VM arch and re-download on checksum mismatch"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// verify the tarball is a readable image archive before loading\nif err := guest.Run(\"sudo\", \"tar\", \"-tf\", downloadPathTar, \"manifest.json\"); err != nil {\n    log.Warnln(\"oci image tarball looks invalid, will fall back to registry pull\")\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := guest.Run(\"sudo\", \"nerdctl\", \"-n\", \"k8s.io\", \"load\", \"-i\", downloadPathTar, \"--all-platforms\"); err != nil {\n    log.Warnln(fmt.Errorf(\"error loading oci images: %w\", err))\n    log.Warnln(\"startup may delay a bit as images will be pulled from oci registry\")\n    return nil // deliberate fallback: k3s pulls images on first start\n}","preventionTips":["For air-gapped clusters, checksum-verify the downloaded image tar before start","Ensure guest arch matches the images (--all-platforms helps but disk must fit)","Treat this warning as expected on flaky networks; only act if startup is too slow"],"tags":["kubernetes","k3s","images","airgap","containerd"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}