How to install the HANA server software on a virtual machine
This guide describes how to install the SAP HANA server software on a VMware virtual machine. Normally, SAP HANA will only install on certified (and very expensive) hardware, but there is a workaround for this.
As this is my very first SCN blog post, i would welcome all of you to provide me with feedback on it! Thanks!
When you want to have a HANA demo or sandbox environment, there are roughly two possibilities:
– Buy a certified appliance from a hardware vendor
– Use Amazon AWS
The first one has the disadvantage that you need to invest a significant amount of money for something that’s just a demo/sandbox machine. The second option is pretty cheap (although the costs can run up if you leave it running all the time), but is limited in terms of memory amount. Also, it’s not possible to run BW or ECC on HANA with the AWS solution.
So, with the above in mind, I suggested within our organization that we installed HANA on a virtual machine, so that we have our own demo environment. It turned out that that was something a lot of colleagues had already tried before, but they didn’t succeed. They didn’t succeed because the HANA installation performs a hardware check during the install, and of course a virtual machine does not meet the HANA hardware requirements.
Now, since I’m a little bit stubborn, this triggered me to find a way to work around the hardware check to be able to install HANA on a VM. And there is one, it’s quite simple actually. So, here are the steps to install HANA on a VM:
Please use this guide only for internal, non-production HANA systems. Otherwise I think you will have a problem with SAP 🙂 .
- A virtual machine, with at least the following specs:
- At least 24 GB RAM memory
- At least 65 GB + 5 times the amount of RAM of HDD space, for example: 48 GB RAM and 65 + (5 * 48) = 240 GB HDD space
- Quad-core processor (but: the more processing power, the better. Do not underestimate this!)
- SUSE Linux Enterprise installation ISO file
- SAP HANA installation ISO (can be downloaded from SAP Marketplace). You have to create an ISO file from the installation files manually, for example by using ImgBurn.
- VMWare vSphere or another tool to access your VM remotely
- System information for your HANA server:
- System ID (SID)
- Hostname (Fully Qualified Domain Name, FQDN)
- Instance number
- Client PC with PuTTY and HANA Studio installed
- First of all, you need to install the Linux OS. You need the SLES (Suse Linux Enterprise) distro to install HANA. I have tried to install HANA on Opensuse, but it did not work.
- Start the VMware virtual machine with the Suse installation ISO mounted on the VM’s disk drive.
- Perform the installation of SLES as normal. There are no special things to consider, except:
- I used the default Gnome install to be able to run the HANA Studio on the server to test. It’s not really necessary to install a window environment on the Linux server, but I’m finding it helpful sometimes.
- Hostname: be careful to set this correct!
- IP and domain
- Make sure SSH access is possible
- Disable any firewalls
- During the installation, or afterwards, you need to set up a few partitions mounted on predefined mount points. The table below will display the file system you need, and the minimal sizes of the different partitions. I’ve also included a column of the file system I’ve created during my installation:
|Mount Point||Minimal size||My size|
|/||10 GB||30 GB|
|/hana/shared||5 GB||No separate partition or mount point|
|/hana/shared/<SID>||1x RAM size||50 GB|
|/usr/sap||50 GB||50 GB|
|/hana/shared/data||3x RAM size||200 GB|
|/hana/shared/log||1x RAM size||50 GB|
- After installation, boot up your fresh Linux installation and use Putty to make a SSH connection to it. Log in as root. You can also use the remote desktop graphical environment if you want, but in this example I will use Putty.
- First, check if the filesystem is set up correctly:
- Next, we are going to install a few software packages that are required for the HANA installation. Please make sure that you have your SLES DVD mounted properly, or that you have a working internet connection. Then, give the following command:
zypper in gtk2 java-1_6_0-ibm libicu mozilla-xulrunner* ntp sudo syslog-ng tcsh libssh2-1
expect autoyast2-installation yast2-ncurses python
- Have the packages that are missing installed by confirming the installation
- Next, mount the HANA installation DVD
- Find the file /<dvdlocation/DATA_UNITS/HANA_IM_LINUX__X86_64/setuphana.slmodel.template.v2 and open it with a text editor
- Fill in the right parameters in the XML file. Please note how this corresponds to your file system. Read the XML instructions carefully. Because these settings are system specific, I cannot tell you how to fill this in or how I filled in these parameters.
- Save the file as /tmp/hana.model
- Create directory /tmp/hanainstdir:
- Next, we will create a system environment variable called “IDSPISPOPD”. This will make sure the HANA installer bypasses the hardware check (since we’re not using certified hardware). IDSPISPOPD is actually a cheat code in DOOM, called ‘No Clipping mode’. LOL @ the HANA developers there!
- Check if the OS variable is set correctly with python:
>>> import os
>>> ‘IDSPISPOPD’ in os.environ.keys()
- This should return True. Exit python by typing
- So, now we have the file system in place, we have the required packages installed and we have set the No Clipping mode to on. Time to start the HANA installer.
- CD to /<dvd-location/DATA_UNITS/HANA_IM_LINUX__X86_64/
- Start the installer script with the following command:
./setup.sh /tmp/hanainstdir /tmp/hana.model
- The installer will first extract into your installation dir. After this, the installer will prompt you for a password. This is actually the password for the DB admin. Enter it twice.
- After that, it will install SAPHostAgent. Don’t worry if it says it can’t connect a few times, this happened to me too. Just wait and it will continue eventually.
- After this, the installation doesn’t require input anymore, so you can leave it until it is completed. Sit back and enjoy the ride…
- When the installation is complete, start the HANA Modeler on the local machine to see if your HANA server is running. Connect to the hostname and instance number you provided during the install. Use the username SYSTEM and the password you entered during the installation.
So, now you have a HANA server for playing around. Have fun with it!
Wouter Goslinga, CGI