?
Solved

Command line to define LPARs on HMC

Posted on 2011-09-06
3
Medium Priority
?
2,041 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
[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 4

Author Closing Comment

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

JP
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machineā€¦
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consolā€¦
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses

762 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