Create Windows Templates
Please try to follow this process exactly as it is to have your windows machine provisioned correctly
Windows Server
This procedure was tested with Windows server 2008 R2, the same procedure also work in 2012 and 2016 as well.
Create your windows VM and add any software you wish to have installed by default on it (the administrator password of the vm should be WinVPS@servaRICA)
Write your windows product key in your windows vm and activate it
Create a folder C:\scripts in the new vm
Copy the below files from xenica package to the new VM in C:\scripts
postinstall.ps1
Startup.cmd
unattend.xml
xenica_auostart.ps1
diskpar.txt
gpedit.msc
Expand Windows Settings
Select Scripts (Startup/Shutdown)
Double click Startup
Click Show Files and copy/paste a shortcut of Startup.cmd file in to this folder
Click the Add button on the startup properties , then Click Browse and double click on the script to choose it.
“OK” out of all windows to apply the new settings.
In the downloaded package you will find this file xenica\shell_scripts\windows\unattend.xml.
If you are planning to have non-English windows template : open the unattend.xml file and change the following lines to match your language
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-US</UserLocale>
Copy the unattend.xml file into the c:\windows\system32\sysprep directory
In the command line run the following command
cd c:\Windows\System32\sysprep
sysprep /oobe /generalize /shutdown /unattend:unattend.xml
Windows server 2003 R2
The same procedure works the same way for windows server 2003 although it need new unattended file id sysprep is required (sysprep is not a must unless your users will run Active directory on their vms)
use this tutorial to create sysprep unattended file for win2003
win 2003 r2 sysprep