Archive for July, 2009

Unattended ESXi Installation

July 27, 2009

Yes the title of this post is correct… ESXi unattended installation. Now that I’m staring down the barrel of ESXi installations as opposed to just PXE booting it (long story, let’s not go there… nothing to do with VMware, everything to do with finite engineering resources where I work), I thought I may as well automate it as much as possible. And while the steps I describe in this post don’t lead to a _completely_ unattended install, to be honest there’s not a helluva lot stopping you from creating a completely automated install if your target systems will only ever have a single non-SAN disk that will be your install target. In the interests of public safety, I haven’t gone that far for you. Besides, if you don’t know Python (not that I do, really) then here’s a good reason to take a little look at it and figure out how to do that for yourselves.

One of the more interesting design choices of ESXi 4.0 is that not only is a minimal Python environment available during installation, but it’s actually there in the final product too. This obviously opens up many possibilities for calling out from ESXi to external systems without the need for custom binaries. Yeh sure you could’ve done it with (b)Ash scripts in ESXi 3.x, but have you ever tried talking to web services via a (b)Ash script? Python definitely seems like it will be handy language to know in the VMware world, and they have some world class Python coders (like Christian Hammond) working for them.

Ghetto vCenter 4.0 Unattended Installer

July 8, 2009

This has been a while coming, and rather than wait longer to get some conditional logic into the script to allow you to use it on 32bit Windows i thought I’d just get it out now. So basically, what we have is a HTA file (with all functions written in JavaScript – none of that VBscript shite) that will prompt you for the requisite install parameters for an unattended vCenter 4.0 install, and then run the install including 32bit DSN creation on a 64bit box.

Now there are of course some caveats / prerequisites. This installer only works on 64bit Windows, and assumes you want to use Windows Authentication to the target SQL Server 2005 database which is ideally running on a remote host. Having said that however, by “only works on 64bit Windows” I simply mean that the hardcoded regsitry entries for the DSN will not write to the correct area of a 32bit OS. You could of course just change those values in the script in order to install on 32bit Windows. But since Microsoft is going 64bit only on the server, you might as well start doing the same now!

To see it in action, check out the video I have created. It goes through the prereqs in detail including some undocumented quirks that will catch you out if you just follow the VMware document that details the command line parameters. And yes, I do have an open support case with VMware to fix these little quirks that only appear to effect a commandline installation – if I run the GUI installer on the same box with the same configuration and same remote database, I don’t get either of the quirks detailed in the video.

So download this file, watch the video to get an idea of how it works and hax it up however you like (you could even put in some error handling that actually works if you feel so inclined). And shout outs to Will Lam, the ghetto scripting original gangsta! Wesssssiiiiiiiddde