?
Solved

Command line to define LPARs on HMC

Posted on 2011-09-06
3
Medium Priority
?
2,058 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

649 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