Pcornel
Virtualization · VM Templates

Sysprep

Cheat sheet · https://pcornel.dk/topic.php?topic=3562

Back to the Topic

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.

Remember

  • Windows limits how many times an image can be rearmed.

First 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

Verify in this order

installed Windows → sysprep generalize → shut down → template

Where it usually breaks

First mismatch in guest/app quiescence → hypervisor snapshot/template task → metadata/backing chain → storage durability → restore/clone read-back; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3562

Confirmation

Confirm action

Continue?