Generalize Master Image
We are going to prepare a very basic answer file just for “generalize” pass which is initiated in the time of Sysprep execution. Later, we will create another answer file with settings for “specialize” and “oobeSystem” phases that will be used by Windows Setup on the first run of new customer VPS.
For “generalize” phase we are disabling auto-starting “Server Manager” application and disabling “Initial Configuration Tasks” dialog:
Save answer file as “unattend-generalize.xml” in “c:\WSIM\Windows Server 2008 x64” folder (where install.wim is located).
You can download this file here [link TBD].
In downloaded answer files change all “processorArchitecture” attributes to “amd64” if the file is used with 64-bit editions of Windows and to “x86” if it is used with 32-bit editions.
Also, in “cpi:source” attribute change <EDITION> in “Windows Longhorn SERVER<EDITION>” value to the correct Windows edition value.
Connect to “master” VPS using Remote Desktop or Hyper-V Virtual Machine Connection and copy “unattend-generalize.xml” file to “%windir%\system32\sysprep” folder of guest OS as “unattend.xml”:
Before running sysprep please switch all network adapters of master VM to “Obtain an IP address automatically”.
Open command line interface:
Start -> Run... -> cmd + Enter
Switch to c:\Windows\System32\sysprep directory:
cd c:\Windows\System32\sysprep
Run sysprep with the following parameters:
sysprep /generalize /oobe /shutdown /unattend:unattend.xml
When “master” virtual machine is shut down VPS template is almost ready.
Do not start “master” virtual machine yet!