Skip to content

Instantly share code, notes, and snippets.

@rob-smallshire
Last active April 3, 2024 19:03
Show Gist options
  • Star 47 You must be signed in to star a gist
  • Fork 13 You must be signed in to fork a gist
  • Save rob-smallshire/0c4403afb0523dd57c9f4b3693344f14 to your computer and use it in GitHub Desktop.
Save rob-smallshire/0c4403afb0523dd57c9f4b3693344f14 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.

@ph33rz
Copy link

ph33rz commented Feb 24, 2019

are you able to use imessage and and sign into icloud? I have this working on vmware but the performance of vmware workstation 15 is such crap.

@tbalza
Copy link

tbalza commented Jul 12, 2019

How would you extract your original cpuidset, DmiSystemProduct, DmiSystemVersion, DmiBoardProduct, DeviceKey, GetKeyFromRealSMC ?

I'm thinking of using it to compile Xcode apps in virtual box running in an original instead of running an external SSD install

@joaobrasil65
Copy link

How would you extract your original cpuidset, DmiSystemProduct, DmiSystemVersion, DmiBoardProduct, DeviceKey, GetKeyFromRealSMC ?

I'm thinking of using it to compile Xcode apps in virtual box running in an original instead of running an external SSD install

You ever get an answer?

@tute123456
Copy link

works in cpu Intel and AMD?

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