Appendix: Compiling GEOSX on macOS using an Ubuntu Virtual Machine¶
This document summarizes the steps needed to compile GEOSX on a device running OSX via an Ubuntu Virtual Machine. The virtualization layer provided by VirtualBox will be used. Many Mac users find this approach more straightforward than setting up a native OSX environment for GEOSX.
Installing VirtualBox¶
The following instructions are taken from Matthew Palmer’s blog.
- Download the latest binary for OS X hosts from the VirtualBox downloads page.
- Run the VirtualBox installer.
- After reaching the end, installation will fail with the following message
- Navigate to System Preferences > Security & Privacy. At the bottom of the window, you should see a message saying “System software from developer, ‘Oracle, America, Inc.‘ was blocked from loading.”
- Click the lock in the bottom left corner, enter your password
- Click ‘Allow’ next to the ”blocked from loading” message.
- Re-run the VirtualBox installer. It should succeed.
Creating an Ubuntu Virtual Machine¶
- Download an image of the latest Long Term Support (LTS) version of Ubuntu here.
- Open the VirtualBox Manager window by double-clicking on the “VirtualBox” item in the “Applications” folder.
Click on the “New” button at the top of the VirtualBox Manager window. A wizard will pop up to guide you through setting up a new virtual machine (VM):
- Define name and operating system for the Ubuntu Virtual Machine
- Assign memory size to be assigned to the Virtual Machine
- Create a virtual disk
- Select the virtual disk type
Select the VDI option.
- Select the memory allocation type for the virtual hard disk.
For better performance, use a fixed-size virtual hard drive.
- Specify the Name and Size of the virtual hard disk
This depends on the amount of free memory on your computer; 30GB is a reasonable choice. Feel free to type in the hard drive size manually using GB for gigabytes.
- Install the operating system of the Virtual Machine
Navigate to the virtual box to the Ubuntu .iso file. Unless specified otherwise, it should reside in your Download folder. Then click Start
Installation of the Ubuntu Virtual machine
- Select your language and click on “Install Ubuntu”
- Select a Normal Installation, and activate the download of updates
- Proceed with the installation
- Select your Ubuntu username and password
- If successful, follow the prompt to reboot your virtual machine
After restarting the Virtual Machine, login, open a new terminal (
control+option+T
) and install Ubuntu updates
sudo apt update
sudo apt upgrade
Customize the Virtual machine
We will now configure the shared drive and shared clipboard between your virtual Ubuntu machine and your host MacOS machine.
- Right-click on the newly created Ubuntu Virtual Machine in the VM Virtual Box Manager, and select Settings
- Under the General section, in the Advanced tab, select bidirectional clipboard and drag’n drop options.
This allows you to copy-paste and drag-and-drop files seamlessly and in both directions between your virtual and real machine.
- Under the System section in the Processor tab, assign the maximum number of processors and RAM available to the Virtual Machine
- In the Shared Folder section, add a shared folder for the Ubuntu Virtual Machine on the MacOS host.
Click OK
to close all Settings windows.
- Start the virtual machine and log in
Once the machine has finished booting, notice the application menu bar at the very top of your host machine screen (the VirtualBox VM bar) has now a Device option.
- Go to Devices > Insert Guest Additions CD image
- At the prompt, click on Run
- Open a terminal and yourself to the Virtual Box share folder group and reboot
sudo usermod -G vboxsf -a YOUR_USERNAME reboot
- The shared folder will now be accessible and located at `` /media/sf_FOLDER_NAME``.