Skip to Content
Author's profile photo Shaun Wimpory

SAP HANA Installation in Oracle VirtualBox VM

A very interesting article was bought to my attention about two weeks ago regarding the installation of SAP HANA Platform Edition 1.0 SP05 on a VMware virtual machine (most likely VMware player).  Thus being a SAP HANA enthusiast I decided to undertake the same process using Oracle VirtualBox v4.2.12.  I had been a big fan of VMware player for a long time, but about 2 years ago I switched to VirtualBox (reasons that I won’t get into right now).

So, after finally getting my purchase order approved by my wife, I upgraded my PC to 32GB of RAM and installed SAP HANA PE1.0 SP05 into VirtualBox running SAP SUSE Linux Enterprise Server 11.2.

The installation is relatively straight forward with a couple of minor VirtualBox issues.  The full instructions can be found here thanks to W. Goslinga :

http://scn.sap.com/community/developer-center/hana/blog/2013/05/08/how-to-install-the-hana-server-software-on-a-virtual-machine

The key quirks with VirtualBox were:

  1. You need to enable the CMPXCHG16B instruction after you have created the guest in VirtualBox.  Without the CMPXCHG16B instruction enabled the HANA installation will fail.
  2. VirtualBox with SUSE 11.2 running on my Intel i7 reported the number of CPU sockets as 0.  Thus the HANA hardware check would fail with a divide by 0 error and terminate the installation regardless of the IDSPISPOPD environment variable.  I manually updated the HanaHwCheck.py shell script and forced the number of sockets to 1.
  3. One last issue, I had the HANA media sitting on a different VM and had NFS mounted the filesystem to my HANA host.  I had a number of packages that failed to “untar” during the installation until I mounted the NFS share as a “rw,hard,intr” mount.  Obviously the NFS soft mount was playing nice over my internal network.

Technical bits:

  1. cd <virtualbox install dir>; VBoxManage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1
  2. vi <path to HANA media>/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server/HanaHwCheck.py
    • comment out the line > self.HWInfo[‘CPU Sockets’]=len(lines)-1
    • insert line > self.HWInfo[‘CPU Sockets’]=1    (or set to the actual number of sockets you have)
  3. If using an NFS mount ensure its set to a “hard” mount eg: vi /etc/fstab
<nfshost>:/software /software nfs rw,hard,intr 0 0

Below is a screen shot of SAP HANA Studio directly after I finished the installation of HANA.

Studio-Admin.GIF

I plan to post a YouTube video of the installation process shortly.  The session will cover the full life cycle from VirtualBox guest creation including network config, through to the completion of the HANA installation.  We’ll also install SAP HANA Studio on the physical PC and connect to the HANA backend.  Stay tuned.

Youtube videos now available!

Part 1 – SUSE installation – http://lnkd.in/bw7_yxB

Part 2 – HANA installation –http://lnkd.in/bWfhTax

