Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Script to deploy multiple VMs from a template vsphere/vcenter 5.5

Posted on 2014-02-25
4
Medium Priority
?
1,737 Views
Last Modified: 2014-03-10
hello,

I was hoping to get assisting in creating a powerCLI script (also open to other methods) to  deploy multiple VMs from a template hosted on vCenter 5.5

need the script to perhaps do the following:

- run sysprep
- assign vmhost-name
- assign vmhost-ip
- join vmhost to domain (and the correct OU)

thank you very much
0
Comment
Question by:mshalabi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 123

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 39886882
Is Deployment from Template using existing Customizations Specifcations not automated enough, using vCenter Server ?

1. Define your Customization Specifications e.g. Deploy1

Customization specification, will contain, the  

   vmhost-name
   vmhost-ip
  join vmhost to domain (and the correct OU)

and Custom Spec will do the Generate new Sid, and Sysprep.

You need to ensure, you create your golden master template


and then, execute the following PowerCLI, with Deploy1 as the spec.

$spec = Get-OSCustomizationSpec –Name <spec name>
Get-Template <template name> | New-VM –Name <target-vm-name> -VMHost <name of vmhost> -Datastore <name of datastore> -OSCustomizationSpec $spec

Open in new window

0
 

Author Comment

by:mshalabi
ID: 39886941
Andrew,

Thank you for your respond.  This makes sense, but how would I go about deploying more than one VM from that master template with different IPs and hostnames ?
0
 
LVL 123
ID: 39886988
Multiple Customization Specifications!

Spec1
Spec2
Spec3...

or use DHCP and Set IP Addresses via Mac Address.

Call script with Spec1
Call script with Spec2
0
 

Author Closing Comment

by:mshalabi
ID: 39918324
thank you
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question