Last week I is working on a new project, they asked me to install 5 new fileservers based on Windows 2008R2, I installed A new VM and converted it to a template, next I configured a template in "Customization specifications Manager" with the F Ollowing Details:
Customization Template:
Registration Information:name Company
Computer Name:use the virtual machine name (important)
Product key:didn ' t need it because I ' ve configured KMS
Password:company Default local Administrator Password, selected:automatically login as the Administrator:2
TIMEZONE:GMT+0100 (Amsterdam)
Runonce:none
Network:typical settings
Workgroup or domain:selected to auto join the domain with domain administrator credentials + domain name (important)
Operation System Options:Selected:Generate New Security ID (SID)
VM template Settings:
Hard disk:40 GB with configured OS
VMware Tools:latest, this must is installed for specification Template and NIC
Network:vmxnet3 (needed VMware Tools for driver)
Script: (Saved As:FileserverDeploy.ps1)
-vmhost = Target host;
-name = Name of the new VM;
-template:from wich Template you want to deploy the new VM;
-datastore:target Datastore to place the new VM;
-oscustomizationspec = wich "prep" template you want to deploy the new VM;
?
12345 |
New
-vm -vmhost esx04.vmpros.local
-Name FS-SVR01
-Template WIN2008R2_Template
-Datastore datastore2
-OSCustomizationspec WIN2008R2_Template
New
-vm -vmhost esx04.vmpros.local
-Name FS-SVR02
-Template WIN2008R2_Template
-Datastore datastore2
-OSCustomizationspec WIN2008R2_Template
New
-vm -vmhost esx04.vmpros.local
-Name FS-SVR03
-Template WIN2008R2_Template
-Datastore datastore2
-OSCustomizationspec WIN2008R2_Template
New
-vm -vmhost esx04.vmpros.local
-Name FS-SVR04
-Template WIN2008R2_Template
-Datastore datastore2
-OSCustomizationspec WIN2008R2_Template
New
-vm -vmhost esx04.vmpros.local
-Name FS-SVR05
-Template WIN2008R2_Template
-Datastore datastore2
-OSCustomizationspec WIN2008R2_Template
|
powercli:
Running the script:
Final result:
The 5 fileservers deployed from template and joined the domain. great!
Vmware:deploy multiple VM ' s from template with Powercli