Predefined macros
Macros give you the ability to add variable data (configuration settings) to an unattend file or post-installation script. Lenovo XClarity Administrator provides a set of predefined configuration settings that you can use.
To inject predefined macros to an unattend or post-installation script file, prefix the macro with "predefined" for predefined macros, separate nested objects using a period, and then surround the macro name with a hash symbol (#), for example #predefined.globalSettings.ipAssignment#.
The value for each predefined macro varies based on the XClarity Administrator instance. For example, the field allows you to specify the IP mode. After the user-inputted value is gathered during OS deployment, the value is represented in the predefined configurations settings by the predefined macro #predefined.globalSettings.ipAssignment# and in the instance of the configuration-settings JSON file under the ipAssignment Object name.
The following table lists the predefine macros (configuration settings) that are available in XClarity Administrator.
Macro name | Type | Description | ||||
---|---|---|---|---|---|---|
predefined | Object | Information about all predefined OS-deployment settings | ||||
globalSettings | Object | Information about global OS-deployment settings | ||||
activeDirectory | Array of objects | (Windows only) Information about Active Directory | ||||
domainName | String | Domain name of the Windows Active Directory service | ||||
credentials | Array of objects | Information about user credentials | ||||
name | String | |||||
plaintextPassword | String | (Windows only) Plain text password for the Windows OS credentials | ||||
type | String | Operating system type. This can be one of the following values.
| ||||
ipAssignment | String | Host network setting option for operating system deployment. This can be one of the following values.
| ||||
isVLANMode | String | Indicates whether VLAN mode is used. This can be one of the following values.
| ||||
hostPlatforms | Object | Deployment settings from the host platforms | ||||
licenseKey | String | License key to be used for Microsoft Windows or VMware ESXi. If you do not have a license key, you can set this field to null. | ||||
networkSettings | Array | Information about network settings | ||||
dns1 | String | Preferred DNS server for the host server to be used after the operating system is deployed | ||||
dns2 | String | Alternative DNS server for the host server to be used after the operating system is deployed | ||||
gateway | String | Gateway of the host server to be used after the operating system is deployed. This is used when the network setting is set to static in the Global OS deployment settings. Tip To determine the IP mode, use | ||||
hostname | String | Hostname for the host server. If a hostname is not specified, a default hostname is assigned. | ||||
ipAddress | String | IP address of the host server to be used after the operating system is deployed. This is used when the network setting is set to static in the Global OS deployment settings. | ||||
mtu | Long | Maximum transmission unit for the host to be used after the operating system is deployed. | ||||
prefixLength | String | Prefix length of the host IP address to be used after the operating system is deployed. This is used when the network setting is set to static IPv6 in the Global OS deployment settings. | ||||
selectedMAC | String | MAC address of the host server to which the IP address is to be bound. The MAC address is set to AUTO by default. This setting automatically detects the Ethernet ports that can be configured and used for deployment. The first MAC address (port) that is detected is used by default. If connectivity is detected on a different MAC address, the XClarity Administrator host is automatically restarted to use the newly detected MAC address for deployment, and selectedMAC is set to the newly detected MAC address. VLAN mode is supported only for servers that have MAC addresses in their inventory. If AUTO is the only the MAC address that is available for a server, then VLANs cannot be used to deploy operating systems to that server. Tip To obtain the MAC address, use the | ||||
subnetCIDRNumber | Integer | Subnet mask of the host server to be used after the operating system is deployed, in Classless Inter-Domain Routing (CIDR) format. This is used when the network setting is set to static in the Global OS deployment settings. The CIDR number is typically preceded by a slash “/” and follows the IP address. For example, an IP address of 131.10.55.70 with a subnet mask of 255.0.0.0 (which has 8 network bits) would be represented as 131.10.55.70 /8. For more information, see the CIDR Notation Tutorial webpage. Tip To determine the IP mode, use | ||||
subnetMask | String | Subnet mask of the host server to be used after the operating system is deployed, in dotted decimal notation (for example, 255.0.0.0). This is used when the network setting is set to static in the Global OS deployment settings. Tip To determine the IP mode, use | ||||
vlanId | String | VLAN ID for operating-system VLAN tagging. This parameter is valid only if in VLAN mode is enabled. To determine if VLAN mode is enabled use GET /osdeployment/globalSettings). Important Only specify a VLAN ID when a VLAN tag is required to function on the network. Using VLAN tags can affect the network routability between the host operating system and the | ||||
selectedImage | String | Profile ID of the operating-system image to be deployed. Tip To obtain the operating-system image profile IDs, use the | ||||
storageSettings | Array | Preferred storage location on which you want to deploy operating-system images | ||||
targetDevice | String | Target device. This can be one of the following values.
Note For ThinkServer servers, this value is always localdisk. | ||||
unattendFileId | String | ID of the unattend file to be used with this deployment | ||||
uuid | String | UUID of the host server to which the operating system is to be deployed | ||||
imageSettings | Object | Information about each OS image and image profile | ||||
name | String | Operating-system image name | ||||
profile | String | Image profile name | ||||
otherSettings | Object | Additional settings that are related to the currently running OS deployment jobs | ||||
deployDataAndSoftwareLocation | String | Path to the extracted software payload, custom files, and deployment data (such as certificates and logs) | ||||
installRepoUrl | String | (SLES 15 and later only) URL for the imported package image You can use this predefined macro in the custom unattend for the media_url in the add-on section, for example:
| ||||
lxcaIp | String | IP address of the XClarity Administrator instance | ||||
lxcaRelease | String | XClarity Administrator release (for example. 2.0.0) | ||||
jobId | String | ID of the currently running OS deployment job | ||||
ntpServer | String | NTP server that is associated with XClarity Administrator | ||||
statusSettings | Object | OS deployment status settings | ||||
urlStatus | String | HTTPS URL (including the port) that XClarity Administrator uses for reporting status | ||||
certLocation | String | Folder containing the certificates that are needed to access the urlStatus web service from the host OS on first boot | ||||
sdkLocation | String | Location of XClarity Administrator provided helper scripts and interfaces for access to the XClarity Administrator | ||||
timezone | String | Time zone that is set for XClarity Administrator (for example, America/New_York) | ||||
unattendSettings | Object | Settings that are used to populate the unattend file. These values are specific to the version of XClarity Administrator | ||||
os | Array of objects | (Windows only) Information about the Windows OS | ||||
installImageName | String | Name of the operate-system image to be installed | ||||
networkConfig | String | (ESXi and RHEL only) XClarity Administrator predefined content for use at unattend install time. This configures the network settings for the operating system | ||||
preinstallConfig | String | XClarity Administrator predefined content for use at pre-installation unattend time. This includes pre-installation status.
Attention It is strongly recommended that you include this macro in the custom unattend file. You can place the macro in the unattend file anywhere after line 1 (after the <xml> tag). | ||||
postinstallConfig | String | XClarity Administrator predefined content for use after the server is configured and booted for the first time. This includes post-installation status.
Attention It is strongly recommended that this macro be included in the custom unattend file. You can place the macro in the unattend file anywhere after line 1 (after the <xml> tag). | ||||
reportWorkloadNotComplete | String | When this macro is present, the postinstallConfig macro does not report OS Installation Completed (17) status. The custom profile must report complete. | ||||
storageConfig | String | (ESXi and RHEL only) XClarity Administrator predefined content for use at unattend install time. This configures the storage settings for the operating system. |