lima-vm/lima · error

failed to create Windows ISO entries: %w

Error message

failed to create Windows ISO entries: %w

What it means

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.

Source

Thrown at pkg/cidata/cidata.go:610

	if err := ValidateTemplateArgs(args); err != nil {
		return "", err
	}

	// The generated password is used only for an initial setup.
	// After that, the password is overwritten.
	if err := args.generateWindowsInitialPassword(); err != nil {
		return "", err
	}

	// Check OS version (Windows 11 or server 2025). This differentiates autounattend.xml.
	if err := args.checkWindowsVersion(instDir); err != nil {
		return "", err
	}

	layout, err := ExecuteTemplateWindowsISO(args)
	if err != nil {
		return "", fmt.Errorf("failed to create Windows ISO entries: %w", err)
	}

	layout, err = appendProvisionEntries(layout, instConfig.Provision)
	if err != nil {
		return "", err
	}

	layout = append(layout, iso9660util.Entry{
		Path:   "ssh_authorized_keys",
		Reader: strings.NewReader(strings.Join(args.SSHPubKeys, "\n")),
	})

	return args.IID, iso9660util.Write(filepath.Join(instDir, filenames.CIDataISO), "autounattend", layout, iso9660util.WithJoliet())
}

View on GitHub (pinned to dd909d0973)

Solutions

  1. Read the wrapped inner error for the concrete template failure
  2. Reinstall/rebuild Lima so embedded cidata templates are intact
  3. Check args fields used by Windows templates (password, version flags) are populated; check GitHub issues for known regressions
Defensive patterns

Strategy: try-catch

Try / catch

isoPath, err := cidata.GenerateWindowsISO(ctx, instDir, args, instConfig)
if err != nil && strings.Contains(err.Error(), "failed to create Windows ISO entries") {
    log.Printf("Windows template execution failed: %v", err)
    // reinstall/repair Lima so embedded templates are intact, then retry
}

Prevention

When it happens

Trigger: 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.

Common situations: Broken/partial Lima installation or build where embedded template assets are absent, version mismatch after an in-place upgrade, or upstream template regression.

Related errors


AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01). Data as JSON: /api/errors/fdc7559cf8dcaee7. Report an issue: GitHub.