This posting will provide overview in successfully deploying VM host from a template in leverage MS System Preparation Tool 3.1.4.
There are 2 sections, 1st cover to how create a clone of VM host OS image via System Preparation Tool 3.1.4. The 2nd section will show how to take newly create System Prep VM Host OS image and convert to it a VMware Vcenter template and deploy it in the Mware Vcenter environment.
Prerequisites requirements: Windows 7, 8, Windows Server 2008, 2012 and 2016 OS already installed OS image, MS System Preparation Tool(Sysprep) 3.14, and VMware Vcenter Server
What is System Preparation Tool (Sysprep)?
System Preparation Tools is MS tool to allow System Administrators to clone in a automate method deployment of all Windows Operating Systems. (Windows Workstation OS 7, 8, 10 and Windows Server 2008 R2,, 2012 R2 and Window 2016 OS.
Windows 2012 Server
Windows 2016 Server.
Great VMware Tutorial- Cloning and Templates in vSphere-
Will not cover Windows 2003 or Windows XP due to both products are EOL.
Here is an example image what system prep tool 3.1.4 looks like. Once you have performed the initial setup steps on a single computer, you can run the Sysprep tool to prepare the sample computer for cloning and automate the deployment on other computers. It can be found in the \Windows\System32\sysprep folder.
System Preparation Tool – Sysprep
You can use Sysprep along with other deployment tools to install Windows Operating systems onto new infrastructure (bare metal hardware or Virtualize hardware). It prepares a computer for disk imaging or delivery to a customer by configuring the computer to create a new computer security identifier (SID) when the computer is restarted. In addition, the Sysprep tool cleans up user-specific and computer-specific settings and data that must not be copied to a destination computer.
Once the system is prepared with the applications the configurations we want, we navigate to C:\Windows\System32\sysprep and then open the sysprep tool.
Select ‘Enter System Out of Box Experience’ select the ‘Generalize’ option and then select ‘Reboot’.
This process will generalize the Windows installation and allow you to capture a system image of this computer so that it can be installed on other computers.
When sysprep is finished, shutdown the computer.
Now the system image is ready to be captured. We can perform this task from another system partition or from within Windows preinstallation environment.
The 2nd section will illustrate how to convert newly created VM with syspreps to incorporate to How To Deploy Virtual Machine From A Template in Vsphere.
Here is example of Sysprep Out Of Box Configuration – Window 2012 R2-
1. Prompt to Input System Time and Region.
2, Click Accept EUL.
3. Input Administrator Password.
4. Click- Insert – Control -Alt -Delete.
5. Log into newly deploy Windows 2012R2 from Template. using password set in the step 3.
Great VMware Tutorial- Cloning and Templates in vSphere-
How to Create VMware Templates
VMware vCenter Server allows you to create templates from existing virtual machines. You can use templates to reduce the amount of time spent building and implementing new servers, cutting down the provisioning process to just a few hours.
vCenter Server uses one of two methods to build templates. The first method, Clone to Template, duplicates a virtual machine and changes it to the template format. Unlike Convert to Template, which I’ll cover in just a moment, Clone to Template leaves the original virtual machine intact.uring the cloning process, you’ll have the option to change the format of the virtual disk(s). You can either configure the disk to fill all of the space in the datastore (thus enabling the template to maintain the same level of performance as the source VM), or use the thin provisioned format to compress the disk space so that the template uses only as much of the datastore as it needs.
Of course, when vCenter clones the source virtual machine, it doesn’t just duplicate the virtual disks, but also creates a copy of the .vmx file. The .vmx file holds the data used to configure the VM. Thus, before you run Clone to Template, you should remove any unwanted settings from the .vmx file associated with the source VM.
Convert to Template, the other method used to create templates in vCenter, is much faster than Clone to Template, because it doesn’t create a duplicate of the source VM; instead, it just changes the VM to the template format. Convert to Template is more flexible than Clone to Template because you can change the template back to a virtual machine at any time. For example, software installed to templates created through Clone to Template can’t be updated. With Convert to Template, however, you can temporarily change the template to a virtual machine and install updates to the software, then change the VM back to template when done.
Preparing for Template Creation
Before creating a template in vCenter, you’ll need to install Sysprep to VMware if you intend to clone or convert Windows-based virtual machines. Each release of Windows (including service packs) requires its own version of Sysprep; you can find the appropriate files on the operating system CD/DVD or on the Microsoft Download Center website. Find and double-click deploy.cab, and then extract the contents of the compressed file to the following location: %allusersprofile%\vmware\vmware virtualcenter\sysprep
If you’re running Windows Server 2003 or below, extract the contents to: %allusersprofile%\application data\vmware\vmware virtualcenter\sysprep
There are also a few things to keep in mind before you create your source virtual machine (the virtual machine on which the template will be based). Components like Active Directory and Microsoft SQL Server should be excluded from the template, as these can interfere with the template creation process or cause problems after the fact. Also, if you’re running VMware Infrastructure 3.5 or later, you can perform a hot clone of a virtual machine using the Clone to Template method. Hot cloning enables you to keep the source VM active during the cloning and conversion process.
Once you’ve installed Sysprep and created the source virtual machine, you can begin building templates.
Creating a Template with Clone to Template
- Right-click the source virtual machine. Point to “Template,” then select “Clone to Template” from the context menu.
- Create a name for the template and then choose an Inventory location from the folder list. Click “Next.”
- Select the ESX host or cluster where the template should be stored. Click “Next.”
- Select a datastore with enough available space to accommodate the template. Click “Next.”
- Click “Same as Source” to use the same disk format as the source VM; click “Thin Provisioned” to save space on the datastore; click “Thick” to reserve all of the datastore space for the virtual hard disk. If you select “Thin Provisioned,” make sure to allocate the virtual disk to a VMFS3+ datastore. Click “Next.”
- Review your selections on the Ready to Complete screen. Click “Finish” to create the new template in VMware vCenter Server.
Create a Template with Convert to Template
- Power off the source VM. Right-click the virtual machine, and then point to “Template.”
- Click “Convert to Template.” Select “Home.” Go to VMs and Templates view to locate the new template.
- Right-click the template and then click “Convert to Virtual Machine” to return the template to its original state whenever necessary.
You can also create new templates from existing templates. Right-click the source template and then click “Clone” to begin the duplication process. The steps in the wizard are identical to those in Clone to Template.
Create a Virtual Machine from a Template
After you finish creating a template, you can run the Deploy Template Wizard to create a new virtual machine.
- Switch to VM and Templates view. Right-click the template and select “Deploy Virtual Machine from This Template” from the context menu.
- Name the virtual machine and select a folder location. Click “Next.”
- Select the ESX host and/or cluster on which the VM will run. Click “Next.”
- Choose which resource pool the new virtual machine will use. Click “Next.”
- Select which datastore or datastores will accommodate the virtual machine. Click “Next.”
- Choose the appropriate disk format and then click “Next.”
- Click “Do Not Customize,” “Customize Using the Customization Wizard,” or “Customize Using an Existing Customization Specification,” depending on your preferences. You won’t see this screen if you didn’t load Sysprep into vCenter. If you selected the second or third option, follow the on-screen instructions to configure the template.
(Note: If the OS installed to the source virtual machine requires an OEM product code, select option two and then enter the information into the appropriate field when prompted.)
- Click “Edit Virtual Hardware” to make changes to the VM configuration, if necessary. Click “Finish” to deploy the new virtual machine.
9. Power on VM to check if Sysprep is working.
System Preparation Tool 3.1.4
Deploy a Virtual Machine from a Template in the vSphere Client
MS Download – Operating Systems