Tuesday 28 July 2015

NIM Commands

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:

ClassTypeDescription
machinesstandalonethe client LPAR to be installed via NIM
networksentnetwork definition (network address, gateway)
resourceslpp_sourcea set of AIX filesets
resourcesmksysban mksysb image
resourcesspota /usr filesystem
resourcesfb_scriptscript, to be executed during the first boot after installation
resourcesscripta postinstall script

B. COMMAND OVERVIEW

1. LISTING ALL DEFINED NIM OBJECTS

# lsnim

2. LISTING ALL DEFINED OBJECTS OF A SPECIFIC TYPE

# lsnim -t <type>

3. SHOWING AN OBJECT'S DEFINITION

# lsnim -l <object>

4. DEFINING AN LPP SOURCE

# nim -o define -t lpp_source \
            -a server=master \
            -a location=</path/to/bffs> \
            -a comments=<free text> \
        <lpp source>

5. DEFINING A NETWORK

# nim -o define -t ent \
          -a net_addr=<netaddress>  \
          -a snm=<netmask>  \
          -a routing1="default <gateway>" \
       <network>

6. 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

7. DEFINING AN MKSYSB RESOURCE

# nim -o define -t mksysb \
        -a server=master \
        -a comments="<free text>" \
        -a location=<directory> \
    <mksysb>

8. 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>

9. 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>

10. 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>

11. 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.

12. 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>

13. 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¹

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.

¹ "-a connect=nimsh" is optional and only required if you don't want the NIM server to communicate via rsh with the client.

14. 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.

15. 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>

16. 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>

17. QUERY A CLIENT FOR INSTALLED APARS

# nim -o fix_query <client>

This command is useful to check for your nimserver can reach the client.

18. 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.

19. START AN ALTERNATE DISK MIGRATION

# nimadm -c <client> -l <lpp source> -s <spot> -d <hdisk> -Y

1 comment:

  1. We tried to get pregnant for a few years in a local clinic. There were no results. We've tried everything possible but nothing. We were recommended to use eggs. I know we have to go abroad. I was terrified. I didn't know where to go and where to begin my search. When my friend recommended Dr Itua to me from western Africa I thought she was joking. I knew nothing about that country but I know they have powerful gifts on herbal medicines and I was afraid because of the language barrier. Anyway, she convinced me to give it a try. She told me that Dr Itua can also cure my prostate cancer which gives me more motivation to give a try to Dr Itua herbal center medicines. I've done the research and thought that maybe this really is a good idea. Dr Itua has reasonable prices. I ordered two four bottles and I drank it as instructed and everything went well. My prostate cancer is gone. Also it has high rates of successful treatments. Plus it uses natural herbs. Well I should say I was convinced. We contacted Dr Itua and now we can say it was the best decision in our lives. We were trying for so long to have a child and suddenly it all looked so simple. Dr Itua was so confident and hopeful he projected those feelings on me too. I am so happy to be a mother and eternally thankful to Dr Itua herbal Cure . Don’t be afraid and just do it!
    Dr Itua can cure the following diseases: Sickle Cell,Hiv,Herpes,Shingles, Hepatitis B,Liver Inflammatory,Diabetes,Fibroid,Parkinson's,Alzheimer’s disease,Bechet’s disease,Crohn’s disease,Lupus,Hpv,Weak Erection,Infertility,fibromyalgia,Chronic Diarrhea,Get Your Ex Back,Als,SYPHILIS,Cancer,Autism,Genetic disease,Epilepsy, Parkinson's disease, Doctor Itua Contact Email: drituaherbalcenter@gmail.com Or Whats-App Chat : +2348149277967

    ReplyDelete