hmc

HMC

If using QEMU directly you can use '-smbios' args. eg

    -smbios "type=0,vendor=LENOVO,version=6FET82WW (3.12 )"
    -smbios
"type=1,manufacturer=Fedora,product=Virt-Manager,version=0.8.2-3.fc14,serial=32dfcb37-5af1-552b-357c-be8c3aa38310,uuid=c7a5fdbd-edaf-9455-926a-d65c16db1809,sku=1234567890,family=Red Hat"

OmniTech Industries
Main menu
Skip to content

    Home
    Contact
    Customers
    Services
    News
    Reference
    Cycling
    Soapmaking

Installing HMC in VirtualBox
2013-05-01 Josh-Daniel Davis (xaminmo)	

The original source of this was AIXWIKI.org.
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.

    If you are entitled, download HMC recovery images from Fix Central:

    http://www-933.ibm.com/support/fixcentral/
        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

    Download:
        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:
    HMC_Recovery_V7R710_1.iso
    HMC_Recovery_V7R710_2.iso
    HMC_Update_V7R710_SP1.iso
    Download latest Knoppix version (v6.2 at the time of writing)
        KNOPPIX-ADRIANE_V6.2CD-2009-11-18-EN.iso
        ftp://ftp.knoppix.nl/pub/os/Linux/distr/knoppix/
    Download & Install 7Zip
        You will use this to extract files from an ISO – http://7-zip.org
        You can also use WinRAR (Trial or Paid) – http://rarlabs.com
        You can also use MagicISO (Paid) – http://magiciso.com
    Download and install latest VirtualBox
        v3.1.6 at the time of writing
        http://www.virtualbox.org/
        You may also be able to configure this in VMWare
    Create a Linux Profile
        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
    Extract the file initrd.gz from first HMC install-DVD
        Use 7-Zip, WinRAR or MagicISO
        CDROM:/isolinux/initrd.gz to a local directory.
    Boot VM from Knoppix ISO
        Choose Linux 2.6 (or matching for your HMC recovery media)
    Enable SSH in Knoppix
        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:

    passwd
    Enter ‘abc123′ twice.
    Modify initrd using Knoppix.
        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
    VPDINFO="7042CR4"
    Between
    CMDLINE=`cat /proc/cmdline`
    And
    cd /

    It should look like this:
    FILES="bzImage initrd.gz disk1.img disk2.img disk3.img"
    CMDLINE=`cat /proc/cmdline`
    VPDINFO="7042CR4"
    cd /
    case "$VPDINFO" in
        Save the file (:wq! in vi) and repack initrd (umount, gzip):

    cd
    umount /mnt/initrd
    losetup -d /dev/loop0
    gzip /root/initrd

    Then, copy the file back to your workstation using scp/winscp.
    Modify first HMC install-dvd using MagicISO
        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)
    Boot from the modified dvd and install HMC v7.7.
        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’.
    Change the start-up check file ‘getHMCVPD’

    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’.
    Once your HMC is started, configure it.
        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 pseriestech.org 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

"Java.lang.StringIndexOutOfBoundsException

   at java.lang.String.substring (String.java: 1092)
   at com.ibm.hwmca.fw.managed.HMC.getVpdInfo (HMC.java: 1358)
   at com.ibm.hwmca.fw.managed.HMC.getBiosMachineType (HMC.java: 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:

    Move the original dmidecode

    cd /usr/sbin
    mv dmidecode dmidecode.orig
    Create a script named /usr/sbin/dmidecode with this content:

    #!/bin/bash
    DMIDECODE=/usr/sbin/dmidecode.orig

    if "$2" == "bios-version" ; then

      echo "1234-123"

    elif "$2" == "system-product-name" ; then

      echo "1234-123"

    else

      $DMIDECODE "$@"

    fi
    Make the script executable

    chmod +x dmidecode
    Reboot the HMC

    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 :-)

         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" value="7310CR3"></extradataitem>
         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" value="IBM CORPORATION"></extradataitem>

    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.

    THANKS TO BRYAN AND LAKSI FOR THIS!
    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

    THANKS TO HENRI FOR THIS!
    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”

    THANKS TO MR. TOTH FOR THIS!
    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.

         <extradataitem name="GUI/LastCloseAction" value="powerOff"></extradataitem>
         <extradataitem name="GUI/LastGuestSizeHint" value="1024,768"></extradataitem>
         <extradataitem name="GUI/LastNormalWindowPosition" value="640,200,1024,810"></extradataitem>






         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" value="IBM CORPORATION"></extradataitem>
         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" value="7042CR5"></extradataitem>
         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" value="0699999"></extradataitem>
         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion" value="7.3"></extradataitem>
         <extradataitem name="VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" value="IBM CORPORATION"></extradataitem>
       </extradata>

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

    -JDSDavis
    TRADEMARKS

    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).

Share this:

    Email
    Print
    Facebook
    Google
    More

Google+
Josh-Daniel Davis (xaminmo) Josh-Daniel Davis (xaminmo)

This entry was posted in Reference. Bookmark the permalink.
Post navigation
← Greenhouse restaurant
SVC mdisk stuck in “degraded_ports” →

Comments are closed.
Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 6 other subscribers

Meta

    Log in
    Entries RSS
    Comments RSS
    WordPress.org

RSS Feed RSS - Posts
All information is © Copyright 1991, 1995, 1999-2015. All rights reserved by OmniTech Industries. No warranties or guarantees are given, neither express nor implied, regarding the accuracy of this information. All trademarks are property of their respective owners. Information herein is not to be construed as a solicitation, nor as a guarantee of any sort.

  • hmc.txt
  • Last modified: 2019/10/18 20:04
  • by 127.0.0.1