This blog contains experience gained over the years of implementing (and de-implementing) large scale IT applications/software.

HowTo: Install SAP HANA 2.0 in a VM in less than 30minutes – Part #2

This is the second part of a three part post on how to install an SAP HANA 2.0 database into a SUSE Linux for SAP 12 SP3 virtual machine.
See Part #1 here.

During the VM start-up you may be prompted by VMWare to download the VMWare Tools, you should do this (it’s about 1 minute):

The SUSE installation can be started:

Customise the locale settings and accept the terms:

We skipped registration (we don’t need to update SUSE):

Select “SUSE Linux Enterprise Server for SAP Applications” and since we will use SSH, de-select “Enable RDP”:

Click “Network Configuration” in the top right hand corner:

I adjusted my install to use a static IP address, I also setup the hostname and fully qualified domain name at this point (you can change this later using “yast lan” if you want):
IP:  (relevant to my VMWare host-only setup)
Hostname: hana01.fqdn.corp

On the next page I added the same hostname and FQDN, then set the DNS resolver policy to “Only Manually” which will allow me to not use DNS at all:

We don’t need any addons:

Check the root partition size on /dev/sda1 and click “Edit Proposal Settings”:

We need to adjust the root partition format to be XFS:
NOTE: XFS is the only supported filesystem for the HANA data and log areas, so why not use it for everything.

Set the timezone:

Set the root password:

On the summary screen disable the firewall and ensure that SSH is enabled:

To minimise memory usage, we set the default start-up mode to “Text Mode” (to change click “Default systemd target”):

After all the screen prompts were answered the install time was approx 10 minutes (at least 1 coffee).
NOTE: There were a couple of instances where a package failed to install.  Clicking “Retry” completed the package installation.
We now need to apply the required O/S changes as per SAP note 2205917.  We can use the saptune command to do this:

# saptune solution apply HANA

Enable SAPTUNE to auto-start:

# saptune daemon start

Shutdown the server.

# shutdown –h now

Edit the VM to add a second hard disk for the HANA database:

We assign 50GB in one single file:

Power on the VM.
Log back in as root once it has rebooted.
Check that you can resolve the hostname:

# hostname
# hostname -f

Let’s mount the SUSE ISO on the server:

# mkdir /mnt/dvd
# mount /dev/sr0 -t iso9660 /mnt/dvd

Now install the Java runtime:

# cd /mnt/dvd/suse/x86_64
# rpm -i –nodeps java-1_8_0-ibm-*

Check the version is 1.8.0:

# java -version

Now we need to create our HANA database disk partitions.
First check which disk you’re using for the O/S:

# dmsetup deps -o devname

I can see that sda1 (sda) is currently mounted as my primary root and swap disk.
Which means that /dev/sdb will be my new HANA disk:

# ls -l /dev/sd*

WARNING: Adjust the commands below to the finding above, so you use the correct unused disk and don’t overwrite your root disk.
Create the new partition on the disk:

# fdisk /dev/<your disk device e.g. sdb>

Then enter:

n <return>
p <return>
1 <return>
t <return>
8e <return>
w <return>

At the end, the fdisk command exits.
Re-run fdisk to check your new partition:

Create the volume group and logical volume:

# pvcreate /dev/sdb1
# vgcreate /dev/volHANA /dev/sdb1
# lvcreate -L 51072M -n lvHANA1 volHANA

Format the new XFS (only one really supported) logical volume:

# mkfs.xfs /dev/volHANA/lvHANA1

Mount the new partition:

# mkdir /hana
# echo “/dev/volHANA/lvHANA1 /hana xfs defaults 0 0”   >> /etc/fstab
# mount -a

That is it for Part #2 of this guide.
Continue on to Part #3 for the completion of our HANA 2.0 install.

HowTo: Install SAP HANA 2.0 in a VM in less than 30minutes – Part #1

