Hi!
I have a shell script that runs on a utility server to build VIO's and LPARs. The script interrogates a HMC and builds a number of partitions based on the resources available. Amongst other things it selects 'required' resources and defines Virtual Ethernet and SCSI adapters using aslot assignment criteria we employ.
I have a problem, not with mksyscfg, but rather with how to use it with SSH.
This kind of simple routine works fine from the NIM, sshíng to the HMC;
ssh zk152hmc-eth1 "mksyscfg -r lpar -m <frame name> -i
\"profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name from script>\""
This, with a bit more complexity, works fine through SSH;
ssh zk152hmc-eth1 "mksyscfg -r lpar -m <frame name> -i
\"profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name selected by script>\"\"io_slots=21010222//1\""
When I try to add some more argument though to the io_slots or in adding virtual ethernet adapters, I come unstuck.
This sort of routine works fine on the HMC', without SSH;
mksyscfg -r lpar -m <frqame name> -i "profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name chosen by script>,\"io_slots=21010222//1,21010227//1,21010200//1\",\"virtual_eth_adapters=30/1/1/30/0/1,31/1/31//0/1,32/1/32//0/1,33/1/33//0/1\"""
But I can't find any combination of double speech marks, single speech marks and escapes that will have the above routine accepted by SSH. I could of course just resort to chsyscfg for the awkward bits, but it would be nice to wrap the whole lot into one, so I can activate the VIOS with the
next routine and move on to identifying the remaining resources for the next VIOS.
Any assistance or working examples will be very helpful. The examples I've seen to date have just one argument to attributes like 'virtual_eth_adapters'.
Thanks!
avalon
I have a shell script that runs on a utility server to build VIO's and LPARs. The script interrogates a HMC and builds a number of partitions based on the resources available. Amongst other things it selects 'required' resources and defines Virtual Ethernet and SCSI adapters using aslot assignment criteria we employ.
I have a problem, not with mksyscfg, but rather with how to use it with SSH.
This kind of simple routine works fine from the NIM, sshíng to the HMC;
ssh zk152hmc-eth1 "mksyscfg -r lpar -m <frame name> -i
\"profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name from script>\""
This, with a bit more complexity, works fine through SSH;
ssh zk152hmc-eth1 "mksyscfg -r lpar -m <frame name> -i
\"profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name selected by script>\"\"io_slots=21010222//1\""
When I try to add some more argument though to the io_slots or in adding virtual ethernet adapters, I come unstuck.
This sort of routine works fine on the HMC', without SSH;
mksyscfg -r lpar -m <frqame name> -i "profile_name=normal,lpar_env=vioserver,min_mem=1024,desired_mem=2048,max_mem=4096,proc_mode=shared,min_proc_units=0.1,desired_proc_units=0.1,max_proc_units=1,min_procs=1,desired_procs=1,max_procs=2,sharing_mode=uncap,uncap_weight=250,max_virtual_slots=200,boot_mode=norm,name=<vios name chosen by script>,\"io_slots=21010222//1,21010227//1,21010200//1\",\"virtual_eth_adapters=30/1/1/30/0/1,31/1/31//0/1,32/1/32//0/1,33/1/33//0/1\"""
But I can't find any combination of double speech marks, single speech marks and escapes that will have the above routine accepted by SSH. I could of course just resort to chsyscfg for the awkward bits, but it would be nice to wrap the whole lot into one, so I can activate the VIOS with the
next routine and move on to identifying the remaining resources for the next VIOS.
Any assistance or working examples will be very helpful. The examples I've seen to date have just one argument to attributes like 'virtual_eth_adapters'.
Thanks!
avalon