Solved

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

Posted on 2014-02-25
4
1,561 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 120

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 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 120
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

696 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