Hi,
in my lab environment I install with kickstart and PXE. I just set it up with ESXi 5 and have some problems the worst of which being the root password. I have tried "rootpw *******" and "rootpw "******"" but every time I can login via SSH or vCenter with an empty password. Despite of this, I have not found any info on how to properly enable NTP: With this configuration the NTP server is configured in /etc/ntpd.conf and is shown in vSphere Client but the NTP service itself is not started on system boot. Futher, clearpart does not seem to do its job: It seems like the VMFS label is not properly overwritten and the name I give is appended with "(1)". What you see below is my ugly workaround to this. At the very end I update the server using a zip bundle. Unfortunately, the server does not come back from maintenance mode and is still there after reboot. The SuppressShellWarning advanced parameter is not set, too.
Any help with any of the problems described above is very much appreciated.
cheers
mathiase
vmaccepteula
clearpart --alldrives --overwritevmfs
install --firstdisk --overwritevmfs
keyboard Default
network --bootproto=static --device=vmnic0 --ip=10.10.55.10 --netmask=255.255.255.0 --hostname=node00.vl.invalid --gateway=10.10.55.1 --nameserver=10.10.55.1 --vlanid=55
paranoid
rootpw "******"
reboot --noeject
%firstboot --interpreter=busybox
######################################################################################
# NETWORKING
######################################################################################
esxcli system hostname set --host "node00" --domain "vl.invalid"
esxcli network ip dns search add --domain=vl.invalid
esxcli network ip dns server add --server=10.10.55.1
# MANAGEMENT VMS
esxcli network vswitch standard portgroup add -p "Management VMs" -v "vSwitch0"
esxcli network vswitch standard portgroup set -p "Management VMs" -v 55
# VIRTUAL MACHINES
esxcli network vswitch standard portgroup add -p "VM Network" -v "vSwitch0"
esxcli network vswitch standard portgroup set -p "VM Network" -v 56
# IP STORAGE
esxcli network vswitch standard portgroup add -p "IP Storage" -v "vSwitch0"
esxcli network vswitch standard portgroup set -p "IP Storage" -v 55
esxcli network ip interface add -i "vmk1" -p "IP Storage"
esxcli network ip interface ipv4 set -i "vmk1" -I "10.10.55.20" -N "255.255.255.0" -t "static"
# PXEBOOT NETWORK
esxcli network vswitch standard portgroup add -p "PXE Boot" -v "vSwitch0"
# VMOTION NETWORK
esxcli network vswitch standard portgroup add -p "vMotion" -v "vSwitch0"
esxcli network vswitch standard portgroup set -p "vMotion" -v=55
esxcli network ip interface add -i "vmk2" -p "vMotion"
esxcli network ip interface ipv4 set -i "vmk2" -I "10.10.55.30" -N "255.255.255.0" -t "static"
vim-cmd hostsvc/vmotion/vnic_set vmk2
######################################################################################
# STORAGE
######################################################################################
# SET LOCAL DATASTORE NAME
vim-cmd hostsvc/datastore/rename "datastore1" "$(hostname -s):datastore1"
# ENABLE SW ISCSI
esxcli iscsi software set -e 1
iscsihba=`esxcli iscsi adapter list | grep -i vmhba | cut -d ' ' -f 1`
esxcli iscsi adapter set -A $iscsihba -n "iqn.2011-12.invalid.vl:node00-swiscsi" -a "node00"
esxcli iscsi networkportal add -A $iscsihba -n vmk1
esxcli iscsi adapter discovery statictarget add -A vmhba34 -a "10.10.55.3:3260" -n "iqn.2006-06.com.quadstor.vdisk.vlan55lun0"
esxcli iscsi adapter discovery statictarget add -A vmhba34 -a "10.10.55.3:3260" -n "iqn.2006-06.com.quadstor.vdisk.vlan55lun1"
esxcli iscsi adapter discovery statictarget add -A vmhba34 -a "10.10.55.3:3260" -n "iqn.2006-06.com.quadstor.vdisk.vlan55lun2"
esxcli storage core adapter rescan --adapter $iscsihba
esxcli storage filesystem automount
# NFS
esxcli storage nfs add -H "10.10.55.3" -r -s "/srv/nfs" -v "ISO"
######################################################################################
# MISC
######################################################################################
# Virtualized Hardware Virtualization
echo 'vhv.allow = "TRUE"' >> /etc/vmware/config
# Syslog
vim-cmd hostsvc/advopt/update Syslog.Remote.Hostname string syslog.vl.invalid
vim-cmd hostsvc/advopt/update Syslog.Remote.Port int 514
vim-cmd hostsvc/advopt/update Syslog.Local.DatastorePath string "[quadstor00] /logfiles/$(hostname -s).log"
# NTP
cat > /etc/ntp.conf <<EOF
restrict default kod nomodify notrap nopeer
restrict 127.0.0.1
server 10.10.55.1
driftfile /etc/ntp.drift
EOF
# Enable Shell and SSH
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
vim-cmd hostsvc/enable_esx_shell
vim-cmd hostsvc/start_esx_shell
esxcli system settings advanced set --option="/UserVars/SuppressShellWarning" --int-value=1
######################################################################################
# UPDATE
######################################################################################
vim-cmd hostsvc/maintenance_mode_enter
DS=`ls /vmfs/volumes/ | grep datastore`
wget -P "/vmfs/volumes/${DS}/" http://10.10.55.5/ESXi500-201111001.zip
esxcli software vib update --depot="/vmfs/volumes/${DS}/ESXi500-201111001.zip"
vim-cmd hostsvc/maintenance_mode_exit
reboot