Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Sysprep

Direct answer

Sysprep generalizes a Windows installation (sysprep /generalize /oobe /shutdown) so a template can be cloned with new SIDs and computer names. An unattend.xml answer file automates the first-boot setup.

When to use this

Use this when generalizing Windows for cloning.

First 30 seconds

1. Sysprep generalises Windows: new SID, hardware detection, OOBE.

2. Required before templating Windows.

3. Remove per-user Appx packages that block it.

4. Use unattend.xml for automation.

5. Limited rearms.

Operational verification

installed Windows → sysprep generalize → shut down → template

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
virtualization-image
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization-image
Scope / prerequisiteUse this when generalizing Windows for cloning.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
  • C:\Windows\System32\Sysprep\Panther\setupact.log without errors.
  • VM shuts down after Sysprep.
  • New SID after deployment (whoami /user).
Step 2 Common mistakes Narrow the fault
  • Running Sysprep more than the rearm limit allows.
  • Store apps (Appx) installed per user, causing Sysprep to fail — check C:\Windows\System32\Sysprep\Panther\setupact.log.
  • Joining the template to the domain before Sysprep.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Windows limits how many times an image can be rearmed.
Key checks
  • C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown — generalize Windows
  • Get-Content C:\Windows\System32\Sysprep\Panther\setupact.log — sysprep log
  • Get-AppxPackage -AllUsers | ? PackageUserInformation -match Installed — provisioned apps blocking sysprep
ReferenceImportant terms & boundaries2 sections · depth on demand

Reference

C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:C:\unattend.xml

Documented example, not captured output. Remove the VM from the domain first and uninstall per-user Appx packages that block Sysprep.

In depth

Sysprep generalises a Windows installation before it becomes a template: it removes the machine SID, computer name, driver state and activation data so each clone gets a unique identity at first boot.

C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /mode:vm [/unattend:C:\unattend.xml]

/mode:vm skips hardware re-detection when deploying to the same hypervisor. Common failures: Appx packages installed per user (remove them), more than 8 rearm attempts, and BitLocker enabled on the template. Never clone a domain-joined, non-generalised Windows VM — duplicate SIDs and computer accounts break domain trust.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization-image current

Authoritative/upstream documentation reviewed for bounded claims in VM Templates → Sysprep. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://libvirt.org/docs.html · confidence 94%
Confirmation

Confirm action

Continue?