Automated installation or scripted installation for VMware ESXi makes the installation process much faster, just create a script with your desired installation options, like specifying the root password, add that script file to the ESXi installation image, and you are done
The following steps will illustrate the how to:
- ESXi ISO image, any edition you like.
- ISO image editor, like PowerISO.
- Word processor (Notepad++ or WordPad).
- the script code.
Files to be edited:
- script file with any desired name, I use “KS_CSTM.CFG”.
- BOOT.CFG from the ESXi image.
- Create the Script file:
create a new text document and add the following code:
# Sample scripted installation file
# Accept the VMware End User License Agreement
# Set the root password for the DCUI and Tech Support Mode
# Install on the first local disk available on machine
# Choose to overwrite or preserve the VMFS datastore
install –firstdisk –preservevmfs
# Set the network to DHCP on the first network adapter
network –bootproto=dhcp –device=vmnic0
# Reboot after finishing installation
If you are doing a new installation on a brand new server, it’s okay, but, if the server has a previous VMFS datastores be careful on the third raw, “install –firstdisk –preservevmfs” the last part “preservevmfs” is for specifying the action the installation would take if it finds a previous VMFS datastores on the installation disk, if the VMs are already on a separate logical drive or LUN on the server, so it’s okay and complete the process, but, if the previous installation of ESXi and the VMs are stored on the same disk/LUN, make sure that the option “preservevmfs” as set to save the VMs, if you altered this and used “overwritevmfs” instead, all of your data will be gone!!
2.open the ESXi iso image with iso editor app and copy the file “boot.cfg” to your computer.
3. edit that file with a word editor as mentioned earlier, and find this row:
append the path of the script file as following:
this will instruct the boot file to locate the script on the cdrom on that path, make sure that you type the name of the file here as the script file name keeping the characters case the same.
4. copy (or add) both files back to the ISO image and save the image.
5. burn the image and boot your server from it.
6. You are done.
Watch this video for hands-on experience, it’s in Arabic but you will get it 🙂
This post is copied from the following topics:
More advanced details on VM SPOT blog