NIM Commands
Contents
- Introduction: Objects and Classes
- Command Overview
- Listing all defined NIM objects
- Listing all defined objects of a specific class
- Listing all defined objects of a specific type
- Showing an object's definition
- Defining an LPP source
- Defining a network
- Defining a NIM client
- Defining an MKSYSB resource
- Migrating an MKSYSB to a new AIX Level
- Defining a SAVEVG resource
- Defining an image_data resource
- Creating a spot from an LPP source
- Creating a spot from an MKSYSB
- Prepare spot and LPP source for an Alternate Disk Migration
- Modifying a client definition
- Re-initializing a client
- Installing a client
- Installing a client with an MKSYSB image
- Creating an mksysb backup from a NIM client
- Reset a NIM client
- Query a client for installed APARs
- Query a client for installed filesets
- Enabling a maintenance boot
- Start an Alternate Disk Migration
- Related Information
A. Introduction: Objects and Classes
NIM (the Network Installation Manager) stores all information needed for the installation of servers in objects. Objects are organized in object types and object classes. Here is an overview of the most important object types and classes:
Class | Type | Description |
---|---|---|
machines | standalone | the client LPAR to be installed via NIM |
networks | ent | network definition (network address, gateway) |
resources | lpp_source | a set of AIX filesets |
resources | mksysb | an mksysb image |
resources | spot | a /usr filesystem |
resources | fb_script | script, to be executed during the first boot after installation |
resources | script | a postinstall script |
B. Command Overview
1. Listing all defined NIM objects
# lsnim
2. Listing all defined objects of a specific class
# lsnim -c <class
>
3. Listing all defined objects of a specific type
# lsnim -t <type
>
4. Showing an object's definition
# lsnim -l <object
>
5. Defining an LPP source
# nim -o define -t lpp_source \ -a server=master \ -a location=</path/to/bffs
> \ -a comments=<free text
> \ <lpp source
>
6. Defining a network
# nim -o define -t ent \ -a net_addr=<netaddress
> \ -a snm=<netmask
> \ -a routing1="default <gateway
>" \ <network
>
7. Defining a NIM client
# nim -o define -t standalone \ -a platform=chrp \ -a netboot_kernel=64 \ -a if1="<network
> <ip label
> 0 ent" \ -a cable_type1=tp \ <client
>
You could also use an ip address instead of an ip label here
8. Defining an MKSYSB resource
# nim -o define -t mksysb \ -a server=master \ -a comments="<free text
>" \ -a location=</path/to/image
> \ <mksysb
>
9. Migrating an MKSYSB to a new AIX Level
It is possible to migrate an existing mksysb from AIX 6.1 to AIX 7.1 directly on the NIM server:
# nimadm -T <source mksysb
> \ -O <target location
> \ -s <spot
> \ -l <lpp_source
> \ -j <volume group
> -Y -N \ <target mksysb
>
This command creates a new MKSYSB resource containing the migrated mksysb ready for installation. Spot and LPP source have to be of the target AIX level. The volume group is needed for restoring the mksysb and needs enough free space.
10. Defining a SAVEVG resource
# nim -o define -t savevg \ -a server=master \ -a comments="<free text
>" \ -a location=</path/to/image
> \ -a source=<client
> \ -a mk_image=yes \ -a volume_group=<Volume Group
> \ <savevg
>
This command will first create the image of the named VG of the NIM client.
11. Defining an image_data resource
# nim -o define -t image_data \ -a server=master \ -a comments="<free text
>" \ -a location=</path/to/image_data
> \ <image_data
>
12. Creating a spot from an LPP source
# nim -o define -t spot \ -a server=master \ -a source=<lpp source
> \ -a location=<directory
> \ -a comments="<free text
>" \ <spot
>
13. Creating a spot from an MKSYSB
# nim -o define -t spot \ -a server=master \ -a source=<mksysb
> \ -a location=<directory
> \ -a comments="<free text
>" \ <spot
>
Use the base directory for your spots here rather than a spot specific directory. NIM automatically creates a subdirectory with the name
of the spot object: < spot
>
14. Prepare spot and LPP source for an Alternate Disk Migration
# nimadm -M -s <spot
> -l <lpp source
> -d <source directory
>
In < source directory
> NIM searches for the two filesets «bos.alt_disk_install.rte» and «bos.alt_disk_install.boot_images».
nimadm then updates spot and LPP source with these two filesets. This way you can migrate a client to a lower AIX level then the level of the NIM server itself.
This feature has been added to NIM with AIX 7.1.
15. Modifying a client definition
# nim -o change -a <attribute
>=<value
> <client
>
You find the exact names of valid attributes in the output of lsnim -l <client>
. The option change is used
to change the value of an attribute, e.g. if you want to change a client's netboot kernel from 64
to mp
you would type:
# nim -o change -a netboot_kernel=mp <client
>
16. Re-initializing a client
If a client's /etc/niminfo
is out of date. It can be rewritten by the below procedure:
client# rm /etc/niminfo client# niminit -a name=<client
> -a master=<nimserver
> -a connect=nimsh¹ client# nimclient -C
This procedure is useful if you want to move a client from one NIM server to another. In this case remember to first create the client on the server before running this procedure.
17. Installing a client
# nim -o bos_inst \ -a spot=<spot
> \ -a lpp_source=<lpp source
> \ -a fb_script=<script
> \ -a script=<postinstall script
> \ -a no_client_boot=yes \ -a accept_licenses=yes \ <client
>
Use the option no_client_boot=yes
if you don't want NIM to initiate a reboot of your LPAR over rsh.
You have to manually boot the LPAR from the SMS menu then - what is probably what you want.
18. Installing a client with an MKSYSB image
# nim -o bos_inst \ -a source=mksysb \ -a spot=<spot
> \ -a mksysb=<mksysb
> \ -a lpp_source=<lpp source
> \ -a fb_script=<script
> \ -a script=<postinstall script
> \ -a no_client_boot=yes \ -a accept_licenses=yes \ <client
>
19. Create an MKSYSB Backup from a NIM Client
# nim -o define -t mksysb -a server=master \ -a location=<path/to/mksysb
> \ -a mk_image=yes \ -a source=<client
> \ <mksysb
>
20. Reset a NIM client
# nim -F -o reset <client
>
resets a NIM client so new operations can be done. Please note that often it's not enough to just reset a NIM object because there
are still resources allocated for the client. You find all resources still allocated to the client with lsnim -l <client>
.
They can be removed with:
# nim -o deallocate -a spot=<spot
> -a ...=... <client
>
To remove all resources from a client simply run:
# nim -o deallocate -a subclass=all <client
>
21. Query a client for installed APARs
# nim -o fix_query <client
>
This command might be useful to check for your nimserver can reach the client.
22. Query a client for installed APARs
# nim -o lslpp <client
>
This command might be useful to check for your nimserver can reach the client.
23. Enabling a maintenance boot
# nim -o maint_boot -a spot=<spot
> <client
>
Now you can boot your client over the network into a maintenance shell.
24. Start an Alternate Disk Migration
# nimadm -c <client
> -l <lpp source
> -s <spot
> -d <hdisk
> -Y
C. Related Information