Create a macOS High Sierra VM
After struggling for many hours to get macOS (High Sierra) running in a VM (Virtualbox) on a Linux host (Ubuntu/Mint), I finally succeeded. Although there were dozens of really good tutorials on the topic, none of them were a 100% solution to my specific situation. Here’s what I did to get it working.
- My instructions are for Virtualbox, but VMWare would be similar. The one big difference is referenced in the article.
- Oracle does NOT provide Virtualbox guest additions for macOS. You will not be able to go full screen, drag-and-drop, copy-and-paste, etc. My primary interface to the OS is over SSH (rarely GUI) into a headless instance, so it was not an issue for me.
- The bulk of the instruction you will need is found at: https://tobiwashere.de/2017/10/virtualbox-how-to-create-a-macos-high-sierra-vm-to-run-on-a-mac-host-system/. My article will direct you back and forth to Tobi’s article, as well as a few other articles, in an attempt to put the puzzle pieces together for you.
Step #1 – Obtain the macOS (High Sierra) Installer
As mentioned in Tobi’s article, you will be downloading macOS from the Mac App Store. This involves having/running macOS. Although there are many places online you can find an older version of macOS to perform this step, I recommend just inviting a friend over for dinner and having them bring their laptop. Side note: I would also recommend better screening of the friends you make if you have a high percentage of Apple loving friends.
The important thing to keep in mind here is Apple seems to randomly decide who gets the full download, versus a ~19mb stub installer. The full installer is over 8GB, so it will be obvious you only receive the installer if the download portion only takes a few seconds. If you only obtained the stub installer, there are several options to get the full download. Here are a few…
- Use the “MacOS High Sierra Patcher”. A great write-up about that method can be found here: http://osxdaily.com/2017/09/27/download-complete-macos-high-sierra-installer/
- Click “install” after the stub downloads. But, be sure you DO NOT RESTART. This will download the installer, but it will still need to be moved over to the correct location after it downloads. A great discussion about this and steps for this method can be found here: https://apple.stackexchange.com/questions/299731/macos-high-sierra-media-installer
Step #2 – Create the macOS Installer ISO
Now, jump over to https://tobiwashere.de/2017/10/virtualbox-how-to-create-a-macos-high-sierra-vm-to-run-on-a-mac-host-system/ and work through the section, “Create a macOS install ISO file for VirtualBox”, skipping the first step (downloading macOS…) since you have already done that.
If you get an error when running the createinstallmedia command, go back to Step #1 in this article.
Step #3 – Create the VM
Go back to https://tobiwashere.de/2017/10/virtualbox-how-to-create-a-macos-high-sierra-vm-to-run-on-a-mac-host-system/, and follow Tobi’s steps on creating the Virtualbox VM, paying close attention to each detail. Be sure to STOP when you get to “Installation of macOS High Sierra Part 1.”
Since Tobi was running on a Mac host, he did not need the following steps, but you will if you are running Windows or Liunx (like me). You need to add the metadata to trick the guest VM into thinking it is running on Apple hardware.
Next, go to this link and ONLY follow step #5: https://techsviewer.com/how-to-install-mac-os-x-el-capitan-on-pc-on-virtualbox/. Note: the instruction given is for Windows. For Linux, simply ignore the “cd” command and remove “.exe” from the next command and everything else should work as is.
For VMWare, the steps above are similar. The biggest difference is in how you get the guest VM to trick the OS. Do a Google search for “patch vmware macos guest” for various methods. I caution you against using any binary patchers for this; stick to human readable scripts to ensure you are not running a trojanized patcher.
Step #4 – Install macOS
Finally, complete the steps, “Installation of macOS High Sierra Part 1” and “Part 2” from Tobi’s instructions: https://tobiwashere.de/2017/10/virtualbox-how-to-create-a-macos-high-sierra-vm-to-run-on-a-mac-host-system/. Again, pay close attention to every detail he gives.
If you tried these steps, I hope they worked out for you. Be sure to let me know if you had success or not.
A huge shout out to Tobi for the detailed steps he took in writing his article. Also, thanks to John and osxdaily for their respected articles/posts I linked to in this article.
To adjust the size of your guest VM’s display, read here: https://www.virtualbox.org/manual/ch03.html#efividmode
VBoxManage setextradata "[VM Name]" VBoxInternal2/EfiGraphicsResolution 1920x1080
Windows -> MacOS keyboard mappings
Keyboard Mapping Changes
Finder > Applications > System Preferences > Keyboard > Modifier Keys:
- Option Key dropdown menu > Command
- Command Key dropdown > Option
Fix the scroll of the mouse to the actual “natural” direction, not what Apple calls natural.
Finder > Applications > System Preferences > Mouse > uncheck “scroll direction”