LinMin Bare Metal Provisioning 6.4 User's Guide

Customizing the ESX and/or ESXi Provisioning Process

Hide Navigation Pane

Customizing the ESX and/or ESXi Provisioning Process

Previous topic Next topic No directory for this topic No expanding text in this topic  

Customizing the ESX and/or ESXi Provisioning Process

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

 

The provisioning process for ESX takes place in 2 steps:

1) First, the contents of the template (.cfg or .tmpl) file are parsed and executed

2) After the system boots for the first time with ESX installed, a "First Boot" script is executed to complete the customization of the ESX environment.

 

Customizing the Master Template and Script:

 

Each time you create an ESX Install Instance, 2 templates and the first boot script are generated from a master location:

/home/tftpboot/esxFiles

There, you will find the 2 master files, which, if modified, will be replicated in every new Install Instance you create:

ESX4master.tmpl

esxInstallFirstBoot.sh

Note that the ESX4master.tmpl is used to generate both the .cfg and the .tmpl file found in each Install Instance.

Caution: before editing the Master Template and Script, test your proposed modifications in an Install Instance first. Only once you have provisioned an ESX system meeting your customization criteria should you modify the Master Template and Script. Be sure to make copies of the Master Template and Script before you edit them.

 

Customizing an Install Instance:

 

To customize an ESX Install Instance, you may edit selected files (templates and a script). For MAC-Specific Provisioning, you may also modify the Template using the GUI.

 

In our example, you created an Install Instance located at:

/home/tftpboot/pub/esx_4.0.0-1_generic

 

In this directory, you will find:

esx_4.0.0-1_generic.cfg                        MAC-Independent template file

esx_4.0.0-1_generic.tmpl                MAC-Specific template file

esxInstallFirstBoot.sh                        Customizable script executed upon first boot

media -> ../esxMedia/esx_401                Symbolic Link to the ESX Media

 

 

Customizing the Install Instance for MAC-Independent Provisioning:

 

If you modify the .cfg file, MAC-Independent provisioning events will use your modifications. After you have made such modifications, delete and recreate your MAC-Indy Role, otherwise your changes will not take effect.

 

If you wish to have more than one MAC-Independent role, you may copy the .cfg, edit it, and when you use the GUI to create a MAC-Independent Role, use the "Browse" buttons to locate and select your newly created .cfg file and replace the default .cfg file.

 

When you run setup.pl (for example, to change the default host name, password and other parameters in all your MAC-Independent roles for Windows, Linux and ESX), you may overwrite your modifications, so back up your .cfg files before running setup.pl.

 

Caution: If you alter any line containing ";;" you may corrupt the template. Below is a sample line that should not be modified:

# ;;distro_template_file="esx4_1_0.tmpl"

 

 

Customizing the Install Instance for MAC-Specific Provisioning:

 

To customize the template that is used when you use the GUI to create MAC-Spec Templates, edit the file:

/home/tftpboot/pub/esx_4.0.0-1_generic/esx_4.0.0-1_generic.tmpl

After you have edited this file, all GUI templates you create will be populated with the file that you edited. Be sure to make a backup copy of the .tmpl file before you edit it.

 

Caution: If you alter any line containing either ";;" or "$", you may corrupt the template. Below are sample lines that should not be modified:

# ;;distro_template_file="esx4_1_0.tmpl"

# machine_name......................$machine_name

# ip_address........................$node_ip_address

 

 

 

You can also use the GUI edit the contents of a Provisioning Role Template:

MAC-Spec_template_ESX410_autofilled_arrow_customize

 

 

 

 

Customizing the Install Instance's First Boot Script (for both MAC-Independent and MAC-Specific Provisioning):

 

After the system boots for the first time with ESX installed, a "First Boot" script is executed to complete the customization of the ESX environment. This script is called:

esxInstallFirstBoot.sh

 

Both MAC-Indy and MAC-Spec provisioning events will use this same script to complete the provisioning process.

 

 

 

General Comments on Customizing the ESX Install Instance

 

Customizing the LinMin-supplied files enables ESX domain experts to tune ESX installations to their exacting specifications, including networking, storage, firewall, etc.

 

For example, make storage configuration changes to this part of the LinMin-supplied templates:

# use first detected disk

clearpart --firstdisk --overwritevmfs

part '/boot'  --fstype=ext3 --size=1100  --onfirstdisk

part 'none'  --fstype=vmkcore --size=110  --onfirstdisk

part 'Storage1'  --fstype=vmfs3 --size=8604 --grow  --onfirstdisk

 

# use specific disk, comment out above

#clearpart --drives=mpx.vmhba0:C0:T0:L0 --overwritevmfs

#part '/boot'  --fstype=ext3 --size=1100  --ondisk=mpx.vmhba0:C0:T0:L0

#part 'none'  --fstype=vmkcore --size=110  --ondisk=mpx.vmhba0:C0:T0:L0

#part 'Storage1'  --fstype=vmfs3 --size=8604 --grow  --ondisk=mpx.vmhba0:C0:T0:L0

 

virtualdisk 'esxconsole' --size=7604 --onvmfs='Storage1'

part 'swap'  --fstype=swap --size=600 --onvirtualdisk='esxconsole'

part '/var/log'  --fstype=ext3 --size=2000 --onvirtualdisk='esxconsole'

part '/'  --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'

 

 

Customization Resources

 

http://mindaugas.kiznis.lt/vmware-esx-4-0-kick-start/

http://www.vmware.com/pdf/vsphere4/r40/vsp_40_esx_vc_installation_guide.pdf

http://communities.vmware.com/home.jspa

http://www.petri.co.il/virtualization.htm

http://vmware-land.com/esxcfg-help.html