You can upload a customization script to a virtual machine. The script runs before and after guest customization when you deploy a virtual machine based on a vApp template.
About this task
When you add a customization script to a virtual machine, the script is called:
Only on initial customization and force recustomization.
With the "precustomization" command line parameter before guest customization begins.
With the "postcustomization" command line parameter after guest customization finishes.
The customization script cannot exceed 1500 characters.
Procedure
Customization Script Examples
A sample Windows batch file:
@echo off if "%1%" == "precustomization" ( echo Do precustomization tasks ) else if "%1%" == "postcustomization" ( echo Do postcustomization tasks )
A sample Unix shell script:
#!/bin/sh if [ x$1 == x"precustomization" ]; then echo Do Precustomization tasks elif [ x$1 == x"postcustomization" ]; then echo Do Postcustomization tasks fi