At the end of 2020 Apple released Macintosh computers with a dramatic shift in hardware, leaving behind the Intel x86 based CPU’s and using their own in house M1 arm based CPU’s. This shift meant software had to be recompiled or rearchitected to run natively on the M1 processor. While some x86 based apps will run under Apple’s Rosetta software others will not. Running Hana on the mac requires running in a supported virtual machine, none of which will run x86 based virtual machine images on M1 Macs. However, after some research, and trial and error I’ve figured out a way to run Hana Express on M1 Macs.

Steps to Run

First off you will need to install a freeware virtual machine called UTM. You can download that here:

https://mac.getutm.app/

You will then need to obtain the Hana Express virtual machine image. You will have to first register for an account following these steps:

https://developers.sap.com/tutorials/hxe-ua-register.html

Then download the virtual machine following these steps. This will guide you to download and run the Hana Express Download Manager. When running the Download Manager make sure to download the “Server only virtual machine” VM image. This means you will end up with a file called hxe.ova. Note down where the hxe.ova file is saved.

Hana%20Express%20Download%20Manager

Hana Express Download Manager

https://developers.sap.com/tutorials/hxe-ua-download-vm.html

Once the download has completed open a Terminal window and navigate to where the file was downloaded.
First the hxe.ova file will have to be renamed to hxe.tgz. Type the following command in the Terminal to do this:

mv hxe.ova hxe.tgz

Next the compressed image will have to be uncompressed through this command:

tar xvf hxe.tgz

Once the decompression has completed, there will be a few files in the directory. The target file for the next step is: hxe-disk1.vmdk.gz

This file will also need to be uncompressed:

gunzip hxe-disk1.vmdk.gz

This will result in a file called hxe-disk1.vmdk

The hxe-disk1.vmdk file will need to be converted to a format UTM can read which is a QCOW2 file.

If you don’t already have homebrew installed please install it from here: https://brew.sh/

Once you have homebrew you can install a utility called QEMU that will convert the hxe-disk1.vmdk file to a QCOW2 file. Install QEMU through homebrew as follows:

brew install qemu

With QEMU installed run the following to convert to the qcow2 format:

qemu-img convert -f vmdk -O qcow2 hxe-disk1.vmdk hxe-disk1.qcow2

 

Now UTM can be launched and a new VM can be added by pressing the + button:

UTM%20Add%20VM

UTM Add VM

 

Next choose the Emulate button:

UTM%20Choose%20Emulate

UTM Choose Emulate

 

On the next screen choose other:

UTM%20Choose%20Other%20Operating%20System

UTM Choose Other Operating System

 

After that make sure the Skip ISO boot checkbox is checked:

UTM%20Skip%20ISO

UTM Skip ISO

 

On the next screen titled Hardware set the memory to 8124MB minimum.

The Storage and Shared Directory screens can be left to their default settings. And on the Summary page press Save.

Back on the main UTM page, make sure you new VM is selected and press the settings button seen in this screenshot:

Edit%20Preferences%20for%20New%20VM

Edit Preferences for New VM

 

Under the System settings section we need to change the default CPU to “Enables all features supported by the accelerator in the current host (max)

Change%20CPU%20Selection

Change CPU Selection

In the QEMU section UEFI needs to be unchecked:

Uncheck%20UEFI%20Boot

Uncheck UEFI Boot

And in the IDE section, press the red Delete Drive button to delete the current drive:

Delete%20The%20IDE%20Drive

Delete The IDE Drive

 

Then press the New Drive button and set the settings as seen here and press the Import button:

Import%20qcow2%20File%20As%20New%20Drive

Import qcow2 File As New Drive

 

On the Import screen choose the qcow2 file that we generated in the previous steps and once that is done press Save.

Back on the main UTM screen you can now press the play button on the new VM to start it and then follow the normal Hana setup steps as detailed in these two tutorials:

https://developers.sap.com/tutorials/hxe-ua-keyboard-vm.html

then

https://developers.sap.com/tutorials/hxe-ua-getting-started-vm-xsa.html

 

A few notes about the setup, the user to connect to the fully setup database will be SYSTEM and the jdbc port will be 39015.

 

In this blog we have learned how to prepare the Hana Express VM to be imported into UTM. We have also learned how to setup UTM to host the Hana Express VM. And most importantly we have Hana Express running on the M1 Mac!

 

Please let me know if you have any questions or feedback for this post. I hope this helps you get started with Hana!

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x