Nowadays, I’m preparing for huge hardware delivery. I’m about to get dozen of MMD’s. The challenge is to configure them (LPAR profiles, VIOS, etc) as soon as possible. I found the way how to automate creation of multiple VIO/LPAR profiles including I/O configuration for multiple servers without knowing SN of the expansions drawers.
This is possible because, all machines I’m going to have are in the same hardware specification, including the same card placement across them. Each MMD has 4 VIO servers, in 4 CEC configuration, over 30 I/O card installed. This is still huge amount of work, if each VIO would be done from the HMC GUI.
Creating a VIO profile on the HMC GUI is usually a lot of fun, and pretty straight forward. But in my case, where everything is multiply, it’s a lot of work.
We usually use the HMC GUI for LPAR configuration, because you have to know/see a card location (Serial Number of a CEC/expansion drawer, slot number). I found that you can automate this from the CLI, because you can use a Dynamic Reconfiguration Connector index (drc_index). Detailed information you can find here. Moreover, it looks that for all MMDs, a specific drc_index refers to the same slot number in the same CEC.
For instance drc_index=2101028C always refers to the same slot in my configuration (CEC3, card slot C6). To display a drc_index, submit a command
lshwres -r io -m SERVER1 –rsubtype slot -F drc_index,description,unit_phys_loc,phys_loc
Having such information, it’s very easy to build a simple script or program. It will build entire VIO/LPAR profile including all I/O cards, SAS adapters and all necessary parameters.
As an example, here is my command which I use to build a VIO profile.
mksyscfg -r lpar -m SERVER1 -i “name=SERVER1-VIOS1, profile_name=VIOS1,lpar_env=vioserver,min_mem=1024,desired_mem=1024, max_mem=2048,proc_mode=ded,min_procs=1,desired_procs=2,max_procs=3, sharing_mode=share_idle_procs_always, auto_start=1,max_virtual_slots=200,auto_start=1, conn_monitoring=0,boot_mode=norm, \”io_slots=21010208/none/1,21010288/none/1\””
In the example above, I only specified SAS adapters to the VIO profile. All I/O LAN,SAN cards I’m adding with another script, to be sure that each specific adapter has ent, fcs name what I’m expecting. For example card in slot C3 will get ent2,ent3.