Question: How To Create Scripted / Unattended ESXi 5 Installation

If you are doing a lot of ESXi deployment and want to simplify the installation process use this unattended / scripted method.

With ESXi unattended installation we can use either FTP, HTTP, HTTPS, NFS or local storage to place an answer file that will automate the installation.

In this example I’m using an FTP site to store the answer file and call it from the ESXi host, in the end of the KB I’ll show how to use the local defualt answer file and not use FTP.

ESXi comes with a built in answer file for very basic unattended installation, If you want to read about all the option visit the VMware site at:

http://pubs.vmware.com/vsphere-50/index.jsp

Create or use an existing FTP site:

Give it permissions:

 

Create the answer file or use default one:

#

# Sample scripted installation file

#

# Accept the VMware End User License Agreement

vmaccepteula

# Set the root password for the DCUI and Tech Support Mode

rootpw mypassword

# The install media is in the CD-ROM drive

install –firstdisk –overwritevmfs

# Set the network to DHCP on the first network adapater

network –bootproto=dhcp –device=vmnic0

# A sample post-install script

%post –interpreter=python –ignorefailure=true

import time

stampFile = open(‘/finished.stamp’, mode=’w’)

stampFile.write( time.asctime() )

 

Save in the FTP folder and name it ks.cfg.

Make sure the FTP site works before you try to install any ESXi host.

Start ESXi installation and click Shift+O when getting to the boot stage:

In the boot command line type the path to the FTP server where the KS file is located:

Ks=ftp://192.168.174.20/ks.cfg

Note:

If using local file type:

ks=file://etc/vmware/weasel/ks.cfg

If all done correctly, installation will run automatically and will ask you to restart the server.

All good


Posted

in

by