VMware Cloud Community
yeahman4
Contributor
Contributor

Custom Auto deployment of ESXi on loacal storage - that includes automation of VM template that kicks off scripted win2k8 build.


I have a task at hand to achieve the following (in brief):
- Automated deployment of mutliple ESXi 5 standalone servers that automatically load templates that kick off win2k8 scripted installations.

In more detail:
- Deployment of multiple esxi v5 U1 standalone servers (not initially licensed as they'll be standalone, so no clustering drs etc - then later they'll be licensed and plug into vcentre server for management). alot of these servers won't have good network links - so central deployment and pxe is out of the question  - so Iso / usb seems to be a good option.
- We'll be deploying the hypervisor to an internal SD card, and using only local storage split across 2 arrays.
- They'll need to have static IP addresses, and various other configuation data input somehow (thus the ks.cfg living on usb drive)
- It'll then need to automatically setup a VM container (template or ovf) that'll then kick off a scripted win2k8 deployment.


I did a similar solution building hyperV server and standardising all the settings and creating the vm container that kicks off an OS scripted build - now this was an easy job as HyperV lives on a windows server thus powershell could be used for the whole process........ this is not the case with vmware..... unfortunetly.

So this is the direction I'm going, however I'd be greatful for anyones advice on a better solution, of course we're assuming I don't have vcentre server and PXE.


This is what I've done so far:

- I've created a custom VIB of esxi5 with HP drivers/utilities - this is launched using a mapped iso image that calls the kickstart ( ks=usb) automatically
- kickstart script on the USB will need to have static IP addresses input and various other configuration detail written to it somehow - I'm thinking of booting up a winpe and using vbscript (as I'm familiar with this) to gather input information or connecte to a centralised db (when possible) and writting this input information to the kickstart file on the usb drive, then booting off that..............is this the best option...... is there a way to pre-load the sd card with the hypervisor that then questions for input like static IP address hostname etc.

Problems I've encounted and would like help with possible solutions:
- ESXi doesn't self register with windows DNS server - this affects the adding the servers to the domain - are there some simple scripts to launch within the kickstart process.....

- Scripting local datastor creation from within kickstart process - this is painful, as it appears from reading up that I'll need to gather the naa or vml ID's for the multiple arrays, and then using partedUtil to partition and format as vmfs. Surely this has been written already by someone, I don't mind writting myself - but I have loads of questions, it appears I'll need to use busybox & roughly get to know Perl in order to load this into the kickstart script..... I know that Kickstart natively allows you to create datastors on the remainder of the space where the hypervisor is installed - however this isn't possible on an SD card (as the media can't be formatted to vmfs). but there is a --partition option to the kickstartscript that appears to allow you to setup a datastore, but can anyone comment on whether this is still possible when the arrays haven't been partitioned already?

- Creation of VM template - how do I script this so that it's automatically done after the esx is deployed? It appears i could use ovftools to deploy the template to ESXi host, but is this possible for self deployment - I mean can you embed this tool into the management part of hypervisor - is there a VIB for it?

then I've read a little about the UDA (ultimate deployment tool ) - can this do any of these things I'm needing to do ?


Please any advise would be great.

I'm starting to get the feeling I need to learn PERL or that snake language - can't think of it's name now, oh yes python

0 Kudos
0 Replies