Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save unabridgedxcrpt/a411ea206d6b783726422558d2a83e1d to your computer and use it in GitHub Desktop.
Save unabridgedxcrpt/a411ea206d6b783726422558d2a83e1d to your computer and use it in GitHub Desktop.
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer
sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .
../prepare_iso/prepare_ovf.sh macOS_10.12.vdi

Now transfer the following files to Windows:

  • osw-vm-templates/packer/macOS_10.12.ovf
  • osw-vm-templates/packer/macOS_10.12-disk001.vmdk

On Windows

In Virtualbox File->Import Applicance. Select the OVF file generated on the Mac. Accept all the defaults to import the appliance and its disk image.

Don't start the image yet!

In a console issue the following commands to modify the image so it thinks it's running on a real Mac:

cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "macOS Sierra" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

Start the image in Virtualbox. It might take a while to start up with long pauses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment