Apple Mac OS X VM

This page describes how to install MacOS X as a Virtual Machine on Ubuntu.


Everything that follow is a copy with more details of this amazing tutorial:

The following setup also rely on



You must have a valid MAC OS X installer disk.


To do so you must "create installer" from another MAC

(i) If you don't have a MAC already you can search for "Download MacOS Sierra iso" on Google. The ISO is about 4.8 Go to download ; then 8 Go once extracted.


First of all, you must setup VirtualBox. Official setup instructions are available on ORACLE web-page:

Add new repository

vim /etc/apt/sources.list


deb zesty contrib

Add the repository keys and update the definitions

# Repo keys
apt-key add oracle_vbox_2016.asc
apt-key add oracle_vbox.asc
### Alternative way to download and register the keys
wget -q -O- | sudo apt-key add -
wget -q -O- | sudo apt-key add -

# Upgrade list of packages
apt-get update

Install VirtualBox

apt-get install virtualbox-5.1

(i) Note: Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade.

apt-get install dkms

You must REBOOT after installation - like in Windows. :_(

Setup Virtual Machine

  • Launch VirtualBox

Create a NEW machine


  • Name "Sierra"
  • Type Mac OS X 10.11 El Capitan (64-bit)
  • Memory settings
    • if you can, allocate at least 4 Gb (4096 Mb) to the VM
  • Hard disk
    • Create a new hard disk
    • Type VDI as VirtualBox Disk Image (default)
    • Allocation 'dynamic allocation
    • Max size: 45 Gb

Configuration tweaks

You must tweak the machine before starting the installation.

  • Select the VM and click on "Settings"
  • Select System then processor tab
    • Set 2 CPU
  • Select Display
    • Allocated, at least, 64 Mb
  • Select Shared folders
    • Add all the mount points you need

Register OS X factory settings

From a terminal type the following commands (adjust "Sierra" to your own VM name).

Thanks to for the commands!

VBoxManage modifyvm Sierra  --cpuidset 00000001 000306a9 00020800 80000201 178bfbff
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

Add the ISO file