Skip to main content

Injecting predefined and custom macros to an unattend file

You can add predefined and custom macros to an unattend file.

About this task

Macros give you the ability to add dynamic data (configuration settings) to an unattend file. You provide the data values when the OS-image profile is deployed.

Lenovo XClarity Administrator provides a set of predefine macros that you can add to an unattend file without associating a custom configuration-settings file. For a list of predefined macros, see Predefined macros.

It is strongly recommended that you include the following predefined macros in the custom unattend files.

You can create custom macros by creating a configuration-settings file and then associating the unattend file with a custom configuration-settings file. When you import the custom configuration-settings file, XClarity Administrator creates a macro for each configuration setting in the file.

Procedure

Complete the following steps to add macros to an unattend file.

  1. From the XClarity Administrator menu bar, click Provisioning > Manage OS Images to display the Deploy Operating System: Manage OS Images page.
  2. Click the Unattend Files tab.
  3. Select the unattend file that you want to edit.
  4. Click the Edit icon (Edit icon) display the Edit Unattend File dialog.

    Graphic showing initial setup screen for VMware ESXi
  5. Add the recommended predefined macros, for example:
    1. Place the cursor in the unattend file anywhere after line 1 (after the <xml> tag).

    2. Expand the predefine > unattendSettings list in the list of available macros.

    3. Click the preinstallConfig and postinstallConfig to add the required predefined macros to the unattend file.

      The following code is added to the file:

      #predefined.unattendSettings.preinstallConfig#
      #predefined.unattendSettings.postinstallConfig#
  6. Add additional predefined or custom macros by placing the cursor in the correct location in unattend file and then clicking the macro from the list.
  7. Click Save.