Administer > SA Provisioning > OS sequence-based provisioning > Defining custom attributes

Defining custom attributes

This section discusses the following topics:

In addition to the customization provided by using build customization scripts, each build script uses custom attributes.

The SA Client provides a data management function by allowing users to set custom attributes for servers. These custom attributes include setting miscellaneous parameters and named data values. Users can write scripts that use these parameters and data values when performing a variety of functions, including network and server configuration, notifications, and CRON script configuration.

For OS Provisioning, SA uses custom attributes to pass specific information to each build script to configure the installation process.

You can edit an OS Installation Profile to override the default values used by the build process. You override these default values by setting custom attributes for the OS Installation Profile.

See Adding Custom Attributes to OS Installation Profile for specific steps required to set custom attributes for an OS Installation Profile.

Custom attributes for Sun Solaris 10 and 11

The build script for Solaris OS Provisioning uses a number of custom attributes. Several of these custom attributes correlate with an equivalent setting that would be defined normally by a Solaris sysidcfg file.

You cannot modify the sysidcfg file that OS Provisioning uses. However, you can override specific values specified in the default sysidcfg file. You can set custom attributes for a Solaris OS Installation Profile in the SA Client.

The custom attributes correspond to the equivalent keywords in the sysidcfg file. See the following table.

Sun Solaris 10 and 11 Custom Attributes

Keyword

Description

archive_location

NFS path to a Flash Archive (flar) to use instead of operating system media.

Example Value: nfs://mediaserver.company.com
/flars/sunos5.10_basic.flar

boot_options

Solaris kernel parameters. These can be found in
/boot/grub/menu.lst on X86, as EEPROM values on SPARC machine systems, or bootenv.rc.

Example Value: Values will vary, see your Solaris documentation.

reboot_command

The command the OS Build Agent uses to issue a reboot during Solaris SPARC reprovisioning. The custom attribute value is not the entire command, rather it is the next boot command for the Open Boot PROM. The full command is
/usr/sbin/reboot -l -- 'net:dhcp - install,
only net:dhcp - install is replaced by the reboot_command value.

Example Value: net2:dhcp - install

root_password

Sets the encrypted value for the password on an installation client. One way to obtain an encrypted value is by using
/etc/shadow.

If a value is not set, the system will not have a root password.

Example Value: Field 2 from the /etc/shadow file

timezone

Sets the time zone for the configuration of the installation client (sets TZ in /etc/default/init). The directories and files in the directory /usr/share/lib/zoneinfo provide the valid time zone values.

By default, the time zone value is UTC.

For example, the time zone value for Pacific Standard Time in the United States is US/Pacific. You can also specify any valid Olson time zone.

Example Value: Any value in the
/usr/share/lib/zoneinfo directory on a solaris server.

system_locale

Sets the language for the configuration of the installation client (sets LANG in /etc/default/init). Valid locale values are installed in /usr/lib/locale. If you set this attribute, you should also use the locale keyword in the operating system profile so that the appropriate locale is installed.

By default, the value for this keyword is system_local=C.

Example Value: "C", "en_US.UTF-8", "ja_JP.UTF-8".

See http://developers.sun.com/dev/gadc/faq/locale.html

required_patches

No longer supported.

nfsv4_domain

Sets the system’s default NFS version 4 domain name. This value is substituted into /etc/default/nfs next to "NFSMAPID_DOMAIN=.

If this value is not set, OS Provisioning suppresses the prompt to confirm the NFS version 4 domain name when the server starts the first time.

Example Value: company.com

mrl

(Solaris 11) The MRL created by the import_media script. This is useful when you want to use an external repository.

http_proxy

(Solaris 11) Specify when you use HTTP repositories.

enable_root_user

(Solaris 11) Solaris 11 allows root to be defined as a role in the sc.xml file.

Presence of this custom attribute will trigger the user creation, even if 'no' value is set.

hostname

Specifies the hostname of the machine.

Custom attributes for Linux or VMware ESX

You can use custom attributes to specify additional arguments to the kernel where the installation is running.

Setting a custom attribute for the OS Installation Profile requires that you edit the OS Installation Profile and select the Custom Attributes tab. The custom attribute must have the name, kernel_arguments.

The kernel arguments are separated by spaces (like they are when you type them after the boot prompt for the CD-ROM or DVD). For example:

name=value jones=barbi

To have the kernel arguments persist after the base operating system is installed, you must set them in the uploaded configuration file. Setting kernel arguments by using custom attributes only allows you to create a completely automated installation (as if you were installing the operating system from CD-ROM or DVD).

Although custom attributes are provided with a default value, you must ensure that the values are valid for your system before proceeding.

Linux or VMware ESX Custom Attributes

Keyword

Description

boot_disk

Values: A raw device name without "/dev/" such as "sda", "hdc",
"cciss/c0d1"

boot_kernel

Values: "rhel30", "rhel40", "rhel50", "rehl60", "rhel3ia", "rhel4ia", "rhel5ia"

Note: This custom attribute is used only for reprovisioning. The value of this custom attribute specifies the type of kernel the server boots to during reprovisioning.

hpsa_netconfig

Created after using non-DHCP to boot the target server into the Unprovisioned Servers list.

kernel_arguments

Values: "noapci", "root=LABEL=/", "quiet", "splash"

ksdevice
(Linux pxe boot)

Values: MAC address of the NIC

Note: This custom attribute is used in the Media Boot Client (MBC) to create a server record. The Server Browser of this device has the following custom attribute:

kernel_arguments      =ksdevice=mac address

ksdevice              mac address

When powering on and PXE booting a device, you do not need to specify the kickstart device.

ksdevice
(linux5, linux6)

Values: bootif

Default:

ksdevice=bootif

Use for all Linux PXE types (including linux5, linux6) to prevent prompting for the Kickstart device when booting a multiple NIC server into the Unprovisioned Server pool.

nfs_opts

Use --opts to specify NFS options in the ks.cfg. (when provisioning Red Hat Enterprise Linux 5 or later).

For example:

nfs --server <Server IP> --dir <media director> --opts
<nfs options>

For example, to contain a comma delimited set of values the same as the NFS values allowed in /etc/fstab, create a custom attribute nfs_opts with the value "rsize=32768,wsize=32768".

timeout

Values: the number of minutes to wait for Linux provisioning to complete before timing out.

Default: 30 minutes

If Linux provisioning fails because the job takes too long to complete, you can specify a longer timeout period.

Using the boot_disk Custom Attribute to Specify the Boot Drive

For certain servers you may need to specify the correct boot disk using the boot_disk custom attribute.
SA uses the values specified with the boot_disk custom attribute to determine which disk to partition, format, and install the Assisted Installer image on.

Note The device you select must be configured as the first internal boot device in the BIOS.
If the value of the boot_disk custom attribute is not found to exist on the hardware, SA logs a message and reverts to the original disk selection logic.

Sample ks.cfg File

The boot_disk custom attribute requires certain modifications to your Kickstart file in order to function properly. The following is a sample ks.cfg file for use with Red Hat Linux AS 4:

#Red Hat Kickstart Answer File

#Validated for use with Opsware

#This file supports a non-default boot_disk

#VERSION: 1.1 20080804

auth

bootloader --driveorder=@.boot_disk@

clearpart --drives=@.boot_disk@ --initlabel

part / --ondrive=@.boot_disk@ --asprimary --size=500 --grow

part swap --asprimary --size=250 --ondrive=@.boot_disk@

keyboard us

lang en_US.UTF-8

langsupport --default en_US.UTF-8 en_US.UTF-8

reboot #require by OPSW

rootpw password

text

timezone --utc UTC

#Required for opsware

firewall --disabled

%packages

@base

 

%pre

#OK, the purpose of this is to initialize all partition tables

#If anaconda finds a completely new raw disk or any disk with an #invalid partition table, it goes interactive. This makes sure

#anaconda continues unattended

for D in `sfdisk -l 2>/dev/null | grep "unrecognized partition" | cut -d : -f 1 | tr -d " "|xargs`

do

echo "Found an uninitialized partition table on ${D} according to sfdisk. Adding a new empty partition table"

printf ";\n;\n;\n;\ny\n" | sfdisk --DOS --force "${D}" > /dev/null 2>&1

done

Custom attributes for Microsoft Windows

For a Windows OS Installation Profile, you can set various Windows operating system custom attributes that allow you to replace or insert values inside the unattend.xml file during the operating system installation process. At install-time, the resolved value of the custom attribute is inserted into unattend.xml.

For example, if you do not have AdminPassword=Foo in your unattend.xml file, but you do have it added as a custom attribute, OS Provisioning will automatically add AdminPassword=CustAttrValue at install time.

For more information on how to add custom attributes, see Adding Custom Attributes to OS Installation Profile.

Refer to Microsoft documentation for syntax and valid values. Unless otherwise noted in the table, there are no default values for these attributes if they are not set.

Windows custom attributes for OS provisioning

Keyword

Corresponding unattend.xml Attribute

Description

AdminPassword

[GuiUnattended]/AdminPassword

This option sets the Administrator password for the Admin account.

AGENT_INSTALL_DELAY

 

Allows you to introduce a delay after provisioning a system that allows the build scripts to wait before starting to install the agent.

Default: 30 seconds

argstring

None

String value that is used to compose the command line arguments for the Agent installer.

auto_partition

 

Used by consoleless to indicate that instead of requiring interactive user confirmation before partitioning the disk, partition the disk automatically.

ComputerName

[UserData]/ComputerName

This value is not validated by SA. This custom attribute should only be set on the Server, but SA does not prevent you from setting the attribute anywhere. The default value is an SA-generated random string.

hpsa_netconfig

None

Created after using non-DHCP to boot the target server into the Unprovisioned Servers list.

imageexec

None

Command to apply legacy image-based provisioning image. This supports traditional imaging tools such as Symantec Ghost™. However, using the built in support for WIM images is strongly encouraged.

imagefile

None

Path to a server image file. This supports traditional imaging tools such as Symantec Ghost™. However, using the built in support for WIM images is strongly encouraged.

imageshare

None

Share with image file to install. This supports traditional imaging tools such as Symantec Ghost™. However, using the built in support for WIM images is strongly encouraged.

ProductKey

[UserData]/ProductKey

This value is not validated by SA.

timeout

None

An integer value in minutes that the Windows Setup will timeout. Default is 120 minutes. If Windows setup does not complete in the specified amount of time, the operating system installation fails with a timeout error.

Adding Custom Attributes to OS Installation Profile

To add custom attributes to an OS Installation Profile in the SA Client, perform the following steps:

  1. Launch the SA Client using the following method: From Start > All Programs > HPE Server Automation, click HPE Server Automation Client.
  2. From inside the SA Client, from the Navigation pane, select Library >
    OS Installation Profiles. Ensure that you have selected the By Type tab.
  3. Browse to an OS Installation Profile and open it. The OS Installation Profile window is displayed.
  4. In the OS Installation Profile window, select Custom Attributes from the Views pane.
  5. In the Content pane, click Add to add a custom attribute.
  6. In the Name column, double-click a cell in the table and type a custom attribute name.
  7. In the Value column, double-click a cell in the table and type a custom attribute value.
    If you have to enter a longer value, click to open a window and enter the longer value.
  8. To delete a custom attribute, select it and click Delete.