public static final class LinuxConfiguration.Builder
extends java.lang.Object
LinuxConfiguration
.Constructor and Description |
---|
Builder(HostnameGenerator hostname,
java.lang.String domain)
Constructor with parameters for the required properties of
LinuxConfiguration . |
Modifier and Type | Method and Description |
---|---|
LinuxConfiguration |
build() |
LinuxConfiguration.Builder |
setScriptText(java.lang.String scriptText)
The script to run before and after Linux guest customization.
The max size of the script is 1500 bytes. |
LinuxConfiguration.Builder |
setTimeZone(java.lang.String timeZone)
The case-sensitive time zone, such as Europe/Sofia.
|
public Builder(HostnameGenerator hostname, java.lang.String domain)
LinuxConfiguration
.public LinuxConfiguration.Builder setTimeZone(java.lang.String timeZone)
String
) in the form "Area/Location," in which Area is a
continent or ocean name, and Location is the city, island, or other regional
designation.
See the https://kb.vmware.com/kb/2145518 for a list of supported time zones for different versions in Linux.
. This property was added in vSphere API 7.0.0.0. Ifnull
, time zone is not modified inside guest operating system.timeZone
- New value for the property.public LinuxConfiguration.Builder setScriptText(java.lang.String scriptText)
The script is invoked by the customization engine using the command line: 1) with argument "precustomization" before customization, 2) with argument "postcustomization" after customization. The script should parse this argument and implement pre-customization or post-customization task code details in the corresponding block.
A Linux shell script example:
#!/bin/sh
if [ x$1 ==
x"precustomization" ]; then
echo "Do Precustomization tasks"
#code for
pre-customization actions...
elif [ x$1 == x"postcustomization" ];
then
echo "Do Postcustomization tasks"
#code for post-customization
actions...
fi
null
, no script will be executed.scriptText
- New value for the property.public LinuxConfiguration build()