The most important part of any NIM server
It is their resources!
We create an AIX NIM server because we want to install other AIX or VIO servers, or we want to update them, or install fixes. Or simply do something with them. But we can do it only if we have resources on the NIM server. There are many different types of resources that we can use.
Do you want to see how many different resource types your NIM server can manage?
Issue the command:
lsnim -p -c resourcesOn my lab NIM server, there are 36 resource types. No, I don’t know all of them. I think I don’t even know how to use half of them.
Installation resources
If we want to install or update our AIX servers, we must have at least one lpp_source and one SPOT resource.
An lpp_source resource is simply a directory with the software packages. In its simplest form, it is enough to create a directory, put some packages into it, and create a table of contents file.
In its official form, it has its own structure. It can have several subdirectories, one per each package type - RPMS, emgr, installp, or ismp. Under each directory, there is a subdirectory named after the architecture. Now it is ppc only, but do you know that AIX had a version for Intel Itanium?
SPOT means Shared Product Object Tree. It is like a small installed AIX. In reality, it is more or less only /usr from an AIX installation. According to the documentation, you can even copy /usr from any AIX installation and use it as a SPOT resource. I never tried it, but who knows what I will do tomorrow?..
Important is to remember that if you have problems during the installation, like AIX didn’t recognize your storage, you can solve some of them by adding packages to your SPOT resource.
Creating an lpp_source
To create an lpp_source, you need your software. If you want to install AIX, you need an AIX image. The easiest way is to download an AIX flash image from IBM’s Entitled Systems Support site.
Of course, you can take a DVD image from the same site, or use your older existing lpp_source and update it to the latest version. I only wrote that in my opinion it is faster and easier to download the full flash image and create an lpp_source from it.
You also must have enough space before creating an lpp_source.
Even more important is a good naming convention for your resources.
If you don’t have one, use the output of oslevel -s from the installed system and add the resource type to it. For AIX 7.3 TL3 SP1 it would be:
7300-03-01-2520-lpp_source for the lpp_source
7300-03-01-2520-spot for the SPOT
I have my new flash image with AIX 7.3 TL4 in /nim/iso/AIX_v7.3_Install_7300-04-00-2546_flash_122025_LCD8265308.iso and I will use it to create my new lpp_source.
First, I must mount it somewhere. Because it is a USB flash image, we use the filesystem UDFS instead of CDRFS for DVD images:
loopmount -i /nim/iso/AIX_v7.3_Install_7300-04-00-2546_flash_122025_LCD8265308.iso -m /mnt -o "-V udfs -r"Now we run only one command and several minutes later the lpp_source is created:
nim -o define -t lpp_source -a server=master -a source=/mnt -a packages=all -a location=/nim/lpp/7300-04-00-2546-lpp_source 7300-04-00-2546-lpp_source-a source=/mnt is the directory where I mounted my flash image
-a packages=all means that I want to copy all packages that can be found there
-a location=/nim/lpp/7300-04-00-2546-lpp_source is the directory where the lpp_source will be created. I prefer to have directory names same as my lpp_source names. It makes it easier to find them.
7300-04-00-2546-lpp_source is the name of the new lpp_source.
What can go wrong here? Almost nothing.
I don’t remember ever having any problems with AIX images. OK, there were several times when IBM pushed another image a week after the first one, or made urgent updates to images.
If you create an lpp_source not for AIX, but for your software, check permissions on files. It can happen, and it happened to me many times that the software has wrong permissions on files like 0400, or they are owned by strange users. In this case, the files are copied with the ownership and permissions as they are defined on the filesystem. Later, you try to install the software and fail, because the client can’t access the files.
After the AIX lpp_source is created, you can unmount the image and remove it.
If you want to add fixes to your lpp_source, you can use the gencopy command:
gencopy -d /nim/fixes/nim_fix2 -t /nim/lpp/7300-03-01-2520-lpp_source IJ55897m1a.251112.epkg.ZIt automatically creates the required structure.
Of course, you remember what I told you about permissions? It applies to fixes, too.
You can use the update operation to add 3rd-party software to your lpp_source. The following command adds Dell/EMC ODM storage definitions to an lpp_source:
nim -o update -a source=/mnt/DellEMC.AIX.6.3.0.2 -a packages=all 7300-03-01-2520-lpp_sourceCreating a SPOT resource
After you have an lpp_source, you can create a SPOT resource from it.
Again, this is only one command and many minutes to wait.
nim -o define -t spot -a server=master -a location=/nim/spot -a source=7300-04-00-2546-lpp_source 7300-04-00-2546-spotNote that we specify the parent directory when we create a SPOT, not the target directory, as with lpp_source.
Additionally, NIM creates several network boot files in /tftpboot during SPOT creation. They have the same name as the SPOT. That’s why it is a good idea to have /tftpboot in a separate filesystem.
Sometimes you may wish to add a security fix to your SPOT. Especially if you’ve read the README for the famous nim_fix2.
Usually, you can do it by “customizing” your SPOT:
nim -o cust -a lpp_source=7300-03-01-2520-lpp_source -a filesets=IJ55897m1a.251112.epkg.Z 7300-03-01-2520-spotBut with the mentioned fix, you must first specify the environment variable FORCE_SCRIPTS=yes:
FORCE_SCRIPTS=yes nim -o cust -a lpp_source=7300-03-01-2520-lpp_source -a filesets=IJ55897m1a.251112.epkg.Z 7300-03-01-2520-spotOf course, you can use the same command to add required drivers to your SPOT:
nim -o cust -a lpp_source=7300-03-01-2520-lpp_source -a filesets=EMC 7300-03-01-2520-spotSupport the Power DevOps Newsletter!
If you like reading technical articles about IBM Power, AIX, and Linux on IBM Power, consider upgrading to the paid tier to show your support. As a paid subscriber, you not only get regular posts, but you will get additional posts with the full code and further explanations, access to the whole archive of the blog, and take part in our monthly calls where you can ask your questions and propose topics for future newsletters. Be an active member of our community!
Oh, it’s almost Christmas!
I finished writing the newsletter and noticed that my next newsletter will be one day after Christmas. The year is almost over again! If you are one of those who celebrate Christmas, I wish you a merry Christmas. This is a wonderful time. Here in Germany, it is dark in December, but when I see many houses with lights, it is so light, and the villages look so beautiful! The best thing you can do during this time is visit some of Germany's famous Christmas markets, like Frankfurt near me, or Cologne, or Dresden, or Nuremberg, or Rothenburg ob der Tauber. All of them are beautiful.
But if you didn’t get to Germany this year, you can install AIX using your NIM server and your freshly defined NIM resources.
Have fun with your NIM server!
Andrey
Hi, I am Andrey Klyachkin, IBM Champion and IBM AIX Community Advocate. This means I don’t work for IBM. Over the last twenty years, I have worked with many different IBM Power customers all over the world, both on-premise and in the cloud. I specialize in automating IBM Power infrastructures, making them even more robust and agile. I co-authored several IBM Redbooks and IBM Power certifications. I am an active Red Hat Certified Engineer and Instructor.
Follow me on LinkedIn, Twitter and YouTube.
You can meet me at events like IBM TechXchange, the Common Europe Congress, and GSE Germany’s IBM Power Working Group sessions.



