Skip to content

Instantly share code, notes, and snippets.

@mrled
Last active October 10, 2017 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrled/6c578360b02c197a7b6ba5f4c23b3e1b to your computer and use it in GitHub Desktop.
Save mrled/6c578360b02c197a7b6ba5f4c23b3e1b to your computer and use it in GitHub Desktop.
Fix macOS El Capitan VirtualBox VM
#!/bin/sh
usage() {
cat <<ENDUSAGE
$0: Apply required virtual firmware changes so that El Capitan will run under VirtualBox
Usage: $0 <VM_NAME>
ENDUSAGE
}
if test $# -ne 1 || test "$1" == "-h" || test "$1" == "--help"; then
usage
exit 1
fi
vm_name=$1
set -e
set -u
set -x
VBoxManage setextradata "${vm_name}" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "${vm_name}" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "${vm_name}" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "${vm_name}" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "${vm_name}" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
# if you have a Haswell CPU you also need to do this:
#VBoxManage modifyvm "${vm_name}" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment