Solved

Command line to define LPARs on HMC

Posted on 2011-09-06
3
2,000 Views
Last Modified: 2013-11-17
Hi, I am trying to use a scripted method to create LPARs on our P7 server via our HMC. I keep getting an error about 'the format of the configuration is invalid' and 'nest double quotes'.  I have tried various options but none want to work.

I have tried this using both the CLI with '-i' and also within a config file with 'f'.

Here are two examples of my code variation that fails;

 
mksyscfg -m P7SYSTEM -r lpar -i "name=LPAR01,profile_name=normal,lpar_env=aixlinux,\
all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,\
min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,\
desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,\
boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none,\
work_group_id=none,shared_proc_pool_util_auth=1,max_virtual_slots=20,\
"virtual_fc_adapters=21/client/2/VIOS1/21//1,41/client/2/VIOS2/41//1,\
22/client/1/VIOS1/22/1,42/client/2/VIOS2/42/1",\
"virtual_eth_adapters=196/0/200//1/1/ETHERNET0//all/none,\
197/0/201//1/1/ETHERNET0//all/none""

Open in new window


or

 
mksyscfg -m P7SYSTEM -r lpar -f testlpar.cfg

where testlpar.cfg looks like;

name=LPAR01
profile_name=normal
lpar_env=aixlinux
all_resources=0
min_mem=1024
desired_mem=9216
max_mem=9216
proc_mode=shared
min_proc_units=0.3
desired_proc_units=1.0
max_proc_units=3.0
min_procs=1
desired_procs=3
max_procs=3
sharing_mode=uncap
uncap_weight=128
lpar_io_pool_ids=none
boot_mode=norm
conn_monitoring=0
auto_start=0
power_ctrl_lpar_ids=none
work_group_id=none
shared_proc_pool_util_auth=1
max_virtual_slots=20
virtual_fc_adapters=21/client/2/VIOS1/21//1,41/client/2/VIOS2/41//1,22/client/1/VIOS1/22/1,42/client/2/VIOS2/42/1
virtual_eth_adapters=196/0/200//1/1/ETHERNET0//all/none,197/0/201//1/1/ETHERNET0//all/none

Open in new window


I am fairly sure I am close, just can't quite figure it out :-(

HMC is V7 r7.2.0.1


Cheers, JP.
0
Comment
Question by:popesy
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 36487095
!) Command line

Add the two missing slashes and escape the nested quotes, like:

...
work_group_id=none,shared_proc_pool_util_auth=1,max_virtual_slots=20,\
\"virtual_fc_adapters=21/client/2/VIOS1/21//1,41/client/2/VIOS2/41//1,\
22/client/1/VIOS1/22//1,42/client/2/VIOS2/42//1\",\
\"virtual_eth_adapters=196/0/200//1/1/ETHERNET0//all/none,\
197/0/201//1/1/ETHERNET0//all/none\""

2) Configuration file

Add the two missing slashes, add commas at the line ends and enclose the attribute/value pairs which specify a list in double qoutes, like

name=LPAR01,
profile_name=normal,
lpar_env=aixlinux,
all_resources=0,
min_mem=1024,
desired_mem=9216,
max_mem=9216,
proc_mode=shared,
min_proc_units=0.3,
desired_proc_units=1.0,
max_proc_units=3.0,
min_procs=1,
desired_procs=3,
max_procs=3,
sharing_mode=uncap,
uncap_weight=128,
lpar_io_pool_ids=none,
boot_mode=norm,
conn_monitoring=0
auto_start=0,
power_ctrl_lpar_ids=none,
work_group_id=none,
shared_proc_pool_util_auth=1,
max_virtual_slots=20,
"virtual_fc_adapters=21/client/2/VIOS1/21//1,41/client/2/VIOS2/41//1,22/client/1/VIOS1/22//1,42/client/2/VIOS2/42//1",
"virtual_eth_adapters=196/0/200//1/1/ETHERNET0//all/none,197/0/201//1/1/ETHERNET0//all/none"

wmp
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36487266
Note:

You're setting max_virtual_slots to 20 but you're defining virtual slots with numbers 21, 41, 22, 42, 196 and 197.

That's wrong, because max_virtual_slots defines not only the number of slots but also the highest allowable slot number!

So either use lower virtual slot numbers or set max_virtual_slots at least to 197.
0
 
LVL 4

Author Closing Comment

by:popesy
ID: 36487511
Thanks wmp, I knew I wasn't far off!

JP
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now