# Use nfs media nfs --server=192.168.33.201 --dir=/vol/tol_sys/kickstart/ksesx/VMware #cdrom install # Localization lang en_US langsupport --default en_US.UTF-8 keyboard us # Mouse Configuration mouse none # Skip X configuration skipx # Text install text # Network information #%include /tmp/network #network --device eth0 --bootproto static --ip 192.168.33.16 --netmask 255.255.255.0 --hostname esx16-ludit1d.cc.kuleuven.be network --device eth0 --bootproto static --ip 192.168.33.16 --netmask 255.255.255.0 --nameserver 134.58.126.3,134.58.127.1 --hostname esx16-ludit1d.cc.kuleuven.be --addvmportgroup=1 # Encrypted root password rootpw --iscrypted $1$8/yzDPuw$uVa8GPutLtbEsCGQy2PP6. # Enable the firewall firewall --enabled # Auth Configuration authconfig --enableshadow --enablemd5 # Timezone timezone --utc Europe/Brussels # Bootloader config bootloader --useLilo --location=mbr # Reboot reboot # VMware Licensing vmaccepteula vmlicense --mode=server --server=27000@192.168.28.99 --edition=esxFull # Amount of memory to reserve for the console OS # 192M up to 8 virtual machines # 272M up to 16 virtual machines # 384M up to 32 virtual machines # 512 more than 32 virtual machines vmservconmem --reserved=512 # Partitioning # *Note: ESX 3.0 Will require a 100M /boot parition for an upgrade. clearpart --all --initlabel --drives=cciss/c0d0 part / --size 10240 --ondisk cciss/c0d0 --fstype ext3 --asprimary part /boot --size 100 --ondisk cciss/c0d0 --fstype ext2 --asprimary part swap --size 2048 --ondisk cciss/c0d0 --fstype swap --asprimary part /vmimages --size 10240 --ondisk cciss/c0d0 --fstype ext3 part None --size 100 --ondisk cciss/c0d0 --fstype vmkcore part None --size 1 --ondisk cciss/c0d0 --fstype vmfs3 --grow # Not sure how to specify this without device labels vmswap --volume="local" --size="16384" --name "SwapFile.vswp" # Set up virtual switches. vmnetswitch --name="internal" --vmnic=vmnic0 --vmnic=vmnic1 vmnetswitch --name="external" --vmnic=vmnic2 --vmnic=vmnic3 vmnetswitch --name="linux_data" --vmnic="internal" vmnetswitch --name="linux_mgmt" --vmnic="internal.184" vmnetswitch --name="win_data" --vmnic="internal.391" vmnetswitch --name="ludit" --vmnic="external.49" vmnetswitch --name="pis" --vmnic="external.94" vmnetswitch --name="www" --vmnic="external.95" vmnetswitch --name="db" --vmnic="external.164" vmnetswitch --name="iis" --vmnic="external.211" vmnetswitch --name="windows" --vmnic="external.219" vmnetswitch --name="cygnus" --vmnic="external.245" vmnetswitch --name="pcklas" --vmnic="external.246" vmnetswitch --name="oob" --vmnic="external.363" vmnetswitch --name="luditad" --vmnic="external.368" vmnetswitch --name="tol_test" --vmnic="external.389" vmnetswitch --name="testad" --vmnic="external.415" # Assign all PCI devices ( All of these device IDs can be obtained by looking at /etc/vmware/hwconfig ) vmpcidivy --auto %packages @ Everything %pre mkdir -p /tmp/scripts mount -t nfs 192.168.33.201:/vol/tol_sys/kickstart/ksesx/pre /tmp/scripts for arg in `cat /proc/cmdline` ; do if [[ $arg =~ 'hostname=(.*)' ]]; then HOSTNAME=${BASH_REMATCH[1]}; fi done cp /tmp/scripts/network.$HOSTNAME /tmp/network umount /tmp/scripts rmdir /tmp/scripts %post # Modify /etc/resolv.conf cat > /etc/resolv.conf << EOF search cc.kuleuven.be nameserver 134.58.126.3 nameserver 134.58.127.1 EOF # NTP Configuration chkconfig --level 345 ntpd on perl -spi -e 's|# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery|restrict 134.58.255.1 mask 255.255.255.255 nomodify notrap noquery|' /etc/ntp.conf perl -spi -e 's|# server mytrustedtimeserverip|server 134.58.255.1|' /etc/ntp.conf cat > /etc/ntp/step-tickers << EOF 134.58.255.1 EOF # Install vmkusage /usr/bin/vmkusage -regroove cat < /etc/cron.d/vmkusage-cron.sh #!/bin/bash */1 * * * * root /usr/bin/vmkusage > /dev/null 2>&1 EOF /bin/chmod +x /etc/cron.d/vmkusage-cron.sh # Set up restriction banners perl -spi -e 's|#Banner /some/path|Banner /etc/restricted_access|' /etc/ssh/sshd_config cat > /etc/restricted_access << EOF WARNING: U R NOT 3L33t, b3w4r3 of h4X0r! EOF