Installing HMC in VirtualBox

The original source of this was
AIXWIKI is gone, so the WayBack Machine was used to pull the test.
I edited this a little for clarity.
Most of the procedures can be skipped. Just use Bryan’s additions.

==Installing HMC in VirtualBox==
The instructions below explain how to install the Hardware Management Console Software into a VirtualBox(tm) Virtual Machine. This may also work for VMWare(tm). The instructions are based on HMC v7.7.1 but may work on other versions with minor changes.

”’NOTE: You don’t “own” the HMC software. You buy a license to use it in specifically the way that IBM says you are allowed to. The HMC code is not licensed for running on anything other than an IBM physical HMC system. Violating the license is at best a guaranteed way to have no support. At worst, it could cause you to have to pay licensing fees and legal penalties. Do not do it for your business unless the penalties would be less than the cost of not doing this. This document is for academic purposes, and might be suitable for use by IBM Internal employee testing depending on management approval.”’


  1. If you are entitled, download HMC recovery images from Fix Central:
  2. ===
    * Product Group: System p
    * Product: Firmware and HMC
    * Processor type: POWER5 and POWER6 class
    * Machine Type-Model: 9117-MMA (Power6 – 570, does not really matter.)
    * Fix Type: HMC Firmware
    * HMC firmware release levels: V7R7.1.0

    * HMC V7R7.1.0M0 – MH01205
    * HMC V7R7.1.0M1 – MH01213

    ”’Do NOT download:”’
    * Mandatory efix for HMCV7R710 – MH01214 (Service Pack 1 superceeds this efix)

    ”’You should get the following files:”’


  3. Download latest Knoppix version (v6.2 at the time of writing)
  4. ===
    * KNOPPIX-ADRIANE_V6.2CD-2009-11-18-EN.iso


  5. Download & Install 7Zip
  6. ===
    * You will use this to extract files from an ISO –
    * You can also use WinRAR (Trial or Paid) –
    * You can also use MagicISO (Paid) –


  7. Download and install latest VirtualBox
  8. ===
    * v3.1.6 at the time of writing
    * You may also be able to configure this in VMWare


  9. Create a Linux Profile
  10. ===
    * Name: HMC
    * Operating System: Linux
    * Version: Linux 2.6
    * Memory: 1024 MB (Recommended, 512 MB minimum)
    * Harddisk: Dynamic, 160 GB (Installed HMC size is 12-13GB (with SP1))
    * Controller: IDE (default in this profile)
    * Network: Bridged, e1000


  11. Extract the file initrd.gz from first HMC install-DVD
  12. ===
    * Use 7-Zip, WinRAR or MagicISO
    * CDROM:/isolinux/initrd.gz to a local directory.


  13. Boot VM from Knoppix ISO
  14. ===
    * Choose Linux 2.6 (or matching for your HMC recovery media)


  15. Enable SSH in Knoppix
  16. ===
    * Option 10. Open a Shell
    * Run the following commands to start sshd:
    su –
    /etc/init.d/ssh start
    * Check the IP-address of Knoppix:
    ifconfig -a
    * Set root password:
    Enter ‘abc123’ twice.


  17. Modify initrd using Knoppix.
  18. ===
    * Copy the file initrd.gz using a SCP-client to the IP-address of virtual machine.
    * Use account login: root with password ‘abc123′.

    ”’NOTE: Be aware that you might not be able to connect when the network adapter of the virtualbox is not set to Bridged Adapter or Host-only Adapter.”’ Bridge Adapter is the most useful especially if you want to be able to connect to real POWER-systems.

    NOTE: If you did not specify the target directory then your file will be transferred your home-directory.
    * Gunzip and Mount the initrd:
    gunzip /root/initrd.gz
    losetup /dev/loop0 /root/initrd
    mkdir /mnt/initrd
    mount /dev/loop0 /mnt/initrd
    cd /mnt/initrd/opt/hmc/bin

    * Edit the Install file
    vi Install
    Add the following line
    CMDLINE=`cat /proc/cmdline`
    cd /

    It should look like this:
    FILES="bzImage initrd.gz disk1.img disk2.img disk3.img"
    CMDLINE=`cat /proc/cmdline`
    cd /
    case "$VPDINFO" in

    * Save the file (:wq! in vi) and repack initrd (umount, gzip):
    umount /mnt/initrd
    losetup -d /dev/loop0
    gzip /root/initrd

    Then, copy the file back to your workstation using scp/winscp.


  19. Modify first HMC install-dvd using MagicISO
  20. ===
    * Open HMC_Recovery_V7R710_1.iso
    * Remove the original initrd.gz: CDROM:/isolinux/initrd.gz
    * Add the modified version you just copied over from the knoppix-virtualbox.
    * Use ‘Save As ..’ to save the modified iso (HMC_Recovery_V7R710_1_modified.iso for example)


  21. Boot from the modified dvd and install HMC v7.7.
  22. ===
    * After the installation you will be prompted for a login.
    * Enter the default hmc username/password: hscroot/abc123
    * Now, you can get root access using ‘su -‘. The password is ‘passw0rd’.


  23. Change the start-up check file ‘getHMCVPD’
  24. ===
    vi /opt/hsc/bin/getHMCVPD

    * Comment out line 5:
    # /usr/sbin/dmidecode --string bios-version | sed -e 's/-\[//g' | sed -e 's/\]-//g'

    And this add line under line 5:
    echo "2AKT51A"

    * Comment out line 31:
    # echo "$cmodel$mtype*$sn"

    And add under this line:
    echo "7042CR4*10-1234A"

    * Comment out line 34:
    # echo "$cmodel$mtype"

    And add user this line:
    echo "7042CR4"

    * Save the file and reboot using the command ‘reboot’.


  25. Once your HMC is started, configure it.
  26. ===
    * Logon using hscroot/abc123.
    * You can install the service pack (HMC_Update_V7R710_SP1.iso) without any checks.

    ===Sources and Thanks===
    Special thanks to the forum and all contributors to thread 1052 “Running HMC in VMWare”.
    Without them it would have been more difficult to get HMC v7.7 working in VirtualBox.

