Vmware:deploy multiple VM ' s from template with Powercli

Source: Internet
Author: User
Tags administrator password

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_TemplateNew-vm -vmhost esx04.vmpros.local -Name FS-SVR02 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_TemplateNew-vm -vmhost esx04.vmpros.local -Name FS-SVR03 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_TemplateNew-vm -vmhost esx04.vmpros.local -Name FS-SVR04 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_TemplateNew-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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.