Install VirtualBox on macOS (Mojave, High Sierra)

MacOS

When you program an iOS app related to Web server or Database server running on another operating system, such as Windows or Linux…

The problem is that you don’t have real devices running these operating systems. The simplest is to use virtual machines to simulate these systems. And Oracle VM VirtualBox is the best free software to do this.

The installation was successfully checked on the following macOS versions:

  • OS X El Capitan – 10.11
  • macOS Sierra – 10.12
  • macOS High Sierra – 10.13
  • macOS Mojave – 10.14

1. Download the Oracle VM VirtualBox version for macOS

You can check the latest version of VirtualBox here: Download
Under 'VirtualBox 6.0.4 platform packages' select 'OS X host'
Under ‘VirtualBox 6.0.4 platform packages’ select ‘OS X host’

The download file is in DMG format, like this: VirtualBox-6.0.4-128413-OSX.dmg

2. Install VM Virtualbox on macOS

Run the VirtualBox installer just like any other installer. You will get an error about kernel drivers, system extensions, and kernel modules will not being install in the first time.

Error when VM Virtualbox on macOS
Error when VM Virtualbox on macOS

When you see an error message “The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance“, the solution is as follows:

  • Go 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 ‘Allow’ next to the ”blocked from loading” message.
  • Enter your macOS account password
  • Reinstall the VM VirtualBox installer. It should succeed with below message:

3. Uninstallation

To uninstall Oracle VM VirtualBox, open the disk image dmg file and double-click on the uninstall icon shown.