Skip to content

Instantly share code, notes, and snippets.

@mcandre
Forked from rob-smallshire/macOS-in-virtualbox.md
Created March 19, 2018 02:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mcandre/b92b3518624956ba027b5395add493a8 to your computer and use it in GitHub Desktop.
Save mcandre/b92b3518624956ba027b5395add493a8 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