Topics: HMC, System Admin

Command line update of HMC

This is how you update your HMC form version 7.9.0 to service pack 3 and all necessary fixes. At the time of writing, service pack 3 is the latest available service pack, and there are 2 fixes available for V7 R7.9.0 SP3, called MH01587 and MH01605. So the following procedure assumes that your HMC is currently at the base level of version 7.9.0, without any additional fixes or service packs installed.

This procedure is completely command line based. For this to work, you need to be able to ssh into the HMC using the hscroot user. For example, if your HMC is called yourhmc, you should be able to do this:

# ssh -l hscroot yourhmc
We also need to make sure we have some backups. Start with saving some output:
# lshmc -v
# lshmc -V
# lshmc -n
# lshmc -r  
The information outputted by the lshmc command is useful to determine what is currently installed on the HMC.

Next, take a console data backup of the HMC:
# bkconsdata -r nfs -h -l /mksysb/HMC -d backupfile
The bkconsdata command above will backup the console data of the HMC via NFS to host (replace with your own server name of IP address), and will store it in /mksysb/HMC/backupfile (replace /mksysb/HMC and backupfile in the bkconsdata command above to represent the correct location to back up to on your NFS server).

Mext, make a backup of the profiles for each managed server:
# bkprofdata -m  -f  --force 
The bkprofdata command above requires the name of each managed system. A good way to know the names of the managed systems configured on the HMC, is by running the following command:
# lssysconn -r all
Now that we have all the necessary backups, it's time to perform the actual update.

Let's start with the update to Service Pack 3:
# updhmc -t s -h -u anonymous -p ftp -f /software/server/hmc/updates/HMC_Update_V7R790_SP3.iso -r
This will download the service pack from the IBM site to the HMC via FTP and update the HMC, and reboot it. This may take a while. The updhmc command may return a prompt after the download is completed, but that does not mean the update has occurred already. Please allow it to install and reboot. A message will be shown on the screen *The system is shutting down for reboot now". After the reboot, run the "lshmc -V" command again. It may take some time for the lshmc command will respond with proper output. Again, give it some time. As soon as the lshmc command shows that the service pack is installed, then you can move forward to the next step.

The next step is installing the fixes:
# updhmc -t s -h -u anonymous -p ftp -f /software/server/hmc/fixes/MH01587.iso -r
# updhmc -t s -h -u anonymous -p ftp -f /software/server/hmc/fixes/MH01605.iso -r
After each fix is installed, the HMC will reboot, and you'll have to check with "lshmc -V" if the fix is installed.

And that concludes the update. If any new service packs and or fixes are released by IBM you can install them in a similar fashion.

Topics: HMC, Logical Partitioning

Useful HMC commands

Here are some very useful commands for the Hardware Management Console (HMC): Show vital product data, such as the serial number:

# lshmc -v
Show the release of the HMC:
# lshmc -V
Show network information of the HMC:
# lshmc -n
Reboot the HMC:
# hmcshutdown -r -t now
Show the connected managed systems:
# lssysconn -r all
Change the password of user hscpe:
# chhmcusr -u hscpe -t passwd -v abc1234
List the users of the HMC:
# lshmcusr
These are intersting log files of the HMC:
# ls -al /var/hsc/log/hmclogger.log
# ls -al /var/hsc/log/cimserver.log
Monitor the disk space:
# monhmc -r disk
This can be used to view the file systems of the HMC. Try using "proc", "mem" and "swap as well. By default this command will loop forever and update the screen every 4 seconds. You can run it only once, with the following command:
# monhmc -r disk -n 0
Zero out log files:
# chhmcfs -o f -d 0
This will delete any temporary files. Extremely useful if the HMC calls home to IBM about high usage of one of its file systems. Open a virtual console from the HMC:
# vtmenu
Exit by typing "~." (tilde dot) or "~~." (tilde tilde dot). Force the closure of a virtual terminal session:
# rmvterm -m SYSTEM-9117-570-SN10XXXXX -p name
Change the state of a partition:
# chsysstate -m SYSTEM-9131-52A-SN10XXXXX -r lpar -o on -n name
-f default_profile
# chsysstate -m SYSTEM-9131-52A-SN10XXXXX -r lpar -o shutdown 
-n name --immed
To start all partitions of one managed server:
# chsysstate -m Prd2-Server-8233-E8B-SN0XXXXXX -r lpar -o on --all
List partition profiles for a managed system:
# lssyscfg -r prof -m SYSTEM-9117-570-SN10XXXXX
List partition information:
# lspartition

Topics: AIX, HMC, System Admin

How to change the HMC password (of user hscroot)

You can ssh as user hscroot to the HMC, and change the password this way:

hscroot@hmc> chhmcusr -u hscroot -t passwd
Enter the new password:
Retype the new password:

Topics: HMC, Red Hat

Installing Linux websm client from HMC version 3.3.6

How do you install the Linux Web Based System Manager (websm) client from an HMC version 3.3.6, if your only access to the system is through ssh? The following procedure can be used:

First, get the Linux websm software of the HMC to the Linux system:

