I would like to create a windows image that can be cloned to multiple different computers, with different (known) hardware. And I would like Windows to resize the partitions after cloning. I read that you should "sysprep /generalize" from audit mode before cloning an image.
Now my question is, can I just install windows normally and interrupt the installation before the specialize step, in order to make a copy? Or do I have to let it proceed into OOBE, then enter audit mode, and then generalize manually? Whats the simplest scheme to achive this?
Things that are confusing me:
- Can I do everything from one answer file, or do I have to create separate autounattend.xml and unattend.xml like in this tutorial? How do I chain them then?
- There is
<Generalize ForceShutDownNow="true" Mode="OOBE" />
which seems to let me interrupt the installation, but it only goes in the5 auditSystem
block. So that means I will go twice through generalize? I want to useExtendOSPartition
, which only makes sense in4 specialize
(after cloning)... But if I go twice though generalize, then I need to run this only the second time (unattend.xml
)... but to achive this I'd have to go through audit mode and call sysprep manually.
If you instructs Windows Setup to switch to Audit Mode (OOBE pass in autounattend.xml), the system will automatically copy autounattend.xml to C:\Windows\Panther and rename it to unattend.xml which will be used as answer file for Sysprep, which eventually cause issues. Hence, we should have separate autounattend.xml and unattend.xml.
The procedure:
a. We enable Pass 7 OOBE> Reseal> Audit. Seeing this part, Windows will jump to Pass 5 "auditSystem" and Pass 6 "auditUser".
b. In auditUser pass, you can run your customization scripts and let the last script to run sysprep using your specified unattend.xml (which includes the ExtendOSPartition tag), i.e.:
sysprep.exe /generalize /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
A more detailed and advanced guide can be found at: https://rzander.azurewebsites.net/modern-os-deployment-mosd/