Topics: HMC

HMC upgrade

The following procedure describes how to perform a command-line based upgrade of the Hardware Management Console (HMC) from version V8 R8.6.0 SP1 to V8 R8.7.0 SP1. This involves these two steps:

  • First, upgrade to version V8 R8.7.0 (also known as MH01704).
  • Next, update to service pack 1 of V8 R8.7.0
For the sake of this procedure, let's assume that you have the following two systems available to you (and assume these 2 systems can ping each other):
  • The HMC, called hmc01, at IP address 172.16.52.100.
  • A separate AIX system, called aix01, at IP address 172.16.52.101.
The separate AIX system will be used as a network source for the installation software. We'll put the HMC software upgrade/update files on that system, and then tell the HMC to fetch the software from that AIX system using SFTP. This is possible, as long as you have SSH connectivity correctly set up on the AIX system. Also, let's assume the root password on the AIX system has been set to P@ssw0rd. Note that this, of course, is not a good root password.

So, let's first perform the upgrade to version V8 R8.7.0. This is based on https://www-01.ibm.com/support/docview.wss?uid=nas8N1020108. Download files img2a, img3a, base.img, disk1.img and hmcnetworkfiles.sum into a folder on the separate AIX system. You may download these files directly from ftp://ftp.software.ibm.com/software/server/hmc/network/v8870/x86/ to the AIX system.

You can use FTP to download the files, by logging in anonymously to the IBM FTP server and using any password (it says to specify your complete email address, but in fact anything you type will be fine). For example:
# ftp ftp.software.ibm.com
Connected to dispsd-40-www3.boulder.ibm.com.
220 ProFTPD 1.3.5b Server (proftpd)
Name (ftp.software.ibm.com:root): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230 Anonymous access granted, restrictions apply
ftp> bin
200 Type set to I
ftp> cd software/server/hmc/network/v8870/x86/
250 CWD command successful
ftp> promp
Interactive mode off.
ftp> mget *
200 PORT command successful
150 Opening BINARY mode data connection for img3a (34015945 bytes)
...
Downloading these files may take a while as they are several gigabytes in size.

Or, if you have wget installed on the AIX system, the following command can be used to get the individual files, for example:
# wget ftp://ftp.software.ibm.com/software/server/hmc/network/v8870/x86/*
Now that you have downloaded all the required files, for example in folder /HMC on the AIX system, make sure that the files can be read by everyone:
# chmod -R 755 /HMC
# chown -R root.system /HMC
Then, log in to the command line of the HMC:
# ssh -l hscroot 172.16.52.100
hscroot@172.16.52.100's password:
Last login: Wed Jan 17 22:24:49 2018
hscroot@hmcw01:~>
For this to work, you obviously need to know the password for the hscroot account on the HMC, and you need to have remote SSH access enabled on the HMC. If necessary to enable the remote SSH access, log in with a web browser to the GUI of the HMC at https://172.16.52.100 and change the remote access setting through the GUI (we'll not cover how to do this in this procedure though).

On the HMC, run the following command to save the upgrade data to disk:
# saveupgdata -r disk
Then, tell it to go download the upgrade files through SFTP from the AIX server:
# getupgfiles -r sftp -h 172.16.52.101 -u root --passwd 'P@ssw0rd' -d /HMC
Note here how the root password of the AIX system is set to P@ssw0rd, and that the files will be downloaded from the /HMC folder on the AIX system. Also note here, that with newer OpenSSH levels on AIX, root may not be allowed to start up a SFTP session to the AIX system remotely, and thus, in that case, it may be better to use a different user account (other than root) to download the files. Any account will do, as long as that account has access to the files in the /HMC folder (or any other folder name, where you have downloaded the HMC network installation files).

Downloading these files to the HMC may take a while. If you want, you can start up an additional SSH session to the HMC (log in to the HMC in a separate window), and then run the following command to monitor the progress of the files download to file system /hmcdump:
# monhmc -r disk 1
After a while, the prompt will be returned.

