Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Preparing a Windows Template with Sysprep

The correct right way to create a Windows guest Guest to serve as a template is to enter audit mode during the installation of Windows . Thus any no local user will be created, other than the administrator. In audit mode, you can configure the template installing any programs you want. Once finished, you must run sysprep . This tool will shut down the guest at the end, so we must keep it in RunOnce mode.

Attention

 

  Sysprep can only run a limited number of times on the same system.
Info

There is no limit to the number of times sysprep can be run on a system. But after executing it, Windows will need to be activated again, which can be done up to three times on a given Windows installation, or Windows will stop letting users to log in the system after 30 days.

To avoid this problem,

once you finished

after configuring the template, create a copy

on which to

where you will execute sysprep. Thus, if you need to make changes to the template,

they

you can

be made

make them in the original (which has not gone through the generalization/activation cycle) and repeat the procedure as often as necessary.

 

When you run sysprep us the following window:

Figure 8 The System Preparation ToolImage Added

Image Removed  For the task at hand, we must will select "Start Enter System Out-of-Box Experience (OOBE) system", "generalize" and "OffShutdown". Pressing "OK", the process of generalization is made, then the guest will turn off. From here we can turn it into a template.


Info
titleNew from Windows 8 / Windows Server 2012
 

From Windows 8 / Windows Server 2012, the sysprep command supports a new option mode, only from the command line. By passing the parameter "

choice

/mode:vm" hardware information will not be removed, so that subsequent

start - ups

boot are noticeably faster

is not deleted

. However, all clones must run on

a machine

machines with the same hardware profile. The complete command line would be:
> sysprep.exe /generalize /oobe /shutdown /mode:vm

Answer File

When we have prepared a template with sysprep, an answer file is used to automate the initial configuration at the next boot. That file is searched in a series of predefined paths. In particular, one of which is " A:\unattend.xml " ( APB No. 4 ). For that reason, desktop policies have a field to set up a file /flexvdi/local as answer file. If this file exists, the host agent insert it into the floppy disk each volatile clone named "unattend.xml", so that can be used to automatically configure the clones. In addition, you can use the following three variables within the file, which will replace the host agent before inserting it into the floppy disk, with specific values for each volatile:

...