Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cretate_windowstemplate_new [2018/06/08 13:45] sathish |
cretate_windowstemplate_new [2018/06/09 14:33] (current) sathish |
||
---|---|---|---|
Line 36: | Line 36: | ||
</style> | </style> | ||
</head> | </head> | ||
- | <h2><bold>Windows Server 2008 R2</bold></h2> | + | <h2><bold>Windows Server</bold></h2> |
</html> | </html> | ||
+ | ''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) | * 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) | ||
Line 45: | Line 46: | ||
* Copy the below files from xenica package to the new VM in C:\scripts | * Copy the below files from xenica package to the new VM in C:\scripts | ||
- postinstall.ps1 | - postinstall.ps1 | ||
- | - readme.txt | ||
- | - scriptfile.vbs | ||
- | - scriptfile2.vbs | ||
- Startup.cmd | - Startup.cmd | ||
- unattend.xml | - unattend.xml | ||
- xenica_auostart.ps1 | - xenica_auostart.ps1 | ||
- | - XenicaStartUp.xml | ||
- diskpar.txt | - diskpar.txt | ||
- | - extend.cmd | ||
{{:user:scripts.png?direct|}} | {{:user:scripts.png?direct|}} | ||
| | ||
Line 60: | Line 56: | ||
---- | ---- | ||
- | * We need to make StatrtUp.cmd run automatically on system startup (even before login to windows), | + | * We need to make Startup.cmd run automatically on system startup (even before login to windows), |
* for that we can use Local group policy editor , from run box type the below | * for that we can use Local group policy editor , from run box type the below | ||
| | ||
Line 75: | Line 71: | ||
* "OK" out of all windows to apply the new settings. | * "OK" out of all windows to apply the new settings. | ||
{{:user:gpedit.png?direct|}} | {{:user:gpedit.png?direct|}} | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | * By default windows uses 30.00GB for C drive, In order to expand the c drive with the Un-allocated space, Please follow the below steps | ||
- | * for that we can use task scheduler , from the command line run this command | ||
- | |||
- | <code>%windir%\system32\taskschd.msc /s</code> | ||
- | {{:user:task_scheduler.png?direct|}} | ||
- | * In Task scheduler Library click on create task | ||
- | * New window will appear, in general tab Enter the Name "Expand" | ||
- | * Click on change user or group | ||
- | * click advanced -> click find | ||
- | * choose user Administrator | ||
- | * click ok -> ok -> ok | ||
- | * you will be asked about the administrator password please make sure to write it correctly (it must be WinVPS@servaRICA) | ||
- | {{:user:task_scheduler1.png?direct|}} | ||
- | |||
- | ---- | ||
- | |||
- | * Go to Triggers tab Select New, In the Begin Task dropdown menu Select -->At log on and Select Any User, then Press OK | ||
- | {{:user:trigger.png?direct|}} | ||
- | |||
- | ---- | ||
- | |||
- | * Go to Actions tab Select New, Select Action as Start a program, In the Program script select the file C:\scripts\extend.cmd and press OK --> OK | ||
- | {{:user:actions.png?direct|}} | ||
Line 122: | Line 91: | ||
* Convert the VM to template and the name of the template must include the word windows all lower case. | * Convert the VM to template and the name of the template must include the word windows all lower case. | ||
- | This procedure was tested with Windows server 2008 R2 | ||
<html> | <html> |