一. 模板机安装ESXi
二. 提取ks脚本文件
/etc/vmware/weasel/ks.cfg
#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw myp@ssw0rd
# The install media is in the CD-ROM drive
install --firstdisk --overwritevmfs
# Set the network to DHCP on the first network adapter
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() )
三. 为优盘修改boot.cfg脚本文件
kernelopt=ks=usb
自动搜索根目录
kernelopt=ks=usb:/path
搜索指定的路径
四. 为光盘修改boot.cfg脚本文件
kernelopt=ks=cdrom:/KS.CFG
如果在Windows下修改ISO内的文件,文件名会变成大写,boot.cfg内的修改要注意文件名大小写