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:

Requirements:

  1. ESXi ISO image, any edition you like.
  2. ISO image editor, like PowerISO.
  3. Word processor (Notepad++ or WordPad).
  4. the script code.

Files to be edited:

  • script file with any desired name, I use “KS_CSTM.CFG”.
  • BOOT.CFG from the ESXi image.

Installation steps:

  1. 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
vmaccepteula

# Set the root password for the DCUI and Tech Support Mode
rootpw P@ssw0rd

# 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
reboot

 

IMPORTANT

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:

kernelopt=runweasel

append the path of the script file as following:

kernelopt=runweasel ks=cdrom:/KS_CSTM.CFG

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:

VMWare KB:

http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vsphere.install.doc/GUID-C3F32E0F-297B-4B75-8B3E-C28BD08680C8.html

More advanced details on VM SPOT blog

 

VMWare - scripted installation

Advertisements