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
- The HMC, called hmc01, at IP address 172.16.52.100.
- A separate AIX system, called aix01, at IP address 172.16.52.101.
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:
Downloading these files may take a while as they are several gigabytes in size.# 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) ...
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:
Then, log in to the command line of the HMC:# chmod -R 755 /HMC # chown -R root.system /HMC
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).# 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:~>
On the HMC, run the following command to save the upgrade data to disk:
Then, tell it to go download the upgrade files through SFTP from the AIX server:# saveupgdata -r disk
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).# getupgfiles -r sftp -h 172.16.52.101 -u root --passwd 'P@ssw0rd' -d /HMC
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:
After a while, the prompt will be returned.# monhmc -r disk 1
Then, set up the system for an altdisk boot:
Then, reboot the system to initiate the upgrade:# chhmc -c altdiskboot -s enable --mode upgrade
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:# hmcshutdown -r -t now
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:# ping 172.16.52.100
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:# lshmc -V
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).hscroot@hmc01:~> lshmc -V "version= Version: 8 Release: 8.7.0 Service Pack: 0 HMC Build level 1709071101 ","base_version=V8R8.7.0 "
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 -rThis 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:
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.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 "
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":
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.# scp MH01752_x86.sio hscroot@hmc01:~
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:
That's it - that will update the HMC using the local iso image file on the HMC itself.# updhmc -t disk -f /home/hscroot/MH01752_x86.sio -r -c
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 yourhmcWe also need to make sure we have some backups. Start with saving some output:
The information outputted by the lshmc command is useful to determine what is currently installed on the HMC.# lshmc -v # lshmc -V # lshmc -n # lshmc -r
Next, take a console data backup of the HMC:
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).# bkconsdata -r nfs -h 10.11.12.13 -l /mksysb/HMC -d backupfile
Mext, make a backup of the profiles for each managed server:
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:# bkprofdata -m-f --force
# lssysconn -r allNow 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 -rThis 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 -rAnd...
# updhmc -t s -h ftp.software.ibm.com -u anonymous -p ftp -f /software/server/hmc/fixes/MH01605.iso -rAfter 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.
Here are some very useful commands for the Hardware Management Console (HMC): Show vital product data, such as the serial number:
# lshmc -vShow the release of the HMC:
# lshmc -VShow network information of the HMC:
# lshmc -nReboot the HMC:
# hmcshutdown -r -t nowShow the connected managed systems:
# lssysconn -r allChange the password of user hscpe:
# chhmcusr -u hscpe -t passwd -v abc1234List the users of the HMC:
# lshmcusrThese are intersting log files of the HMC:
Monitor the disk space:# ls -al /var/hsc/log/hmclogger.log # ls -al /var/hsc/log/cimserver.log
# monhmc -r diskThis 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 0Zero out log files:
# chhmcfs -o f -d 0This 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:
# vtmenuExit by typing "~." (tilde dot) or "~~." (tilde tilde dot). Force the closure of a virtual terminal session:
# rmvterm -m SYSTEM-9117-570-SN10XXXXX -p nameChange the state of a partition:
To start all partitions of one managed server:# 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
# chsysstate -m Prd2-Server-8233-E8B-SN0XXXXXX -r lpar -o on --allList partition profiles for a managed system:
# lssyscfg -r prof -m SYSTEM-9117-570-SN10XXXXXList partition information:
# lspartition
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:
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:
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).# 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):
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.
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!
It is possible to stop and start an LPAR from the HMC prompt:
# lssycfg -r lparThis 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,refcodeThis command will show the LED code.
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.
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/*Install the java2 runtime environment:
# cd /tmp
# scp hscroot@labhmc1:/usr/websm/pc_client/*linux* .
# rpm -ihv *rpmInstall websm:
# ./wsmlinuxclient.exe -silentInstall some additional software required:
# yum install libXp compat-libstdc*Run websm:
# /opt/websm/bin/wsm
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@hostnameYou 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 dateYou should now be able to access the system without entering a password.


