Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32dc71708c | ||
|
|
54a7e6811c | ||
|
|
dc02b6919f | ||
|
|
461953bc59 | ||
|
|
48f33a76d8 | ||
|
|
861f02bb98 | ||
|
|
9d3ae02c5c | ||
|
|
d8aaca529d | ||
|
|
ce3ee4c410 | ||
|
|
0d5f89aa2d | ||
|
|
5a9c88f0e1 | ||
|
|
1ce5c9319f | ||
|
|
90d177dbae | ||
|
|
c95e56618e | ||
|
|
f50240419d |
@@ -9,7 +9,7 @@ A default install only requires the user to sit patiently and, less than ten tim
|
||||
|
||||
Tested on `bash` and `zsh` on [Cygwin](https://cygwin.com/install.html). Works on macOS, CentOS 7, and Windows. Should work on most modern Linux distros.
|
||||
|
||||
macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13) currently supported. The virtual machine may be upgraded to the latest Big Sur (11) version through Software Update.
|
||||
macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13) currently supported.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -37,6 +37,10 @@ Developing and maintaining VirtualBox or macOS features is beyond the scope of t
|
||||
|
||||
macOS guests on VirtualBox are incompatible with some CPU models. If the guest macOS boot process hangs on “LoadKernelFromStream”, “EndRandomSeed”, or "EXITBS", see the [documentation command](#documentation) regarding VirtualBox CPU profiles and [CPUID settings](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-teleport). Some CPU models released in 2020 and later may fail to start or complete the installer, and may require manually adjusting the CPUID settings.
|
||||
|
||||
### Upgrading to Big Sur and Monterey
|
||||
|
||||
The virtual machine may be upgraded to the latest macOS Big Sur (11) and macOS Monterey (12) versions through Software Update. Big Sur may be installed in-place. Monterey may require attaching another volume to the virtual machine and selecting the volume as the installation target, otherwise the upgrade is prone to failing and entering a boot loop.
|
||||
|
||||
### Performance and deployment
|
||||
|
||||
After successfully creating a working macOS virtual machine, consider importing it into more performant virtualization software, or packaging it for configuration management platforms for automated deployment. These virtualization and deployment applications require additional configuration that is beyond the scope of the script.
|
||||
@@ -47,7 +51,7 @@ QEMU with KVM is capable of providing virtual machine hardware passthrough for n
|
||||
|
||||
The VirtualBox Native Execution Manager (NEM) is an experimental VirtualBox feature. [VirtualBox uses NEM when access to VT-x and AMD-V is blocked by virtualization software or execution protection features such as Hyper-V, WSL2, WSLg, Windows Sandbox, memory integrity protection, Application Guard, Credential Guard, Device Guard, and other features and software.](https://docs.microsoft.com/en-us/troubleshoot/windows-client/application-management/virtualization-apps-not-work-with-hyper-v) macOS and the macOS installer have memory corruption issues under NEM virtualization. The script checks for NEM and exits with an error message if it is detected.
|
||||
|
||||
[VirtualBox can run on WSL2 and WSLg with some kernel module compilation](https://github.com/myspaghetti/macos-virtualbox/issues/525), though performance is extremely low. At the point that kernel module compilation is required, it's preferable to use QEMU/KVM. QEMU/KVM on WSL2 and WSLg is orders of magnitude faster than VirtualBox. WSL2, WSLg, QEMU, and KVM require additional configuration that is beyond the scope of the script.
|
||||
[VirtualBox can run on WSL2 and WSLg with some kernel module compilation](https://github.com/myspaghetti/macos-virtualbox/issues/525), though performance is extremely low. At the point that kernel module compilation is required, it may be preferable to use QEMU/KVM on WSL2 and WSLg, which is orders of magnitude faster than VirtualBox on WSL2 and WSLg. WSL2, WSLg, QEMU, and KVM require additional configuration that is beyond the scope of the script.
|
||||
|
||||
### Bootloaders
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Push-button installer of macOS on VirtualBox
|
||||
# (c) myspaghetti, licensed under GPL2.0 or higher
|
||||
# url: https://github.com/myspaghetti/macos-virtualbox
|
||||
# version 0.99.1.5
|
||||
# version 0.99.1.7
|
||||
|
||||
# Dependencies: bash coreutils gzip unzip wget xxd dmg2img
|
||||
# Optional features: tesseract-ocr tesseract-ocr-eng
|
||||
@@ -169,7 +169,7 @@ if [[ ! $- =~ i ]]; then # terminal is not interactive
|
||||
echo ""
|
||||
tesseract_ocr="$(tesseract --version 2>/dev/null)"
|
||||
tesseract_lang="$(tesseract --list-langs 2>/dev/null)"
|
||||
regex_ver='[Tt]esseract 4' # for zsh quoted regex compatibility
|
||||
regex_ver='[Tt]esseract [4-5]' # for zsh quoted regex compatibility
|
||||
if [[ ! ( "${tesseract_ocr}" =~ ${regex_ver} ) || -z "${tesseract_lang}" ]]; then
|
||||
echo "Running the script on a non-interactive shell requires the following packages:"
|
||||
echo -e " tesseract-ocr >= 4 tesseract-ocr-eng\n"
|
||||
@@ -716,8 +716,8 @@ if [[ -n "$(
|
||||
--audiocodec stac9221 --audio=none 2>&1 >/dev/null
|
||||
)" ]]; then
|
||||
echo -e "\nError: Could not configure virtual machine \"${vm_name}\"."
|
||||
echo -e "Please execute the stage ${low_contrast_color}configure_vm${default_color} again before resuming the script"
|
||||
echo -e "as described in the documentation.\n"
|
||||
echo -e "If the VM is powered on, power off the virtual machine and resume the script or"
|
||||
echo -e "execute the stage ${low_contrast_color}configure_vm${default_color}\n"
|
||||
echo "Exiting."
|
||||
exit
|
||||
fi
|
||||
@@ -997,7 +997,7 @@ mkdir -p "/Volumes/'"${vm_name}"'/tmp/mount_efi" && \
|
||||
mount_msdos /dev/${disks[0]}s1 "/Volumes/'"${vm_name}"'/tmp/mount_efi" && \
|
||||
cp -r "/Volumes/'"${macOS_release_name:0:5}-files"'/ESP/"* "/Volumes/'"${vm_name}"'/tmp/mount_efi/" && \
|
||||
installer_pid=$(ps | grep startosinstall | grep -v grep | cut -d '"'"' '"'"' -f 3) && \
|
||||
kill -SIGUSR1 ${installer_pid}' > "${vm_name}_configure_nvram.txt"
|
||||
kill -SIGUSR1 ${installer_pid}' >> "${vm_name}_configure_nvram.txt"
|
||||
# Find background process PID, then
|
||||
# start the installer, send SIGUSR1 to concurrent bash script,
|
||||
# the other script copies files to EFI system partition,
|
||||
@@ -1610,10 +1610,12 @@ function prompt_lang_utils_terminal() {
|
||||
if [[ "${ocr}" =~ ${regex_lang} ]]; then
|
||||
animated_please_wait 20
|
||||
send_enter
|
||||
animated_please_wait 20
|
||||
elif [[ "${ocr}" =~ Utilities ]]; then
|
||||
animated_please_wait 20
|
||||
kbspecial='CTRLprs F2 CTRLrls u ENTER t ENTER' # start Terminal
|
||||
send_special
|
||||
animated_please_wait 20
|
||||
elif [[ "${ocr}" =~ ${regex_term} ]]; then
|
||||
sleep 2
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user