Created
October 3, 2021 02:19
-
-
Save barijaona/646de90c66ef3a845057a71ea7a8ccef to your computer and use it in GitHub Desktop.
Creation of a macOS Sierra (macOS 10.12) guest VM through VirtualBox on a Mac host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# macOS installers can be found at https://support.apple.com/en-us/HT211683 | |
# for Sierra (macOS 10.12), after running the installer | |
# you get "Install macOS Sierra.app" in your Applications folder | |
# work around "not a valid volume mount point" issues | |
# cf. https://forums.macrumors.com/threads/not-a-valid-volume-mount-point-cant-make-bootable-drive.1935673/page-3?post=28197924#post-28197924 | |
sudo plutil -replace CFBundleShortVersionString -string "12.6.03" /Applications/Install\ macOS\ Sierra.app/Contents/Info.plist | |
# create a DVD-Rom disk image | |
hdiutil create -o /tmp/Sierra.cdr -size 5200m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --applicationpath /Applications/Install\ macOS\ Sierra.app | |
mv /tmp/Sierra.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ Sierra | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Sierra.iso | |
# disk image is located at ~/Desktop/Sierra.iso.cdr | |
# virtual machine "Sierra" was created through VirtualBox | |
# work around installation locked at "IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0, now 0, sm 0x0" | |
# mix of https://www.virtualbox.org/ticket/16644#comment:26 and minimalistically tuned hackintosh hacks | |
# VBoxManage is located at /Applications/VirtualBox.app/Contents/MacOS/VBoxManage | |
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro6,1" | |
VBoxManage setextradata "Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F22589C8" | |
VBoxManage modifyvm "Sierra" --paravirtprovider none | |
# REVERT BACK SYSTEM ACCELERATION WHEN INSTALLATION IS FINISHED | |
VBoxManage modifyvm "Sierra" --paravirtprovider default | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to create a macOS 10.12 (Sierra) virtual machine while running macOS 11.6 (BigSur).
Oracle VirtualBox 6.1