# ssh -l hscroot hmc ls -als /usr/websm/pc_client/*
# cd /tmp
# scp hscroot@labhmc1:/usr/websm/pc_client/*linux* .
Install the java2 runtime environment:
# rpm -ihv *rpm
Install websm:
# ./wsmlinuxclient.exe -silent
Install some additional software required:
# yum install libXp compat-libstdc*
Run websm:
# /opt/websm/bin/wsm

Topics: HMC, Installation

Upgrading an HMC remotely

If you have issues getting to the computer room easily, and you have to update an HMC on the raised floor, then you can also do that upgrade remotely. IBM describes two methods on their website: by using the update media and using the recoverable media. Using the update media method, you may end up with a corrupted HMC. The only way to solve this, us accessing the HMC in the computer room (*sigh*).

Therefore, use the recoverable media option. That one works better. A link to the documentation and software can be found here.

Topics: HMC, Logical Partitioning, Virtualization

Stopping and starting a LPAR from the HMC prompt

It is possible to stop and start an LPAR from the HMC prompt:

# lssycfg -r lpar
This command will list all partitions known to this HMC.
# chsysstate -o osshutdown -r lpar -n [partition name]
This command will send a shutdown OS command to the lpar.
# chsysstate -o on -r lpar -n [partition name]
This command will activate the partition.
# lsrefcode -r lpar -F lpar_name,refcode
This command will show the LED code.

Topics: HMC, System Admin

Inaccessible vterm on HMC?

It may happen that a virtual terminal (vterm) from an HMC GUI only showes a black screen, even though the Lpar is running perfectly. Here's a solution to this problem:

  • Login to the HMC using ssh as hscroot.
  • Run lssscfg -R sys to determine the machine name of your lpar on the HMC.
  • Run mkvterm -m [machine-name] -p [partition-name].
  • You can end this session by typing "~." or "~~." (don't overlook the "dot" here!).
  • Now go back to your HMC gui via WebBased System Manager and start-up a new vterm. It works again!

Topics: HMC, System Admin

Opening a virtual terminal window on HMC version 3.3.6

You may run into an issue with opening a virtual terminal window on an OLD HMC version (version 3.3.6). You can access the HMC through ssh, but opening a terminal window doesn't work. This ocurs when the HMC is in use for a full system partition on a frame:

At the fist attempt to login through ssh to the HMC and running vtmenu:

# ssh -l hscroot hmc
hscroot@hmc's password:
hscroot@lawhmc2:~> vtmenu

 Retrieving name of managed system(s) . . . 

  Managed Systems:
   1) 10XXXXX-XXXX
   2) 10YYYYY-YYYY
   3) 10ZZZZZ-ZZZZ

 Enter Number of Managed System.   (q to quit): 3

  Partitions On Managed System:  10ZZZZZ-ZZZZ

 Enter Number of Running Partition (q to quit):
Here's where you may get stuck. Vtmenu allows you to select a frame, but won't show show any partition to start a virtual terminal window on. Seems obvious, because there aren't any partitions available (fullSystemPartition only).

The solution is to run: mkvterm -m 10ZZZZZ-ZZZZ. This opens the virtual terminal window all right. When you're done, you can log out by using "~.". And if someone else is using the virtual terminal window, and you wish to close that virtual terminal window, run rmvterm -m 10ZZZZZ-ZZZZ.

In case you're wondering, how to figure out the managed machine name to use with the mkvterm and rmvterm commands, simply run vtmenu first. It shows you a list of managed machines controlled by this HMC.

Topics: HMC, System Admin

Useful HMC key combintaions

CTRL-ALT-F1: Switch to Linux command line; no login possible. If you then click on CTRL-ALT-DEL the system will reboot.
CTRL-ALT-F2: Takes you back to the Xserver window.
CTRL-ALT-BACKSPACE: Kills of the Xserver and will start a new -fresh- one, so you can login again.

Topics: HMC, Security

Secure shell access to HMC

If you wish to be able to access an HMC from the command line, without the need of logging in, you can use ssh (secure shell).

Set-up a secure shell connection to your HMC:

# ssh userid@hostname
You will have to enter a password to get into your HMC.

To allow your root user direct access to the HMC without the need of logging in, you'll have to update the authorized_keys2 file in the .ssh subdirectory of the home directory of your HMC user. There's a problem: a regular user only gets a restricted shell on an HMC and therefore is unable to edit the authorized_keys2 file in subdirectory .ssh. In an HMC version 3 it is possible to disable the restricted shell for users by editing file /opt/hsc/data/ssh/hmcsshrc. In an HMC version 4 and up you no longer get root access (except, you may get it, by contacting IBM), so you can no longer edit this file.

But there's another way to accomplish it.

Let's say your hmc user ID is hmcuser and you were able to logon to the HMC called hmcsystem using this ID and a password (like described above).

First, get a valid authorized_keys2 file, that allows root at your current host access to the HMC. Place this file in /tmp.

Then, use scp to copy the authorized_keys2 file to the HMC:
# scp /tmp/authorized_keys2 hmcuser@hmcsystem:~hmcuser/.ssh/authorized_keys2
[Enter your hmcuser's password, when required]

Now, just test if it works:
# ssh hmcuser@hmcsystem date
You should now be able to access the system without entering a password.

Number of results found for topic HMC: 14.
Displaying results: 1 - 10.