{"record":{"id":"5fadcb8de01bdc67","repo":"abiosoft/colima","slug":"runtime-disk-provisioned-for-s-runtime-delete-co","errorCode":null,"errorMessage":"runtime disk provisioned for %s runtime. Delete container data with 'colima delete --data' before using another runtime","messagePattern":"runtime disk provisioned for (.+?) runtime\\. Delete container data with 'colima delete --data' before using another runtime","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"environment/vm/lima/disk.go","lineNumber":47,"sourceCode":"\t\t// runtime disk is not required when no runtime is in use\n\t\treturn nil\n\t}\n\n\tdisk := dataDisk(conf.Runtime)\n\n\ts, _ := store.Load()\n\tformat := !s.DiskFormatted // only format if not previously formatted\n\n\tif !limautil.HasDisk() {\n\t\tif err := limautil.CreateDisk(conf.Disk); err != nil {\n\t\t\treturn fmt.Errorf(\"error creating runtime disk: %w\", err)\n\t\t}\n\t\tformat = true // new disk should be formated\n\t}\n\n\t// when disk is formatted for the wrong runtime, prevent use\n\tif s.DiskFormatted && s.DiskRuntime != \"\" && s.DiskRuntime != conf.Runtime {\n\t\treturn fmt.Errorf(\"runtime disk provisioned for %s runtime. Delete container data with 'colima delete --data' before using another runtime\", s.DiskRuntime)\n\t}\n\n\tl.limaConf.Disk = config.Disk(conf.RootDisk).GiB()\n\tl.limaConf.AdditionalDisks = append(l.limaConf.AdditionalDisks, limaconfig.Disk{\n\t\tName:   config.CurrentProfile().ID,\n\t\tFormat: format,\n\t\tFSType: disk.FSType,\n\t})\n\n\tl.mountRuntimeDisk(conf, format)\n\treturn nil\n}\n\nfunc (l *limaVM) useRuntimeDisk(conf config.Config) {\n\tif !limautil.HasDisk() {\n\t\tl.limaConf.Disk = config.Disk(conf.Disk).GiB()\n\t\treturn\n\t}","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/vm/lima/disk.go#L29-L65","documentation":"Colima keeps a single data disk per profile and records which container runtime (docker or containerd) it was formatted for in the host-side state store (store.Load -> DiskRuntime). When the persisted state says DiskFormatted with a DiskRuntime that differs from the runtime in the incoming config, provisioning aborts to prevent the VM from re-formatting a disk that already holds another runtime's container data. The message names the runtime the disk was originally provisioned for.","triggerScenarios":"Starting a profile whose disk was already formatted (e.g. by a previous `colima start --runtime docker`) with a different runtime flag, e.g. `colima start --runtime containerd` on a profile whose store entry has DiskRuntime=\"docker\". Also occurs when a runtime name changes between Colima versions or when a stale state file references a renamed runtime.","commonSituations":"Switching runtimes on an existing profile to test docker-vs-containerd; upgrading Colima versions where runtime identifiers changed; leftover state after experimenting with `colima start` flags; CI runners reusing a profile across jobs that pick different runtimes.","solutions":["Run `colima delete --data` (or `colima delete` for the profile) to wipe the provisioned disk and state, then start again with the desired runtime: `colima start --runtime <runtime>`.","If you need both runtimes, keep them on separate profiles: `colima start --profile docker --runtime docker` and `colima start --profile containerd --runtime containerd`.","If the disk truly is fresh (new/verified creation) but stale state triggers the error, inspect/remove the profile's state file under ~/.colima/_lima/<profile> (or COLIMA_HOME) so DiskFormatted/DiskRuntime reset, then start again.","Pin the runtime consistently in automation scripts/CI so the same profile is never started with two different runtimes."],"exampleFix":"# before\ncolima start --runtime containerd   # profile previously started with docker -> error\n\n# after\ncolima delete --data\ncolima start --runtime containerd","handlingStrategy":"validation","validationCode":"// Before starting, check persisted runtime vs desired runtime\nimport \"github.com/abiosoft/colima/store\"\n\ns, err := store.Load()\nif err == nil && s.DiskFormatted && s.DiskRuntime != \"\" && s.DiskRuntime != desiredRuntime {\n    log.Fatalf(\"disk provisioned for %s; run 'colima delete --data' or use profile per runtime\", s.DiskRuntime)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use one Colima profile per container runtime","Never reuse a profile across runtimes in CI without deleting --data first","Document the chosen runtime in team start scripts"],"tags":["disk","runtime","colima","state","containerd","docker"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}