Then, set up the system for an altdisk boot:
# chhmc -c altdiskboot -s enable --mode upgrade
Then, reboot the system to initiate the upgrade:
# hmcshutdown -r -t now
This upgrade may take a while, like 15 minutes or so, depending on the size of the upgrade and model of the HMC. You may set up a simple ping to the HMC, so you can monitor when it shows back up online after the upgrade:
# ping 172.16.52.100
Once it start pinging again, you may start up a new SSH session to the HMC. Please note that even though you can log back in to the HMC, that the upgrade may not yet be entirely complete. Use the following command on the HMC to test if the upgrade is complete:
# lshmc -V
If this command returns "A connection to the Command Server failed", then the upgrade is still not yet complete. Please wait a while before proceeding, and repeat the lshmc command after a few minutes again. Once the lshmc command properly outputs the version information, then you may proceed. For example:
hscroot@hmc01:~> lshmc -V
"version= Version: 8
 Release: 8.7.0
 Service Pack: 0
HMC Build level 1709071101
","base_version=V8R8.7.0
"
At this point, the upgrade to version V8 R8.7.0 is complete, and you can proceed with the next step: Updating the HMC to service Pack 1 (also known as MH01725).

This service pack can be downloaded from IBM Fix Central. On this site, search for your HMC model. For example, if you have a 7042 model HMC, type in the search window: "7042". Then select V8R8.7.0, and then download only MH01725. Do not download MH01704 (we already completed that step above). You'll have to download an update ISO image (for example: HMC_Update_V8R870_SP1_x86.iso), and 4 MH01725* files. Put these files in a separate folder on the AIX system, for example in /SP1.

On the HMC, run the following command to start the update:
# updhmc -t sftp -h 172.16.52.101 -u root --passwd 'P@ssw0rd' -f /SP1/HMC_Update_V8R870_SP1_x86.iso -r
This command will initiate the update, and the HMC will reboot by itself. This step may take another 15 minutes or so. You can check again, once the HMC is available after the reboot, that the update is complete, by running the "lshmc -V" command. The lshmc -V command should output that service pack 1 is installed.

For example:
hscroot@hmc01:~> lshmc -V
"version= Version: 8
 Release: 8.7.0
 Service Pack: 1
HMC Build level 1712090351
MH01725 - HMC 870 Service Pack 1 Release [x86_64]
","base_version=V8R8.7.0
"
At this point, both the upgrade and update are complete. You may want to log in to the GUI of the HMC using a web browser, and check for any alert messages, and close them out. Usually, the upgrade/update of an HMC may trigger a few alert messages, and there's no need for IBM to respond to them (if you're using the call-home feature of the HMC), as you already know that these messages occurred during the upgrade/update.

Please also note that with this release (V8 R8.7.0), there is no longer a classic interface, so the web-based GUI of the HMC may look somewhat different to you, if you're used to using the classic web-based GUI.

If using sftp isn't an option, for example because sftp isn't allowed or not available on any server, you can also first transfer the ISO image over to the HMC, and then run the update from the HMC itself.

This works as follows, assuming you want to update the HMC with fix MH01752:

First, download the ISO image from IBM fix central. You'll notice that for fix MH01752, the iso image has a filename called MH01752_x86.iso. Transfer this file over to the hardware management console - assuming here that your HMC is called "hmc01":
# scp MH01752_x86.sio hscroot@hmc01:~
Now the iso image file is in the home directory of user hscroot on the HMC. If you log in through ssh to the HMC, and just do a "ls", you'll see the file right there.

Next, issue the upgrade from the HMC command line. Be sure to use the "-c" option as well, as that will tell the HMC to delete the iso image file once the update has been completed:
# updhmc -t disk -f /home/hscroot/MH01752_x86.sio -r -c
That's it - that will update the HMC using the local iso image file on the HMC itself.

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 10.11.12.13 -l /mksysb/HMC -d backupfile
The bkconsdata command above will backup the console data of the HMC via NFS to host 10.11.12.13 (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 ftp.software.ibm.com -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 ftp.software.ibm.com -u anonymous -p ftp -f /software/server/hmc/fixes/MH01587.iso -r
And...
# updhmc -t s -h ftp.software.ibm.com -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 / Linux

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.

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