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.