Part 3 – NW 7.4 on HANA installation – coming soon!

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Shaun,

      Have you uploaded the video to youtube.

      Thanks

      Ashish

      Author's profile photo Shaun Wimpory
      Shaun Wimpory
      Blog Post Author

      Hi Ashish,

      You can find the Youtube clips here:

      Youtube videos now available!

      Part 1 - SUSE installation - http://lnkd.in/bw7_yxB

      Part 2 - HANA installation -http://lnkd.in/bWfhTax

      Part 3 - NW 7.4 on HANA installation - coming soon!

      Cheers

      Shaun

      Author's profile photo Former Member
      Former Member

      Hello Shaun,

      I am trying to connect to SAP HANA Lifecycle Manager, but I am getting the below as one of the errors:

      com.sap.ndb.studio.lcm.upd.ui.hostcontrol.SAPHostControlNotAccessibleException: Could not connect to SAP Host Agent on host 133.xxx.xxx.xxx. Check that it is running.

      could you please let me know how can I check if the host agent in running on the SAP HANA server?

      the HLM is is up and running (I have installed this manually, after the HANA installation from ur blog) and on HDB info i can see all these process as well:

      \_ /bin/bash ./bootstrap-hlm.sh

      | \_ /bin/bash /usr/sap/hlm_bootstraps/H01/HLM/hlm.sh

      | \_ /bin/bash ./daemon.sh console -

      \_ /bin/bash -c cd "/usr/sap/hlm_bootstraps/H01/HLM" ; "/usr/sap/hlm_boot

      |               \_ /usr/sap/hlm_bootstraps/H01/HLM/jvm/jre/bin/java -classpath /usr

      \_ /bin/sh /usr/sap/H01/HDB50/HDB info

      \_ ps fx -U h01adm -o user,pid,ppid,pcpu,vsz,rss,args

      sapstart pf=/hana/shared/H01/profile/H01_HDB50_

      \_ hdbnameserver

      \_ hdbpreprocessor

      \_ hdbcompileserver

      \_ hdbindexserver

      \_ hdbstatisticsserver

      \_ hdbxsengine

      \_ sapwebdisp_hdb

      /usr/sap/H01/HDB50/exe/sapstartsrv pf=/hana/shared/H01/profile/H01_HDB50_xxxxx

      if the host agent is not running, how can i install it??

      many Thanks,

      Nitin Jain

      Author's profile photo Former Member
      Former Member

      Hi Shaun,

      Thank you for your very informative videos!

      Quick question for you,..

      I wounder if is possible to install the HANA server on a laptop with say 5GB of RAM? I tried once before but the hardware check stopped me,... perhaps a hack in the py-check-sript?

      Thanks,

      Peter

      Author's profile photo Shaun Wimpory
      Shaun Wimpory
      Blog Post Author

      Hi Peter,

      I have had a good play with attempting the installation on 8GB of memory, but after watching various stages of the installation terminate over and over I've given up.  I have found a minimum of 25GB works well in VirtualBox (I have 32GB in my server now). 

      The good news is once the installation is complete you can then reduce the HANA memory requirement to much less ... say 8 - 12GB ... but it runs very slowly, and I have seen a number of memory based errors in my NW7.4 environment when doing so.

      Cheers

      Shaun

      Author's profile photo Former Member
      Former Member

      Hi again,

      Thanks for your insights, I didn't even pass the check for memory. Perhaps it's best to load up with more memory to be able to use it "correct" without any errors etc.

      I also tried to install the NW platform 7.3 but I found it very frustrating to find all the neacessary files from the download center so i tried a "sandbox" download from SAP but didn't get the BW workbench to compile correctly,... maybe I'm not using a large enough paging file. Do you have a media list to share, so I can download the correct packages from my account?

      I did install the latest BOBJ platform with some extras on a 5GB RAM virtual box with two cores added. It works really good (perhaps due to my SSD drive) but generally I think it's not as demanding as NW 7.3/NW7.4?

      Cheers

      Peter

      Author's profile photo Former Member
      Former Member

      i am facing this error while install sap hana

      already set env variable and python script

      SAP HANA Database installation kit detected.

       

      Installation failed

        

      Checking system requirements failed

          

      Performing HANA platform check script failed

          

         Performing python script failed

             

        Starting external program /usr/bin/python

        

               Command line is: /usr/bin/python /dump/51046696/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server/HanaHwCheck.py

                 Output line 1:

                  Output line 2: performing Hardware check......

            

           Output line 3:

               

        Output line 4: System Manufacturer            Intel Corporation         not supported

              

         Output line 5: System Product Name            S3420GPV                  not supported

                 

      Output line 6: CPU Model                      X3430                     not supported

           

          Output line 7: Memory Total                   16384 MB                  not enough memory or wrong memory configuration!

               

        Output line 8: Memory Total                   16384 MB                  OK       

               

        Output line 9: Core count                     4                         OK       

                

      Output line 10: Hyper-threading                Activated                 OK       

          

             Output line 11: Numa functionality             Activated                 OK       

                  Output line 12:

             

          Output line 13: Hardware check failed!!

            

           Output line 14:

                  Program terminated with exit code 255

      Author's profile photo Former Member
      Former Member

      Hi,

      After installation we restarted the machine and the mounted directories are no longer visible, if I mount them again would that solve the issue? As I can see there is 35 GB of data in the main directory and what is the solution to avoid this in future.

      Regards,

      Nitin Jain

      Author's profile photo Shaun Wimpory
      Shaun Wimpory
      Blog Post Author

      Hi Nitan,

      Sorry for my late reply.  I'm not too sure exactly what you mean?

      If you look in /etc/fstab you should see that the filesystems are set to automount.  If not you might want to make sure this is the case.

      If you are seeing 35GB of "data" in the main directory ... do you mean the root filesystem or in another filesystem?

      Regards

      Shaun

      Author's profile photo Former Member
      Former Member

      Hello Shaun Wimpory

      This is very urgent thing... 🙁

      I´m trying to update our HANA system, but during the update the system show me the following error:

      Error Message: Execution of 'Update from single SP' failed.

      Detailed Message: Could not update software component(s) sap.com/HDB on host satdha03.

      Execution of operation update-newdb-server-nzdm-v2 failed. Exit code of the operation is 1.

      Command execution failed.

      Help: http://help.sap.com/hana

      I checked the logs and I see the following lines:

      Detecting system landscape...

      System landscape detected

      Deploying SAP Host Agent configurations on host satdha03

      SAP Host Agent configurations deployed on host satdha03

      Detecting system components...

      Detecting available support packages 

      Scanning SAP Service Marketplace Software Download Center for available patches

      Downloading single support packages from SAP Service Marketplace...

      Downloading IMDB_CLIENT100_82_0-10009663.SAR (277912 kB)

      Downloading IMDB_LCAPPS100_82_0-20010426.SAR (71423 kB)

      Downloading SAPHOSTAGENT190_190-20005731.SAR (38849 kB)

      Downloading IMDB_AFL100_82_0-10012328.SAR (413400 kB)

      Downloading IMDBSERVER10082_0-10009569_P1.TAR (2500000 kB)

      Downloading IMDBSERVER10082_0-10009569_P2.TAR (2319600 kB)

      Downloading IMC_STUDIO100_82_0-10009662.SAR (335665 kB)

      Start extract of multi-span tar files

      End extract of multi-span tar files

      Checking selected support packages...

      Scanning archive /hana/shared/HD2/trans/SMPPatches/SAPHOSTAGENT190_1  90-20005731.SAR for components ...

      Scanning archive /hana/shared/HD2/trans/SMPPatches/IMDB_AFL100_82_0-10012328.SAR for components ...

      Scanning archive /hana/shared/HD2/trans/SMPPatches/IMDB_CLIENT100_82 _0-10009663.SAR for components ...

      Scanning archive /hana/shared/HD2/trans/SMPPatches/IMDB_LCAPPS100_82  _0-20010426.SAR for components ...

      Scanning archive /hana/shared/HD2/trans/untar_IMDBSERVER10082_0-10009569_P1_TAR/IMDB_SERVER100_82_0.SAR for components ...

      Scanning archive /hana/shared/HD2/trans/SMPPatches/IMC_STUDIO100_82_ 0-10009662.SAR for components ...

      Check of selected support packages finished.

      Updating SAP HANA system from single SP...

      Updating SAP HANA system...

      Checking update prerequisites for component(s) sap.com/HANA_AFL ...

      Checking update prerequisites for component(s) sap.com/HDB_CLIENT_CLIENT ...

      Checking update prerequisites for component(s) sap.com/LCAPPS_HDB ...

      Checking update prerequisites for component(s) sap.com/HDB ...

      Checking update prerequisites for component(s) sap.com/HDB_STUDIO_STUDIO ...

      Updating software component(s) sap.com/SAPHOSTAGENT on host satdha03...

      Extracting /hana/shared/HD2/trans/SMPPatches/SAPHOSTAGENT190_1  90-20005731.SAR ...

      Updating SAP Host Agent ...

      Upgrade service

      [Thr 140278294964000] Thu Aug 28 13:43:16 2014

      [Thr 140278294964000] *** WARNING => HostExecUpgrade initialization - Unable to stat /usr/sap/hostctrl/exe/SIGNATURE.SMF: No such file or directory [HostExecAuto 115]

      IsUpgradeNecessary: /hana/shared/HD2/trans/HD2/saphostagent/saphostexec  is newer than /usr/sap/hostctrl/exe/saphostexec

      Upgrade saphostexec / saphostcontrol 

      Check Installation Path ...

      saphostexec is already running (pid=17737). Stopping...

      Install SYS-V service ...-> Start /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile <-

      start hostcontrol using profile /usr/sap/hostctrl/exe/host_profile

      [OK] SAPHostExec / SAPHostControl successfully upgraded

      Updating software component(s) sap.com/HANA_AFL on host satdha03...

      Extracting archive /hana/shared/HD2/trans/SMPPatches/IMDB_AFL100_82_0-10012328.SAR...

      SAP Application Function Libraries installation kit detected.

      SAP HANA Lifecycle Management - SAP AFL Installation 1.00.82.00.394270

      Checking installation...

      Preparing package 'AFL'...

      Installing SAP Application Function Libraries to /hana/shared/HD2/exe/linuxx86_64/plugins/afl_1.00.8 2.00.394270_1662528...

      Installation is up-to-date

      Installation done

      Log file written to '/var/tmp/hdb_afl_2014-08-28_13.43.26/hdbinst_afl.log'.

      Updating software component(s) sap.com/LCAPPS_HDB on host satdha03...

      Extracting archive /hana/shared/HD2/trans/SMPPatches/IMDB_LCAPPS100_82  _0-20010426.SAR...

      SAP liveCache Applications installation kit detected.

      SAP HANA Lifecycle Management - SAP LCAPPS Installation 1.00.82.00.394270

      Checking installation...

      Preparing package 'LCAPPS'...

      Installing SAP liveCache Applications to /hana/shared/HD2/exe/linuxx86_64/plugins/lcapps_1.0 0.82.00.446853_4010352...

      Installation is up-to-date

      Installation done

      Log file written to '/var/tmp/hdb_lcapps_2014-08-28_13.43.30/hdbinst_lcapps.log'.

      Updating software component(s) sap.com/HDB on host satdha03...

      Extracting archive /hana/shared/HD2/trans/untar_IMDBSERVER10082_0-10009569_P1_TAR/IMDB_SERVER100_82_0.SAR...

      Upgrade failed

        Checking system requirements failed 

          Performing HANA platform check script failed

            Performing python script failed

              Starting external program /usr/bin/python

                Command line is: /usr/bin/python /hana/shared/HD2/trans/HD2/IMDB_SERVER100_82_0/SAP_  HANA_DATABASE/server/HanaHwCheck.py

                Output line 1: 

                Output line 2: performing Hardware check......

                Output line 3: 

                Output line 4: System Manufacturer            Microsoft Corporation     not supported

                Output line 5: System Product Name            Virtual Machine           not supported

                Output line 6: CPU Model                      0                         not supported

                Output line 7: OS                             SLES 11 SP 3              OK        

                Output line 8: Memory Total                   131072 MB                 OK        

                Output line 9: Core count                     8                         OK        

                Output line 10: Hyper-threading                Activated                 OK        

                Output line 11: Numa functionality             Activated                 OK        

                Output line 12: 

                Output line 13: Hardware check failed!!

                Output line 14: 

                Program terminated with exit code 255

      Update SAP HANA system process executor failed

      I searched for a solution, I found the following threads:

      http://scn.sap.com/thread/3179767

      and this one in your own blog:

      http://scn.sap.com/community/developer-center/hana/blog/2013/06/16/sap-hana-installation-in-oracle-virtualbox-vm

      I tried the solution described in above links (the solution that you mentioned and you show in your part 2 video) but unfortunately without success at the end!

      I did the following change in the HanaHwCheck.py file in this two locations:

      /hana/shared/HD2/trans/HD2/IMDB_SERVER100_82_0/SAP_  HANA_DATABASE/server

      /usr/sap/HD2/HDB00/exe/python_support

      With vi editor I commented the line self.HWInfo['CPU Sockets']=len(lines)-1 and I added the line self.HWInfo['CPU Sockets']=1

      Next I set the environment variable IDSPISPOPD:

      export IDSPISPOPD="1"

      Then I ran the following python commands:

      python

      import os

      'IDSPISPOPD' in os.environ.keys()

      exit()

      I ran the update process again using the same option in Lifecycle Manager (LCM) - "Apply Single Support Packages" and again it show me the same error! 🙁

      So, this solution doesn't work for my case... I´m doing something wrong?

      How can I solve this issue!? How can I continue this SAP Hana update!? Can you help me please?

      Best Regards,

      samid raif

      Author's profile photo Former Member
      Former Member

      Hi

      Is it possible to apply this in SAP HANA Platform SPS09?

      Best Regards,

      Gelo