===What about XF86Config?===
* It seems not to be needed for VirtualBox.
* It is possible that it is needed for VMWare but I did not test this.

===Critical Error 1901===
For the people who get:
"A critical error has prevented normal HMC startup. Please reboot the HMC and try again. If the problem persists, contact your support personnel. 1901: HMC Startup aborted due to a malfunction of a required module."

For newer builds, VPD check is not only using the script /opt/hsc/getHMCVPD, but in /opt/ccfw/ccfw.jar. ccfw.jar directly calls dmidecode from the java code. GetInfo (com/ibm/hwmca/fw/util/GetInfo in ccfw.jar) class formed file /opt/ccfw/data/pciinfo/sys_info.out, which is used to validate the hardware.

In the log file /opt/ccfw/ccfw.out we see an error

at java.lang.String.substring ( 1092)
at ( 1358)
at ( 1088)
... "

indicating that improper handling of type String. This error arises from the fact that the “dmidecode – string system-product-name”/”dmidecode – string bios-version” returns are not what is expected.

The following procedures may work around this:

  1. Move the original dmidecode
  2. cd /usr/sbin
    mv dmidecode dmidecode.orig

  3. Create a script named /usr/sbin/dmidecode with this content:
  4. #!/bin/bash

    if [[ "$2" == "bios-version" ]]; then
    echo "1234-123"
    elif [[ "$2" == "system-product-name" ]]; then
    echo "1234-123"
    $DMIDECODE "$@"

  5. Make the script executable
  6. chmod +x dmidecode

  7. Reboot the HMC
  8. This has been tested on VMWare Server, and on an old SuperMicro server.

    ===Alternative Fix for Virtualbox===
    This was tested in VirtualBox 3.2.8 r64453 with a Windows Host..

    * Download the in 7.7.2 code from fix central
    * Create a linux VM in virtualbox (I used generic linux 2.6)
    * 1gb memory, 64bg disk
    * Halt the virtual machine
    * Edit the XML file for this VM

    In the section add the following to fake out the HMC code. It will think the VM is now a 7310-CR3 :-)


    You could probably add more “pcbios” options but less is always better.
    You can add a secon dethernet to the VM config after the initial install (for your private LAN).
    This procedure doesn’t require messing with the .ISO files.


    ===ESX 3.5 limitation===
    This was tested to work with:
    * MH01255: HMC Recovery V7R730
    * MH01256: HMC Update V7R730
    * HM01257: HMC Mandatory eFix V7R730

    Follow Bryan’s procedure above, plus:
    * Create a VM Profile as type ‘Other 32-bit Linux’
    * Remove the VM profile from vSphere inventory
    * Log in as root to the local ESXi console or connect to it via ssh.
    * cd into the directory where the HMC VM’s files are located and edit the .vmx file with vi.
    * Edit the ethernet#.virtualDev type to e1000, for instance:
    ethernet0.virtualDev = "e1000"
    ethernet1.virtualDev = "e1000"

    * Add the .VMX back to the inventory from Browse Datastore


    ===ROOT ACCESS===
    Using the InitRD procedure with 7.3.0 works; however, only the Restricted Shell is available.

    Access the filesystem from Linux emergency media, and remove the “set -r” command.

    cd /opt/hsc/data/ssh/
    chmod 755 hmcsshrc
    vi hmcsshrc

    Add # before “set -r”


    ===EASIER Root Access===
    I found it’s easiest to just add /usr/bin/su to /hmcrbin so that script updates won’t clobber the access to root.

    Newer VirtualBox requires different syntax.
    Also, newer HMC (at least 7.7.6) requires additional DMI entries.

    Some people use these values instead:
    * DmiSystemProduct = 7042CR4
    * DmiBIOSVersion=GFE136BUS-1.09
    * DmiSystemSerial=068A3BB


    VirtualBox is Trade Marked by Oracle.
    VMWare is Trade Marked by VMWare.
    IBM, AIX, pSeries, DownloadDirector, etc are trade-marked by IBM
    Anything else is trade marked by whoever owns the product (not me).

Comments are closed.