Easy console access from the HMC command line
brian_s 270002K5X3 Comment (1) Visits (5793)
I would recommend never using the LPAR console from the HMC web interface. It has some serious drawbacks such as the connection being in clear text over the network and issues with copying/pasting and other interface issues (nothing compares to PuTTY :) )
The alternative is using the HMC command line. From there you have 2 options, using the "mkvterm" command or the menu based "vtmenu". vtmenu is a good option, however if you don't know which managed system the LPAR is on you can spend some time looking around for it within vtmenu. With mkvterm you must specify the managed system and lpar name on the command line.
Since most people don't have the same LPAR name defined on more than 1 system attached to the same HMC, it seems unnecessary and inefficient to have to specify the managed system name on the mkvterm command line or to have to find the correct managed system in the vtmenu. If you have a large number of systems attached to the HMC it can be hard to find, and even harder if LPAR's are frequently moved with live partition mobility.
Below is a simple function that will make a new "console" command available from the HMC. Once this is setup, you simply type "console lparname" and it will find the managed system the LPAR is on and run the proper mkvterm command.
The easiest way to make this available is to create a file in your home directory using the command "rnvi -f functions", then copy and paste the function above in to the file. Each time you login you will then need to run "source functions" and the "console" command will then be available. If the HMC wasn't locked down you could just put this in the .bashrc file and it would be available all the time, but unfortunately the HMC is locked down so much that you need to create a separate file and source it each time you login.
When you run "console lparname" it will display the mkvterm command that is being run so you can see which managed system the LPAR is on. If there are multiple managed systems with the same LPAR name it will pick the first one it finds.