How to deploy scripted install of ESX 4 through Deployment Server

book

Article ID: 178438

calendar_today

Updated On:

Products

Deployment Solution

Issue/Introduction

 

Resolution

Question
How to deploy ESX4 scripted install through Deployment Server

Answer

Attached is a process that was built for a deployment server to script ESX4 installs.

 

set up an HTTP folder in the deployment server which has the ESX4 install files.  This process could also be changed so it uses NFS or FTP for its ESX install files.  The main key is the kickstart file resided in the HTTP location on the deployment server.   Also the kickstart file does install the latest adlagent during the post process. It will create a post install script that will copy and run the latest adlagent and copy a adlagent.conf.

 

 It also adds a user called Altiris with the password of “password”  It also allows the required DS ports including a file transfer port which in this example is set to 5003.  Hard coding the file transfer port in DS is required. You can change the password and account to anything. To encrypt the password run the following command in a linux shell.

 

echo -n 'the_password' | md5sum –

 

you should see an output like this

 

5f4dcc3b5aa765d61d8327deb882cf99

********************SNIPIT FROM KS.CFG***********************

#create ESX4 user altiris with password of "password"

/usr/sbin/useradd altiris

/usr/sbin/usermod -p '$1$JEAfqUug$b32ZkfhFhPZ2TyJNgmLrr/' altiris

*************************************************************

 

 

If the type of server needs to be changed from http to ftp or nfs change the following section in the KS.CFG.

 

********************SNIPIT FROM KS.CFG***********************

 

# Installation Method

#nfs --server=<server ip address>  --dir=/<sharename>/<directory>

install url http://%#*"select tcp_addr from dbo.aclient_prop where computer_id=0"%/ESX4

*************************************************************

 

 

If the server type is changed (from http to ftp or nfs)on the ks.cfg you also have to make changes to the grub.conf.

********************************************************************

title ESX Install

                #kernel /vmlinuz vmkopts=debugLogToSerial:1 mem=512M ip=xxx.xxx.xxx.xxx netmask=xxx.xxx.xxx.xxx gateway=xxx.xxx.xxx.xxx nameserver=xxx.xxx.xxx.xxx  text netdevice=vmnic0 ks=http://%#*"select tcp_addr from dbo.aclient_prop where computer_id=0"%/ESX4/Kickstarts/%ID%.cfg

                #kernel /vmlinuz vmkopts=debugLogToSerial:1 mem=512M askmedia ksdevice=vmnic0

                kernel /vmlinuz vmkopts=debugLogToSerial:1 mem=512M ksdevice=vmnic0 ks=http://%#*"select tcp_addr from dbo.aclient_prop where computer_id=0"%/ESX4/Kickstarts/%ID%.cfg

                initrd /initrd.img

****************************************************************************

 

instructions:

 

This process requires the following:

1. ESX4 created in the express share, the contents of the zip file this document came from must be placed into this folder

2. ESX4 is made as an HTTP share URL is http://[DSSERVER]/ESX4

                a.  Mime type requires all create mime type as .*

                b.  Run one of the following line if Deployment server is running on 2008

                                i.  Appcmd set config "Default Web Site" /section:system.webServer/Security/requestFiltering -allowDoubleEscaping:True

                                                Note This will configure this setting only for the "Default Web Site" by creating or editing the Web.config file in the root folder of the "Default Web Site."

                                ii. appcmd set config "Default Web Site" /section:system.webServer/Security/requestFiltering -allowDoubleEscaping:True /commit:appHost

                                                Note This will configure this setting only for the "Default Web Site" in the applicationHost.config file by using a location tag.

 

3. The file transfer port needs to be hardcoded, The kickstart file is cuttently set to use port 5003.  To ensure the port is set correctly in Deployment Server console select Tools->Options->Global(TAB) and set the Client/Server transfer port to 5003.  If a different port is required edit the ks.cfg file and replace 5003 with the correct port. 


 

                NOTE: When editing the Linux files do not use any Microsoft tools like notepad, wordpad, write, or office as it will place invalid return characters.  When editing in windows use something that will still save the unix format like textpad(http://www.textpad.com/)

 

4. Import Deploy ESX4.bin file into the Deployment server.  In the console select File->Import/Export->Import jobs and browse to the Deploy ESX4.bin file.

 

5. Edit the kickstart file for the require information such as the express share account name and password, and ESX License key.

                mount -t cifs –o username=[USERNAME],password=[USERPASSWORD] //\$DSADDR/express /mnt/ddp

                serialnum --esx=#####-#####-#####-#####-#####

 

NOTE: The attachment holds the following files. All these files are needed to complete the scripted install of ESX4

  • GrubInstall.img (image to deploy grub partition)
  • ks.cfg (scripted install answer file)
  • Adlagent.conf.custom (customer config for adlagent
  • deployESX4.bin (jobs to import to deployment console)
  • grub.conf

Attachments

esx install.zip.zip get_app
esx install.zip.zip get_app