Installing HMC in VirtualBox
sbr:http://omnitech.net/reference/2013/05/01/installing-hmc-in-virtualbox/
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.
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:
- 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
- Mandatory efix for HMCV7R710 – MH01214 (Service Pack 1 superceeds this efix)
- 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:
- Check the IP-address of Knoppix:
- Set root password:
- 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′.
- Gunzip and Mount the initrd:
- Edit the Install file
- Save the file (:wq! in vi) and repack initrd (umount, gzip):
- 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’
- Comment out line 5:
- Comment out line 31:
- Comment out line 34:
- 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.
Download:
Do NOT download:
You should get the following files:
HMC_Recovery_V7R710_1.iso
HMC_Recovery_V7R710_2.iso
HMC_Update_V7R710_SP1.iso
HMC_Recovery_V7R710_1.iso
HMC_Recovery_V7R710_2.iso
HMC_Update_V7R710_SP1.iso
su –
/etc/init.d/ssh start
/etc/init.d/ssh start
ifconfig -a
passwd
Enter ‘abc123′ twice.
Enter ‘abc123′ twice.
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 /root/initrd.gz
losetup /dev/loop0 /root/initrd
mkdir /mnt/initrd
mount /dev/loop0 /mnt/initrd
cd /mnt/initrd/opt/hmc/bin
losetup /dev/loop0 /root/initrd
mkdir /mnt/initrd
mount /dev/loop0 /mnt/initrd
cd /mnt/initrd/opt/hmc/bin
vi Install
Add the following line
VPDINFO="7042CR4"
Between
CMDLINE=`cat /proc/cmdline`
And
cd /
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
FILES="bzImage initrd.gz disk1.img disk2.img disk3.img"
CMDLINE=`cat /proc/cmdline`
VPDINFO="7042CR4"
cd /
case "$VPDINFO" in
cd
umount /mnt/initrd
losetup -d /dev/loop0
gzip /root/initrd
umount /mnt/initrd
losetup -d /dev/loop0
gzip /root/initrd
Then, copy the file back to your workstation using scp/winscp.
vi /opt/hsc/bin/getHMCVPD
# /usr/sbin/dmidecode --string bios-version | sed -e 's/-\[//g' | sed -e 's/\]-//g'
And this add line under line 5:
echo "2AKT51A"
echo "2AKT51A"
# echo "$cmodel$mtype*$sn"
And add under this line:
echo "7042CR4*10-1234A"
echo "7042CR4*10-1234A"
# echo "$cmodel$mtype"
And add user this line:
echo "7042CR4"
echo "7042CR4"
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.
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."
"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
- Create a script named /usr/sbin/dmidecode with this content:
- Make the script executable
- Reboot the HMC
- 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
- MH01255: HMC Recovery V7R730
- MH01256: HMC Update V7R730
- HM01257: HMC Mandatory eFix V7R730
- 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:
- Add the .VMX back to the inventory from Browse Datastore
- DmiSystemProduct = 7042CR4
- DmiBIOSVersion=GFE136BUS-1.09
- DmiSystemSerial=068A3BB
cd /usr/sbin
mv dmidecode dmidecode.orig
mv dmidecode dmidecode.orig
#!/bin/bash
DMIDECODE=/usr/sbin/dmidecode.orig
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
chmod +x dmidecode
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..
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.
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:
Follow Bryan’s procedure above, plus:
ethernet0.virtualDev = "e1000"
ethernet1.virtualDev = "e1000"
ethernet1.virtualDev = "e1000"
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”
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.
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:
-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)
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)
Tidak ada komentar:
Posting Komentar