Everyone starts with zero...
resources on the NIM server
OK, you are right! Not really. When you install and configure the NIM, it creates at least the network resource - you must name it, and the master server (or machine) resource. Then you define your lpp_sources, SPOTs, machines, and you are ready to install AIX or VIOS. Almost…
If you like to click through menus or type longer commands, it should be enough.
In reality, if you want to automate your installations, you need several more resources.
bosinst_data
The first resource you need is of type bosinst_data. This resource describes which AIX components should be installed and which disk to use for the installation.
You can find an example of this file in /var/adm/ras/bosinst.data on your AIX server. Or read the file /usr/lpp/bosinst/bosinst.template.README.
The easiest way is to copy your existing /var/adm/ras/bosinst.data into some file like:
# mkdir /nim/bi
# cp /var/adm/ras/bosinst.data /nim/bi/bi_defaultThen you can create the bosinst_data resource:
# nim -o define -t bosinst_data -a server=master -a location=/nim/bi/bi_default bi_defaultYou can now check the file and edit it as you wish. If you need different installation types for different systems, copy the file again and create another resource with a different name.
Check the syntax of the file every time you make changes using the bicheck command:
# /usr/lpp/bosinst/bicheck bi_default
0512-206 bicheck: Stanza: control_flow
The PROMPT value can be blank, 'yes', or 'no'.
The value of PROMPT is: falseThe file has the standard stanza format, which is very common in AIX. You write a stanza, attributes, and their values in a stanza like:
stanza1:
attribute1 = value
attribute2 = value
stanza2:
attribute3 = valueThe stanzas, the attributes, and the possible values can vary from one AIX version to another. If the file works for AIX 7.3, it must not work for AIX 6.1, and vice versa.
Minimal bosinst.data file
Some stanzas are required, such as control_flow; others are optional and can be omitted.
The minimum file that passes the check is:
control_flow:
locale:
But don’t expect too much from it.
This is maybe the smallest useful example:
control_flow:
CONSOLE = Default
INSTALL_METHOD = overwrite
INSTALL_EDITION = standard
PROMPT = no
EXISTING_SYSTEM_OVERWRITE = yes
ACCEPT_SWMA = yes
locale:
BOSINST_LANG = en_US
CULTURAL_CONVENTION = en_US
MESSAGES = en_US
KEYBOARD = de_DEIt automatically installs AIX and accepts the software maintenance agreement. If an existing AIX installation is found, it is overwritten on the same disk as the current rootvg.
More comprehensive example
I personally prefer to explicitly switch off all options I don’t need and switch on all that I need:
control_flow:
CONSOLE = Default
INSTALL_METHOD = overwrite
INSTALL_EDITION = standard
PROMPT = no
EXISTING_SYSTEM_OVERWRITE = yes
ACCEPT_LICENSES = yes
ACCEPT_SWMA = yes
INSTALL_X_IF_ADAPTER = no
RUN_STARTUP = no
RECOVER_DEVICES = no
DESKTOP = NONE
INSTALL_DEVICES_AND_UPDATES = no
ALL_DEVICES_KERNELS = no
GRAPHICS_BUNDLE = no
SYSTEM_MGMT_BUNDLE = no
BOSNET_FTP_TELNET_BUNDLE = no
KERBEROS_5_BUNDLE = no
SERVER_BUNDLE = no
HARDWARE_DUMP = yes
ADD_CDE = no
ADD_KDE = no
ADD_GNOME = no
SECURE_BY_DEFAULT = no
SIGN_POLICY = no
ENCRYPTLV = no
IMPORT_USER_VGS = no
locale:
BOSINST_LANG = en_US
CULTURAL_CONVENTION = en_US
MESSAGES = en_US
KEYBOARD = de_DEIf you turn everything off, the installation takes less time.
Of course, all possible values you can find in the template file, I referred to above.
Logical volume encryption
If you want to encrypt logical volumes in rootvg, you can add the corresponding stanza:
lv_encryption:
ROOT_HD4 = yes
USR_HD2 = yes
VAR_HD9VAR = yes
TMP_HD3 = yes
HOME_HD1 = yes
OPT_HD10OPT = yes
ADMIN_HD11ADMIN = yes
DUMPLV = yes
PAGING_HD6LV = yes
LIVEDUMPLV = yesFinding the target disk
The easiest way is to have only one disk on your AIX when you install it. Then you don’t need to bother about which disk is suitable for the installation.
But if you are not a lucky one guy (why?), you can define the target_disk_data stanza:
target_disk_data:
PVID = 00fb3aca9c0a8fc1
PHYSICAL_LOCATION = U8284.22A.0000000-V7-C2-T1-L100000000
CONNECTION = vscsi0//100000000
LOCATION = none
SIZE_MB = 40960
HDISKNAME = hdisk0This is an example from my test installation on a VSCSI disk. In “normal life,” your disk probably has no PVID at installation time, and you may know only how to access the disk (CONNECTION or PHYSICAL_LOCATION) or its size.
That’s why, if you make a fresh installation, assign only the boot disk to the LPAR, install AIX, and then assign all other disks you need.
If you reinstall AIX, you can use the PVID of the existing boot disk to make sure that AIX is installed on the correct disk.
Support 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!
Is that all?
No, it is only the beginning of our NIM journey.
We will create several more resources to automate AIX installations.
Meanwhile, you can create your own bosinst.data file. Or think about how to automatically customize it for your needs before each new installation.
Have fun with AIX NIM!
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.



