This is probably one of the last blog articles this year as I’ve got two weeks of holiday! I wish you all a merry Christmas and a happy New Year! Let’s cut the crap, and start with why you are reading this… ESXi Lessons Learned:
I’ve been looking into creating an unattended install for ESXi. As mentioned in Lessons Learned part 2 this is not something that can be done out of the box unfortunately. I did a quick search on the internet and the VMware internal mailing lists but couldn’t find anything useful and that’s why I booted the ISO and logged into the console via “ALT-F1” -> Unsupported -> enter.
After some fiddling around in the ESXi iso I noticed a file called “/usr/lib/vmware/installer/ThinESXInstall.py”. I am not a python guru but I guess the following lines were pretty obvious:
Steps = [ WelcomeStep, LicenseStep, TargetSelectionStep, ConfirmStep, \ WriteStep, PostConfigStep, CompleteStep, RebootStep ]
This line describes the steps taken during the install. After I noticed these I did a quick search again on the filename and an article came up of my friend from down under, Stu aka Mr Vinternals. Stu describes which steps can be removed to decrease the amount of manual intervention:
Steps = [ TargetSelectionStep, WriteStep, PostConfigStep, RebootStep ]
Only the TargetSelectionStep requires input at the moment but that is also something that can be fixed. Look at the script “ThinESXInstallSteps.py”. There is a section that describes the disk selection, you can automate it by altering it and selecting a local disk with “IsLocal()”. That’s all I can say for now….
Henk says
Can’t wait to do an unattended ESXi deployment.
Would be nice if the hardware vendors (HP) made it possible to deploy ESXi from Altiris (RDP), but then again, you’d probably need a aclient agent for reinstalls…
Mark says
Have you considered the bootable USB ESXi implementation? You can pre-create those and then boot them under VMware Player to configure them. Not exactly automated, but you can create/configure in about 10 minutes. Do a few per day and soon you have a box full of ESXi thumb drives ready to turn any server into an ESXi host.
Duncan says
I know you can but I don’t consider that to be an enterprise ready solution. Lesser manual work means less chance of mistakes.
dconvery says
So, I edit /usr/lib/vmware/installer/ThinESXInstall.py and then “tar -czvf” the image boots, but I get a PSOD. The message is “cannot setup ramdisk boot image is corrupted”
Am I missing something? Its driving me CRAZY…
dconvery says
Never mind… I was doing tar -czvf install.tgz . instead of tar -czvf install.tgz *
DOH!
Dave O. says
Is there any update on this for ESXi 4.1? I see that the install.tgz file is now install.vgz and I’m not sure how to untar that file to get at the installer files.
Thanks!
Dave O. says
I think i answered my own question. 🙂
Looks like you just have to convert the vgz file to tar with vmtar and then untar and modify the ThinESXInstall.py file. Then tar it up, and use vmtar to convert from tar to vgz.
I havent found any help on vmtar, but it looks like it converts from vgz to tar and back. So, the steps go something like this:
Copy vgz file to 4.1 ESXi host.
Convert to tar with vmtar:
vmtar -i install.vgz -o install.tar
Modify installer files as Duncans specifies in the blog
Tar back up to install.tar
Copy install.tar to 4.1 ESXi host
Convert back to vgz:
vmtar -c install.tar -o install.vgz
If anyone can help demystify vmtar, I would love to hear it! 🙂
Hope this helps.