{"record":{"id":"3db02d7815613f14","repo":"abiosoft/colima","slug":"error-persisting-store-settings-w","errorCode":null,"errorMessage":"error persisting store settings: %w","messagePattern":"error persisting store settings: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"environment/vm/lima/lima.go","lineNumber":369,"sourceCode":"\t\tif err := configmanager.SaveToFile(conf, config.CurrentProfile().StateFile()); err != nil {\n\t\t\tlogrus.Warnln(fmt.Errorf(\"error persisting Colima state: %w\", err))\n\t\t}\n\t\treturn nil\n\t})\n\n\t// save store settings\n\ta.Add(func() error {\n\t\tif len(l.limaConf.AdditionalDisks) == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\t// startup is successful\n\t\t// if additional disk is present, then it must've been formatted correctly.\n\t\tif err := store.Set(func(s *store.Store) {\n\t\t\ts.DiskFormatted = true\n\t\t}); err != nil {\n\t\t\t// not fatal, but should be logged\n\t\t\tlogrus.Warnln(fmt.Errorf(\"error persisting store settings: %w\", err))\n\t\t}\n\n\t\treturn nil\n\t})\n\n}\n\nfunc (l *limaVM) assertQemu() error {\n\t// assert qemu requirement\n\tsameArchitecture := environment.HostArch() == l.limaConf.Arch\n\tif err := util.AssertQemuImg(); err != nil && l.limaConf.VMType == limaconfig.QEMU {\n\t\tif !sameArchitecture {\n\t\t\treturn fmt.Errorf(\"qemu is required to emulate %s: %w\", l.limaConf.Arch, err)\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/vm/lima/lima.go#L351-L387","documentation":"Warning logged when store.Set fails to record DiskFormatted=true after startup while AdditionalDisks are configured in the Lima config. Because the disk was already formatted successfully during boot, failing to persist the flag is non-fatal; colima only logs it.","triggerScenarios":"l.limaConf.AdditionalDisks is non-empty and store.Set cannot write the profile store (permissions, disk full, corrupted store file, concurrent writers).","commonSituations":"Started with 'colima start --disk ...' or --additional-disks and the host filesystem is full; the store JSON under ~/.colima/<profile> is corrupted or root-owned; simultaneous colima commands on one profile.","solutions":["Verify the store file is writable: ls -la ~/.colima/<profile>/ and fix ownership if needed","Free disk space on the home volume","Avoid running concurrent colima commands against the same profile","If the store is corrupted, 'colima delete' and re-create the profile (the disk flag is re-set on next start)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Non-fatal by design: colima swallows the store.Set error into a warning. If you call store.Set in your own tooling, wrap it: if err := store.Set(func(s *store.Store){ s.DiskFormatted = true }); err != nil { log.Warn(err) } and keep going.","preventionTips":["Verify ~/.colima/<profile> is user-owned before starting with --additional-disks","The flag is re-attempted on every start, so a transient failure self-heals next run"],"tags":["persistence","store","disk","additional-disks"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}