Have you ever tried to install macOS on VirtualBox for experimenting in a virtual machine and found the process to be lengthy and tedious? Fortunately, there is a bash script available that can simplify the process for you.
The “macos-guest-virtualbox.sh” script enables you to create a macOS virtual machine on VirtualBox using the original installation files directly from Apple’s servers without any modifications. After running the script, you only need to press the “Enter” key a few times to finalize the installation without interacting with the virtual machine itself.
The script has been tested by its creator on various platforms such as bash and zsh under Cygwin and on macOS, CentOS 7, and Windows. As a result, it is likely to work on most modern Linux distributions.
The script currently supports macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13) versions. The project repository provides extensive documentation, including instructions on configuring iCloud and iMessage connections and the recommended virtual disk storage size.
It’s important to note that some features are unavailable with the script, such as support for USB devices, audio, and FileVault. However, the script is compatible with the OpenCore bootloader, which can bypass certain limitations, such as enabling audio support with specific drivers. Therefore, it is worth testing.
Furthermore, this script serves as an excellent starting point for deploying a macOS virtual machine on other virtualization platforms, such as QEMU with KVM, to achieve performance closer to that of a native architecture.