VMware Cloud Community
samayer12
Contributor
Contributor

Automated VM-provisioning without access to vCenter

I am trying to create a Power-CLI script to allocate a variable number of hosts to different subnets on an ESXi host (for example: 5 XP boxes on network A, 5 Ubuntu boxes on network B, a few Win2k12 Servers on network C). The problem is that template creation and other functions can't be carried out from an ESXi host but instead only from a vCenter Server.

Here are the approaches I've considered so far:

  1. The following script which assumes access to a vCenter Server and was the basis of my efforts so far: PowerCLI Script - Deploy VMs and Configure the Guest OS
  2. Copy VMs instead of cloning which involves more manual work (Deploy template w/o vCenter...) but I want to arrive at an automated solution.
  3. Create new VMs based off current VMs (Clone VM Script), I think I'd need to script in a call to sysprep on the box before I make copies using the New-VM command

Does anyone have a solution to script out the provisioning process to include guest OS configuration? Let me know if I can provide more detail about my situation for you.

Reply
0 Kudos
2 Replies
jpsider
Expert
Expert

‌why no vcenter?

honestly it might be worth using some of the homelab scripts to deploy a temporary vcenter, deploy your vm's, then destry the vcenter of it's a license issue.

Reply
0 Kudos
samayer12
Contributor
Contributor

I'm doing this on my university's research network so I'm not sure if they'll let me hop on vCenter and run a script that could impact other projects without some lengthy approval process. That said, I'm trying to get access but some other method that doesn't require me to do that could be quicker.

Reply
0 Kudos