For the original post back in 2014 we used SAP HANA 1.0 sps07 and installed into a Virtual Machine running SUSE Linux 11.
Things have moved on since 2014 and we have now seen the arrival of HANA 2.0 with multi-tenant database feature and new HANA Cockpit and SUSE Enterprise Linux 12 with it’s new systemd daemon replacement of the old SYS V init scripts.
I decided it was time to update the post…
Scenario: You want to prototype something for a new HANA 2.0 database.  We can use the power of a virtual machine to get a HANA 2.0 database up and running in less than 30 minutes.
Well, it was supposed to be 30 minutes, and it sure can be 30 minutes, providing you have the right (fast) equipment to hand.
Remember, this is not a “Here’s the standard install process” hand-holding stuff – this is let’s get it installed and use it!
Here’s how…

What you’ll need:
– SAP HANA In Memory DB 2.0 install media from SAP Software Download Centre. 
This can be the Platform Edition (for native HANA systems) or the Enterprise Edition (for S/4HANA or BW/4HANA or any other x/4HANA).
I also cheated a little in my process, since I downloaded the “Installation / Patch” for a HANA database, since this contains the latest entire code line and installer but is much less in size.
In my example I use IMDB_SERVER20_012_3-80002031.SAR which is ~3.5GB in size.

– The SUSE Linux for SAP v12 sp02 or sp03 (recommended) install media (ISO).
This is free to download from (although you will need to register an account with SUSE) but you don’t need a license.  This is ~3.6GB in size and you only need the first DVD (DVD1).

– A valid license for the HANA database (platform edition or enterprise edition).

– SAP HANA Studio installed on a PC which can access the virtual HANA server you’re going to create (the Studio install media is contained within the full HANA install media DVD, or you can download it separately from SAP Software Download Centre).
In my example, I’m using IMC_STUDIO2_212_3-80000323.SAR (should be the same revision as the database) which is 734MB in size.
NOTE: The later revisions of HANA come with the HANA Cockpit built-in (web based) so you may not need the HANA Studio, it depends what you want to do with it.  See SAP note 2185556 for more details.

– A host machine to host the virtual machine.  You need at least 20GB of RAM, although if you configure your pagefile (in Windows) on SSD or flash, you could get away with 16GB (I did !!!).
– SAP notes access.  Specifically to read/check SAP notes 1984787, 2205917 & 1944799.
– A downloaded version of SAPCAR.exe on your PC (if, like me, you will be using the VMWare shared folders option to present your downloaded media to the gues O/S).

What we’re going to do:
– We’ll create a basic SUSE Linux for SAP 12 SP3 virtual machine.  You can use any host OS, I’m using Windows 7 64bit and VMWare Workstation Player v14.
– Because most people are using VMs to maximise infrastructure, we’ll go through a couple of steps to really reduce the O/S memory footprint and for efficiency we use SSH and the text mode installer for HANA.  We get this whole thing running in less than 16GB of RAM in the end.
– We’ll install a basic HANA 2.0 database (in multi-tennant mode – this is the future).  Initially we only get the SYSTEM DB, then we create a new tenant DB afterwards.


Create your basic VM for SUSE Enterprise Linux (I’m using SUSE Linux 12 for SAP SP3).
It will need the following resources:
– More than 16GB of RAM (initially 24GB for installation) on the physical host machine .
– 8GB of disk for the O/S.
– 50GB of disk for the basic HANA DB with nothing in it, plus the installed software.
– 20GB of disk on the physical host  for swapping (if you don’t have 24GB of RAM).
– 2 CPUs if you can spare the cores.
– A hostname and fully qualified domain name.
– Some form of networking (use “Bridged” if you need to access this across the network, I will be using “Host-Only”).
Let’s create the VM and set the CDROM to point to the SUSE Linux 12 SP3 install DVD ISO file:

We choose to do the install later to avoid the VMWare “EasyInstall” feature: