About Me

- A little contribution to the linux newbies.

Monday, August 2, 2010

VMware ESXi 4.0 Headless (Unattended)Install

In order to achieve this you need to do some hacks and tricks with the vmware installer scripts

1. Modify the Installer-Steps

In order to achieve this you will need to modify the install.tgz file
--------------------------------------------------------------------------------------------------

- Extract ISO
- cd to the extracted directory

- mkdir tt
- cp install.tgz tt/
- cd tt/
- tar xvvf install.tgz

- $ ls
install.tgz sbin usr

- cd usr/lib/vmware/installer/
- chmod +w ThinESXInstall.py
- vi ThinESXInstall.py


modify following line (approx line 22 )

Steps = [ WelcomeStep, LicenseStep, TargetSelectionStep, ConfirmStep, \
WriteStep, PostConfigStep, CompleteStep, RebootStep ]
to

Steps = [ TargetSelectionStep, WriteStep, RebootStep ]

--------------------------------------------------------------------------------------------------

2. Automated the Disks Selection Step in the installer script

now go to ThinESX dircetory

- cd ThinESX/
- chmod +w ThinESXInstallSteps.py
- vi ThinESXInstallSteps.py


--- modify the target selection step (approx line 56)

copy paste the following lines in the Scripts :

--------------------------------------------------------------------------------------------------

def TargetSelectionStep(data):
"""TargetSelectionStep
This install step is responsible for presenting the user with the device
selection dialog and determining the target which is being installed to."""
targets = TargetEnumeration(NotPredicate(RACVirtualMediaFilter))

if len(targets) == 0:
raise NoValidDevicesException()

if len(targets) == 1 and targets[0].IsLocal():
data['Target'] = targets[0]
return data
else:
return LaunchDialog(DeviceSelectionDialog(targets, data))

--------------------------------------------------------------------------------------------------
- Save and Exit
- cd back to tt/ directory
- rm -rf install.tgz && tar -czvf install.tgz * && chmod 755 install.tgz

--------------------------------------------------------------------------------------------------
replace the existing install.tgz file to the modified one..

Your unattended installer is ready to go..