VIOS COMMAND LINE: UNDER THE COVERS
AnthonyEnglish 270000RKFN Visits (24904)
FROM root TO padmin: THERAPY FOR AIXers
When you log in to the VIO server as padmin, you are running the VIO server restricted shell. If you're a diehard AIX sysadmin who is frustrated by the VIOS command line, it can be difficult. Even a simple command like this:
lsdev -CcdiskGives you a Usage message like this:
Well, my friend, I feel your frustration and pain, so
let me unfrustrate you!
There are three ways of dealing with your VIOS CLI Aversion Disorder (VCAD).
Allow Dr. Down Under to step you through each of these therapies.
You could check the VIOS man pages and realise that VIOS commands are consistent, predictable and even elegant.
Change commands start with ch:
How easy is that? Makes you want to keep changing the time on your system, doesn’t it? It gets better:
List commands typically start with ls
A little annoying
Now, if you're used to the AIX lsdev and lsattr commands, those VIO server lsdev and chdev commands might be a little annoying. But once you understand the reasoning behind the flags, you’ll see the sense in it all:
chdev -dev hdisk5 -attr hcheck_interval=60 –perm
And list the device attributes of hdisk5:
The VIO CLI uses the Getopt::Long options. For example,
More typing, less checking
That makes for more typing, but less looking up. You can't always guess the flag for the AIX command, because when they want to put in a new flag, AIX has been around for so long, chances are it's often been used. List long user names, for example.
Did you know you can see what the AIX commands are running under the covers? Log in as padmin and enter:
Here’s what the lsmap –all command really does:
And to configure new devices,
Then you get the advantage of running the VIOS command but also seeing what it’s really doing (we like to know. This isn’t Windows, is it?)
Therapy 3: Take the escape hatch to AIX
If the thought of a restricted shell is all too much, you can take the escape route by upgrading your shell to the full blown AIX using oem_setup_env
But you’re not supposed to! (unless you really, really have to)
Still, sometimes you want to leave the decaf skinny latte option to the people who are young enough to learn something new. I have even heard of some crusty old AIX admins who tailor the padmin .profile with
If you decide to run away at the first whiff of padmin danger, let me give you two pieces of advice: