Bulk Windows / Linux VM Deployments via PowerCLI and CSV file
8th May 2016So I had to look recently at a mechanism that could mass deploy over 100 VM’s at a time, these had to be a mix of Windows and Linux, had to have the potential to include not only IP addressing but also creating a computer object in AD prior to VM creation and domain joining as well as templates, vCenter folders, Clusters and storage.
Having had a look around and there are a couple of decent scripts out there that could do that quite well so I had a closer look at a modified script by Juan Vidañez
I have forked his script on GitHub to allow it to function as I needed (pre-creation of Computer AD accounts in specified OU’s to ensure that when joined to AD the accounts were located in the correct location on first boot and wouldn’t have to be manually moved later on).
A quick trial deployment in my home lab was very successful with 24 CentOS7 VMs deployed (1.6GB thin provisioned storage), configured with DHCP addresses, individual names and pre-created AD Computer accounts, these were deployed and running in just under 6 minutes.
Hey, I like the modification!! 🙂
It does what’s needed in this case 🙂
I would like to add your modification to my main branch, do you main to create a merging request? Also I have another issue, usually the user that we have more than 1 Domains, and the one we use for Vcenter credentials is not the same domain as for VMs. I’m think how to sort that in order to create the machine account on the appropriate domain and add the dns entry too.
I would love to say yes to merging but I am not a coder, I joined Github specifically because you had released it in the same place so I don’t know how to do a merging request.
I can have a look at the issues you are looking at but I am spending time over the next couple of weeks studying for my VCAP exam early next month.
Hey, Finally I amend it and created the version 1.6 from your version improving if you have severals domain where to deploy vms instead of just one. The Windows VM must have a local admin password set in other for the customspec to join it to the domain. Ask you for the credentials of each domain just once, it doesnt matter if you are creating 100 or just one 🙂 enjoy it