?
Solved

Command line to define LPARs on HMC

Posted on 2011-09-06
3
Medium Priority
?
2,072 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:John Pope
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1000 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 5

Author Closing Comment

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

JP
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

840 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