{"record":{"id":"fdc7559cf8dcaee7","repo":"lima-vm/lima","slug":"failed-to-create-windows-iso-entries-w","errorCode":null,"errorMessage":"failed to create Windows ISO entries: %w","messagePattern":"failed to create Windows ISO entries: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cidata/cidata.go","lineNumber":610,"sourceCode":"\n\tif err := ValidateTemplateArgs(args); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// The generated password is used only for an initial setup.\n\t// After that, the password is overwritten.\n\tif err := args.generateWindowsInitialPassword(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// Check OS version (Windows 11 or server 2025). This differentiates autounattend.xml.\n\tif err := args.checkWindowsVersion(instDir); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tlayout, err := ExecuteTemplateWindowsISO(args)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create Windows ISO entries: %w\", err)\n\t}\n\n\tlayout, err = appendProvisionEntries(layout, instConfig.Provision)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tlayout = append(layout, iso9660util.Entry{\n\t\tPath:   \"ssh_authorized_keys\",\n\t\tReader: strings.NewReader(strings.Join(args.SSHPubKeys, \"\\n\")),\n\t})\n\n\treturn args.IID, iso9660util.Write(filepath.Join(instDir, filenames.CIDataISO), \"autounattend\", layout, iso9660util.WithJoliet())\n}\n","sourceCodeStart":592,"sourceCodeEnd":625,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/cidata/cidata.go#L592-L625","documentation":"GenerateWindowsISO (pkg/cidata/cidata.go:610) renders the Windows-specific cidata templates via ExecuteTemplateWindowsISO. If template execution fails (missing template asset, template data error), the error is wrapped as \"failed to create Windows ISO entries\" and ISO creation aborts.","triggerScenarios":"Running `limactl start` on a Windows guest instance when the embedded Windows ISO templates fail to execute - e.g. template files missing/corrupted in the build, or template data (TemplateArgs) inconsistent with what the templates expect.","commonSituations":"Broken/partial Lima installation or build where embedded template assets are absent, version mismatch after an in-place upgrade, or upstream template regression.","solutions":["Read the wrapped inner error for the concrete template failure","Reinstall/rebuild Lima so embedded cidata templates are intact","Check args fields used by Windows templates (password, version flags) are populated; check GitHub issues for known regressions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"isoPath, err := cidata.GenerateWindowsISO(ctx, instDir, args, instConfig)\nif err != nil && strings.Contains(err.Error(), \"failed to create Windows ISO entries\") {\n    log.Printf(\"Windows template execution failed: %v\", err)\n    // reinstall/repair Lima so embedded templates are intact, then retry\n}","preventionTips":["Install Lima from official releases so embedded template assets are complete","Avoid in-place binary swaps between versions; templates and code must match","Keep TemplateArgs fields used by Windows templates (password, IsWindowsServer) populated before calling"],"tags":["windows","template","iso-generation"],"backgroundTag":"template-execution-failed","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}