Informing the IBM Community

AIX tech tip: make friends with the VIOS command syntax

0
(0)

AIX tech tips

If you are familiar with running commands on AIX, you may have logged onto the Virtual I/O Server and found the syntax frustrating. For example, the following command on AIX will list disks:

lsdev –Cc disk

But when you’re logged into the restricted shell on the VIOS (usually as the user ‘padmin’), that will give you a syntax error. What you were meant to run was this:

lsdev –type disk

The VIOS syntax is remarkably similar to AIX commands but different enough to make an experienced AIXer frustrated. If you’re someone not used to working on AIX, the VIOS command syntax will appear a lot easier because your fingers won’t be pre-programmed to type in tried and true AIX syntax.

For the AIXperts, it’s often tempting to go to the full, unrestricted shell by logging in as padmin and then running the command

oem_setup_env

This is a pretty risky strategy, as is explained in the command documentation:

The oem_setup_env command will place the padmin user in a non-restricted UNIX root shell with a home directory in the /home/padmin directory. The user can then run any command available to the root user. This is not a supported Virtual I/O Server administration method. The purpose of this command is to allow installation of vendor software, such as device drivers.

My advice is to get used to the VIOS command line interface. Once you realise that there are certain patterns in the VIOS commands it will get a lot easier to use. For example, most commands to list start with “ls”. The commands to change devices begin with “ch”, and “rm” is used to remove.

So far, you’re probably thinking: big deal, AIX does the same. Well, once you get to the flags, you will start to learn them and maybe even start to like them.

Devices will be called with the –dev flag, attributes with the –attr flag. Here’s how to list the attributes for hdisk45:

lsdev –dev hdisk45 –attr

If you want to find out more about the VIOS restricted shell, you can check out the official command documentation for VIOS.

You might also find these articles helpful:

Get to Know the VIOS CLI

The VIO Cheat Sheet

Anthony English has worked on IBM Power Systems and their predecessors since the first commercial release of AIX. He is a well-recognised author in the field of IT, and has some unique perspectives on technical and business-related topics. Anthony is based in Sydney with his wife and seven young children.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.