Defines Network Installation Management (NIM) clients from a stanza file.
The nimdef command parses a definition stanza file to build the commands required to add NIM client definitions to the NIM environment.
The nimdef command can also create NIM networks and NIM machine groups automatically in the NIM environment to support the new client definitions.
Note: Before using the nimdef command, you must configure the NIM master. (See Basic NIM operations and configuration in AIX® Version 7.1 Installation and migration for more information.)
Client Definition File Rules
The format of the client definition file must comply with the following rules:
Client Definition File Keywords
The client definition file uses the following keywords to specify machine attributes:
Required Attributes
Item | Description |
---|---|
cable_type | Specifies the cable type of the machine. Required if network_type is ent. |
gateway | Specifies the hostname or IP address of the default gateway used by the machine. If the machine does not use a gateway, then specify the value 0 (zero) for this attribute. |
machine_type | Specifies the type of the machine: standalone, diskless, or dataless. |
network_type | Specifies the type of the machine's network adapter: ent or tok. |
ring_speed | Specifies the ring speed of the machine. Required if network_type is tok. |
subnet_mask | Specifies the subnet mask used by the machine. |
Optional Attributes
Item | Description |
---|---|
nim_name | Specifies the NIM name to use for a machine. Use this attribute if something other than the hostname is used for the NIM name. By default, the NIM name given to a machine is the hostname of the machine with any domain information stripped off. If you use non-unique hostnames in different domains, a conflict occurs because the same NIM name is used for both machines. In such an environment, define this attribute for the affected machine definitions. |
platform | Specifies the machine hardware platform. If you do not specify this attribute, default is rs6k through AIX 5.1 only. |
net_adptr_name | Specifies the name of the network adapter used by the machine (tok0, ent0, etc.). |
netboot_kernel=NetbootKernelType | Specifies the type of kernel to use when booting the client over the network. The netboot_kernel values are up or mp. |
ipl_rom_emulation | Specifies the device to use for IPL ROM emulation (/dev/fd0, /dev/rmt0, etc.). |
primary_interface | Specifies the hostname used for the original machine definition. Use this attribute if the current stanza is only to define an additional interface to a machine that is defined in the NIM environment. |
master_gateway | Specifies the gateway that the NIM master uses to reach this machine if this machine is on a different network. This attribute is not necessary if this machine is defined on a network that is already defined in the NIM environment, or if the NIM master network has a default gateway specified. |
machine_group | Specifies the group or groups to add the machine to when it is defined. |
comments | Specifies a comment to include in the machine definition. The comment string should be in double quotes ("). |
Client Definition File Stanza Errors
A definition stanza is incorrect under any of the following conditions:
Sample Client Definition File
# Set default values.
default:
machine_type = standalone
subnet_mask = 255.255.240.0
gateway = gateway1
network_type = tok
ring_speed = 16
platform = rs6k
machine_group = all_machines
# Define the machine "lab1"
# Take all defaults.
lab1:
# Define the machine "lab2"
# Take all defaults and specify 2 additional attributes.
# The machine "lab2" uses IPL ROM emulation, and will be added to
# the machine groups "all_machines" and "lab_machines".
lab2:
ipl_rom_emulation = /dev/fd0
machine_group = lab_machines
# Define the machine "lab3"
# Take all defaults, but do not add the machine to the default
# group.
lab3:
machine_group=
# Define the machine "lab4"
# Take all defaults, but do not add "lab4" to the default group
# "all_machines".
# Instead add it to the groups "lab_machines" and "new_machines".
lab4:
machine_group =
machine_group = lab_machines
machine_group = new_machines
# Change the default "platform" attribute.
default:
platform = rspc
# define the machine "test1"
# Take all defaults and include a comment.
test1:
comments = "This machine is a test machine."
Item | Description |
---|---|
-c | Generates commands from a client definition file. This flag processes the definition file and generates the commands to add the definitions. The commands are not invoked but displayed as a KSH script that you can redirect to a file and invoke at a later time. |
-d | Defines machines from a client definition file. This flag processes the definition file and invokes the commands to add the definitions to the NIM environment. |
-f Name | Specifies the name of the client definition file. |
-p | Displays a preview of the client definition file. This flag
processes the definition file but does not add machines to the NIM
environment. Displays the following: All complete and valid NIM definition stanzas. All additional interfaces that will be defined for machines. All invalid definitions stanzas and the reason for failure. All new machine groups and the members to add. All existing machine groups and the members to add. All network definitions to add to the NIM environment. The commands to invoke to add each new machine. The commands to invoke to add each additional machine interface. The commands to invoke to create new machine groups and add their members. The commands to invoke to add new members to existing machine groups. Note: We recommend that you specify the -p flag on a client definition file to verify that all stanzas are correct before using it for adding machines. |
This command returns the following exit values:
Item | Description |
---|---|
0 | Successful completion. |
!0 | An error occurred. |
Access Control: You must have root authority to run the nimdef command.
Auditing Events: N/A
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
nimdef -p -f client.defs
nimdef -d -f client.defs
nimdef -c -f client.defs > client.add
Item | Description |
---|---|
/usr/sbin/nimdef | Contains the nimdef daemon/command. |