Product SiteDocumentation Site

4.2.3. Create a Windows Template

To make a Windows virtual machine template, use the virtual machine you created in Section 4.1.2, “Create a Windows Virtual Machine” as a basis.
Before a template for Windows virtual machines can be created, it has to be sealed with sysprep. This ensures that machine-specific settings are not propagated through the template.
Note that the procedure below is applicable for creating Windows 7 and Windows 2008 R2 templates. If you wish to seal a Windows XP template, refer to the Red Hat Enterprise Virtualization Administration Guide.
To seal a Windows virtual machine with sysprep
  1. In the Windows virtual machine to be used as a template, open a command line terminal and type regedit.
  2. The Registry Editor window displays. On the left pane, expand HKEY_LOCAL_MACHINESYSTEMSETUP.
  3. On the main window, right click to add a new string value using NewString Value. Right click on the file and select Modify. When the Edit String dialog box displays, enter the following information in the provided text boxes:
    • Value name: UnattendFile
    • Value data: a:\sysprep.inf
  4. Launch sysprep from C:\Windows\System32\sysprep\sysprep.exe
    • Under System Cleanup Action, select Enter System Out-of-Box-Experience (OOBE).
    • Tick the Generalize checkbox if you need to change the computer's system identification number (SID).
    • Under Shutdown Options, select Shutdown.
    Click OK. The virtual machine will now go through the sealing process and shut down automatically.
To create a template from an existing Windows machine
  1. In the administration portal, click the Virtual Machines tab. Select the sealed Windows 7 virtual machine. Ensure that it has a status of Down and click Make Template.
  2. The New Virtual Machine Template displays. Enter information into the following fields:
    • Name: Name of the new template
    • Description: Description of the new template
    • Host Cluster: The Host Cluster for the virtual machines using this template.
    • Make Public: Check this box to allow all users to access this template.
  3. Click OK. In the Templates tab, the template displays the "Image Locked" status icon while it is being created. During this time, the action buttons for the template remain disabled. Once created, the action buttons are enabled and the template is ready for use.
You can now create new Windows machines using this template.