Working with NIM resource groups

Resource groups are used to represent collections of NIM resources.

A resource group can contain multiple installp_bundle and script resources, and one resource from each of the other types. If a resource group is allocated or specified for use in a NIM operation, all applicable resources in the group are allocated to the target. The use of resource groups can save NIM administrators from having to repeatedly specify the same set of resources individually, when the allocation of a single resource group would suffice.

The command line syntax for defining a resource group is:
nim -o define -t res_group -a default=Value \
-a ResourceType=ResourceName ... ResourceGroupName
where the following attributes are optional:
Item Description
  default=Value Specifies whether a resource group should be made the default. The default value is default=no.
  ResourceType Specifies the type (for example, spot, lpp_source, script, etc.) and name of the resource to add to the group. One resource of each type may be specified, except for script and installp_bundle resources, which may have multiple resources participate in an operation.

The allocation of individual resource group members can be overridden by specifying additional resource attributes for the members to be changed.

For example, the resource group, res_grp1, contains the spot1, lpp_source1, bosinst_data1, script1, and resolv_conf1 resources. To use the resource group to perform an rte bos_inst operation on client1, but using no bosinst_data resource, and using resolv_conf2 instead of resolv_conf1, use the following command:
nim -o bos_inst -a source=rte -a group=res_group1 \
-a bosinst_data= -a resolve_conf=resolv_conf2 client1

A resource group can be specified as the default set of resources to use for all NIM operations. This is done by setting the master's default_res attribute to the name of the resource group that will be the default. When a default resource group is defined, the applicable member resources will always be automatically allocated during NIM operations, unless they are specifically overridden.

To set the default resource group to res_group1, enter:
nim -o change -a default_res=res_group1 master
or enter:
nim -o change -a default=yes res_group1
To stop using a default resource group, enter:
nim -o change -a default_res=master
or enter:
nim -o change -a default=no res_group1