Save LPAR running configs to profiles for all LPAR's on a frame
brian_s 270002K5X3 Comments (4) Visits (13408)
Shutting down a frame with a lot of servers on it can be scary. Often times changes have been "DLPAR'ed" in to LPAR's/VIO's but the LPAR profile wasn't also updated. So the next time the LPAR is shut down, these changes are lost. This can be especially bad if you are talking about virtual adapters that have been DLPAR'ed in to VIO servers or clients. You really don't want to loose your NPIV virtual FCS adapters and their WWPN's!
Here is a command line you can run from the HMC that for any given managed system will save every LPAR's running configuration to its current profile. You might want to consider running something like this before you shutdown a frame if you are not sure if the running configurations are out of sync with the profiles. Just update the system="p520" part with the name of one of your managed systems.
system="p520"; for lpar in `lssyscfg -m $system -r lpar -F "name,state" | grep ",Running$" | cut -d, -f 1`; do echo Saving running config to profile for $lpar; mksyscfg -r prof -m $system -o save -p $lpar -n `lssyscfg -r lpar -m $system --filter lpar_names=$lpar -F curr_profile` --force; done