There are three major steps to install OS X High Sierra in VirtualBox in a Windows 10 host:
- Download High Sierra
- Prepare an ISO with the High Sierra installer
- Set up a virtual machine in VirtualBox
I used a Mac in the first two steps and completed the last two steps on the target Windows machine.
Downloading High Sierra
At the time of this writing, High Sierra was the most recent version of Mac OS X that could be installed in a VirtualBox virtual machine. However, High Sierra is no longer available for download from the Apple App Store.
High Sierra can still be downloaded from third-party websites. I downloaded a copy through this macOS High Sierra Patcher Tool for Unsupported Macs. Once the tool is downloaded, open it and use its built-in downloading feature. In the menu bar, select Tools > Download macOS High Sierra…
After a few minutes, you should have a copy of the High Sierra installer.
Preparing an ISO
Once you have a copy of the High Sierra installer, an iso file must be prepared to install it in the virtual machine. The only way I could get an iso that worked on VirtualBox was by using the script suggested in this superuser.com answer:
#!/bin/bash installer="/Applications/Install macOS High Sierra.app" hdiutil create -o /tmp/HighSierra.cdr -size 5500m -layout SPUD -fs HFS+J hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build sudo "$installer"/Contents/Resources/createinstallmedia --volume /Volumes/install_build mv /tmp/HighSierra.cdr.dmg ~/Downloads/InstallSystem.dmg hdiutil detach /Volumes/Install\ macOS\ High\ Sierra hdiutil convert ~/Downloads/InstallSystem.dmg -format UDTO -o ~/Downloads/HighSierra.iso
Note that this is the original script, and it was written assuming that the High Sierra installer was downloaded from the App Store into the Applications directory. Before running the script, make sure the installer variable points to the right location of your High Sierra installer.
Setting up the Virtual Machine
Switch to the Windows 10 machine in which you want to set up the virtual machine. Copy over the iso created in the previous step and make sure both VirtualBox and its extension pack are installed. If not, both can be downloaded from this page. With both pieces of software installed, create the virtual machine the following steps:
- Open VirtualBox
- Click New to create a new virtual machine.
- Enter the name for the new virtual machine; e.g., High Sierra, and click Next.
- Select the amount of RAM for your virtual machine, making sure you leave enough for Windows, and click Next.
- Choose Create a virtual hard disk now and click Create.
- Leave the default setting VDI (Virtual Disk Image) and click Next.
- Leave the default setting Dynamically allocated and click Next.
- Choose the size of the virtual hard disk and click Create.
At this point, the virtual machine has been created, but it requires extra configuration to install High Sierra from the iso file you created earlier.
- Select the High Sierra virtual machine you just created and click Settings (the button with the cog icon).
- On the side menu, click System.
- On the Motherboard tab of the right panel, uncheck the Floppy option from the Boot Order list.
- Switch to the Processor tab, set the number of Processor(s) to 2 or more and check the Enable PAE/NX option.
- On the side menu, click Storage.
- Under storage devices, click Empty.
- Under Attributes, click the optical disk icon.
- Select the High Sierra iso, and check the Use host I/O cache option.
- On the side menu, click Display.
- Set Video Memory to 128 MB.
- Click OK to save.
For the last configuration steps, close VirtualBox, open the Windows command line prompt, and run the following commands:
cd "C:\Program Files\Oracle\VirtualBox\" VBoxManage modifyvm "High Sierra" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac17,1" VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" VBoxManage setextradata "High Sierra" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
Finally, open VirtualBox again, select your High Sierra virtual machine, and click Start. This will boot your virtual machine with the High Sierra iso set up earlier. Simply follow the steps to install the operating system.