Scripted LPAR building

Scenario: we have to build many lpars but we are too lazy to do the job manually:
Here comes the magic of hmc and its tools that give us the chance to think before and relax later …when the script will execute the job.
From HMC we can type :

mksyscfg -r lpar -m -i name=[LPARNAME], profile_name=[PROFILENAME],lpar_id=10, lpar_env=”aixlinux”, min_mem=4096, desired_mem=8192, max_mem=12800, proc_mode=shared, min_procs=1, desired_procs=2, max_procs=4, min_proc_units=0.2, desired_proc_units=0.4, max_proc_units=1, sharing_mode=uncap, uncap_weight=128, conn_monitoring=1, boot_mode=norm, max_virtual_slots=200, virtual_eth_adapters=2/0/603//0/0/

This will create the lpar profile in hmc , only the disk adapters are missing .

Now we can tell the nim about the new lpars and their ip address , writing them in /etc/hosts manually or using hostent command:

hostent -a [IP] -h [HOSTNAME]

At this point we can define the nim object , doing :

nim -o define -t standalone -a platform=chrp -a if1=”find_net [HOSTNAME] 0″ -a cable_type1=tp -a net_settings1=”auto auto” -a netboot_kernel=64 [HOSTNAME]

and start the installation from nim , to do so we must have a spot and a mksysb defined:

nim -o bos_inst -a source=mksysb -a spot=spot-[HOSTNAME] -a mksysb=mksysb-[HOSTNAME] -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes [HOSTNAME]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.