VMware VI3 - Sample ks.cfg for Deployed Installations

  1. Default Kickstart file for
  2. VMware ESX Server 3.01
  3. Jason M. Langone
  1. Veni, Vidi, Vici
  1. Hp storage device will be detected

  1. Installation Method

url —url ftp://anonymous:rdp@172.21.133.152/dslib/osdist/vmesx300/

  1. root password
  1. The MD5 encrypted string below is not for “password”

rootpw —iscrypted $1$yIJAh2dl$PcanBdoSOuvNeaBhV33Rt.

  1. Authconfig

auth —enableshadow —enablemd5

  1. Bootloader (GRUB or LILO)

bootloader —location=mbr

  1. Timezone

timezone US/Eastern

  1. X Windowing System

skipx

  1. Install or Upgrade

install

  1. Text mode

text

  1. Network install type
  2. Sample network config using a static ip and hostname
  3. network —bootproto static —ip=192.168.10.10 —netmask=255.255.255.0 —gateway=192.168.10.1 —nameserver=192.168.10.1 —hostname=esx1
  4. The hostname string below is replaced with the displayed
  1. computer name in the Altiris DS console during deployment.

network —bootproto dhcp —hostname ChangeMeBlade —addvmportgroup=1 —vlanid=0

  1. Language

lang en_US

  1. Language Support

langsupport —default en_US

  1. Keyboard

keyboard us

  1. Mouse

mouse none

  1. Reboot after install

reboot

  1. Firewall settings

firewall —disabled

  1. Partitioning
  2. hddevice is replaced with the detected storage device name by the
  3. vmesx.sh script executed on the target server.
  4. To specify specific or custom device names simply replace hddevice
  1. with specific device names ( Ex cciss/c0d0 ).

  1. Clear Partitions

clearpart —all —initlabel —drives=%hddevice%

#part /boot —fstype ext3 —size 100 —ondisk hddevice #part / —fstype ext3 —size 5000 —ondisk hddevice #part swap —size 1024 —ondisk hddevice #part /var/log —fstype ext3 —size 1992 —ondisk hddevice #part None —fstype vmkcore —size 100 —ondisk hddevice

  1. part None —fstype vmfs3 —size 10000 —grow —ondisk hddevice

part /boot —fstype ext3 —size 250 —ondisk hddevice
part / —fstype ext3 —size 5120 —ondisk hddevice
part swap —size 2048 —ondisk hddevice
part None —fstype vmfs3 —size 10000 —grow —ondisk hddevice
part None —fstype vmkcore —size 100 —ondisk hddevice
part /var/log —fstype ext3 —size 4096 —ondisk hddevice
part /home —fstype ext3 —size 2048 —ondisk hddevice
part /tmp —fstype ext3 —size 10240 —ondisk hddevice
vmaccepteula

#VMWare License information

  1. Host based or license server based
  2. Sample for server based licensing
  3. vmlicense —mode=server —server=27000@192.168.1.20 —edition=esxFull —features=vsmp,backup
  4. Host based licensing
  5. vmlicense —mode=file
  1. Add license text to vmlicense_text section at bottom of file.

vmlicense —mode=server —server=27000@canrvc1.americas.cshare.net —edition=esxFull —features=vsmp,backup

%packages
@base

  1. Post install
  2. %post
  3. need to be here?
esxcfg-firewall —allowIncoming esxcfg-firewall —allowOutgoing mkdir /scripts
  1. Transfer the Altiris agent along with its config files
mkdir /tmp/altiris cd /tmp/altiris ftp -n <
  • create script to configure ESX and install adlagent (called by rc.local)
  • cat > /tmp/altiris/hpinstall.sh << EOF1 #!/bin/bash
    1. Script to configure ESX and install adlagent. Called from rc.local.

    1. Firewall Configuration
    2. Enable adlagent and file transfer ports
    3. You need to set a static port (“4300” in this example) for file transfer in
    1. the deployment console under Tools->Options->Global
    2. #
    3. Sort this out later
    #esxcfg-firewall —openPort 402,tcp,out,adlagent #esxcfg-firewall —openPort 4300,tcp,out,adlagentFileTransfer #esxcfg-firewall —allowIncoming #esxcfg-firewall —allowOutgoing

    1. Install Altiris Adlagent

    cd /tmp/altiris
    chmod +x altiris-adlagent*.bin
    ./altiris-adlagent*.i386.bin 1>>/root/install.rdp.log 2>>/root/install.rdp.log
    1. Install adlagent custom configuration

    if [ -e adlagent.conf.custom ]; then mv $AltirisConfDir/adlagent.conf $AltirisConfDir/adlagnet.conf.bak cp -f adlagent.conf.custom $AltirisConfDir/adlagent.conf
    elif [ -e adlagent.conf.default ]; then mv $AltirisConfDir/adlagent.conf $AltirisConfDir/adlagent.conf.bak sed -e “s/0.0.0.0/172.21.133.152/g” adlagent.conf.default > $AltirisConfDir/adlagent.conf
    fi
    1. Reset adlagent to pick up config if necessary

    /etc/init.d/adlagent stop
    /etc/init.d/adlagent start

    1. Reset rc.local to original
    mv -f /etc/rc.d/rc.local.sav /etc/rc.d/rc.local EOF1
    1. End of script

    1. make hpinstall.sh executable

    chmod +x /tmp/altiris/hpinstall.sh

    1. save a copy of rc.local

    cp /etc/rc.d/rc.local /etc/rc.d/rc.local.sav

    1. add hpinstall.sh to rc.local

    cat >> /etc/rc.d/rc.local << EOF
    cd /tmp/altiris
    /tmp/altiris/hpinstall.sh
    EOF

    1. Uncomment and paste license text for host based licensing.
    #%vmlicense_text

    - Jason Langone

    Posted on Jul 11, 05:30 PM by Jason Langone

    Commenting is closed for this article.

    Commenting is closed for this article.