Skip to content

Instantly share code, notes, and snippets.

@hitsumabushi
Created January 7, 2015 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitsumabushi/b4e9a0e8e0ef68af1d6f to your computer and use it in GitHub Desktop.
Save hitsumabushi/b4e9a0e8e0ef68af1d6f to your computer and use it in GitHub Desktop.
esxi kickstart
bootstate=0
title=Loading ESXi installer
prefix=/esxi50/
kernel=tboot.b00
#kernelopt=runweasel
modules=b.b00 --- useropts.gz --- k.b00 --- a.b00 --- ata-pata.v00 --- ata-pata.v01 --- ata-pata.v02 --- ata-pata.v03 --- ata-pata.v04 --- ata-pata.v05 --- ata-pata.v06 --- ata-pata.v07 --- block-cc.v00 --- ehci-ehc.v00 --- s.v00 --- weaselin.i00 --- ima-qla4.v00 --- ipmi-ipm.v00 --- ipmi-ipm.v01 --- ipmi-ipm.v02 --- misc-cni.v00 --- misc-dri.v00 --- net-be2n.v00 --- net-bnx2.v00 --- net-bnx2.v01 --- net-cnic.v00 --- net-e100.v00 --- net-e100.v01 --- net-enic.v00 --- net-forc.v00 --- net-igb.v00 --- net-ixgb.v00 --- net-nx-n.v00 --- net-r816.v00 --- net-r816.v01 --- net-s2io.v00 --- net-sky2.v00 --- net-tg3.v00 --- ohci-usb.v00 --- sata-ahc.v00 --- sata-ata.v00 --- sata-sat.v00 --- sata-sat.v01 --- sata-sat.v02 --- sata-sat.v03 --- scsi-aac.v00 --- scsi-adp.v00 --- scsi-aic.v00 --- scsi-bnx.v00 --- scsi-fni.v00 --- scsi-hps.v00 --- scsi-ips.v00 --- scsi-lpf.v00 --- scsi-meg.v00 --- scsi-meg.v01 --- scsi-meg.v02 --- scsi-mpt.v00 --- scsi-mpt.v01 --- scsi-mpt.v02 --- scsi-qla.v00 --- scsi-qla.v01 --- uhci-usb.v00 --- tools.t00 --- imgdb.tgz --- imgpayld.tgz
build=
updated=0
default esxi
label esxi
kernel /esxi/mboot.c32
append -c /esxi/boot.cfg ks=http://192.168.0.10/servers/ks.cfg
ddns-update-sytle none;
option domain-name "example.org";
option domain-name-servers 192.168.0.10;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
# 日本時間
#option time-offset 32400;
range 192.168.0.30 192.168.0.240;
next-server 192.168.0.10;
filename = "pxelinux.0";
}
# accept VMware EULA
vmaccepteula
# Setting rootpw
# for generating encrypted pasword : Use openssl passwd -1 (rootpw)
rootpw --iscrypted ....
# install target
install --firstdisk --preservevmfs
# network setting
network --bootproto=static --ip=172.22.159.146 --gateway=172.22.158.1 --netmask=255.255.254.0 --vlanid=19 --hostname=hoge.example.com --addvmportgroup=1
# reboot after install
reboot
%post --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write(time.asctime())
$1$nz6kimqN$gSlFdxZnUncPbAxaFeKaC1
%firstboot --interpreter=busybox
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
vim-cmd hostsvc/enable_esx_shell
vim-cmd hostsvc/start_esx_shell
# enable password login (SSH)
sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_confg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment