For development and testing purposes it is often useful to run virtual machines to test with. Running a Mac OS on a virtual machine is only allowed on official Mac hardware.
Searching for these command can be difficult so I wanted to put them all here for easier access. When installing Mac OS on VirtualBox you will need to run the following commands:
VBoxManage modifyvm “MacOS” –cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata “MacOS” “VBoxInternal/Devices/efi/0/Config/DmiSystemProduct” “iMac11,3”
VBoxManage setextradata “MacOS” “VBoxInternal/Devices/efi/0/Config/DmiSystemVersion” “1.0”
VBoxManage setextradata “MacOS” “VBoxInternal/Devices/efi/0/Config/DmiBoardProduct” “Iloveapple”
VBoxManage setextradata “MacOS” “VBoxInternal/Devices/smc/0/Config/DeviceKey” “ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc”
VBoxManage setextradata “MacOS” “VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC” 1
VBoxManage setextradata “MacOS” “VBoxInternal/TM/TSCMode” “RealTSCOffset”
Then install the Mac OS via virtual box.
To change the resolution use:
VBoxManage setextradata “MacOS” VBoxInternal2/EfiGraphicsResolution 1920×1080
Resolutions to choose:
1280×720 | 1920×1080 | 2560×1440 | 2048×1080 | 3840×2160 | 5120×2880 | 1280×800 | 1280×1024 |1600×900 | 1440×90
Thanks for the great article!