VirtualBox Install MacOS
环境搭建
git clone https://github.com/myspaghetti/macos-virtualbox
脚本配置
修改macos-guest-virtualbox.sh部分内容为
vm_name="macOS" # name of the VirtualBox virtual machine
macOS_release_name="Catalina" # install "HighSierra" "Mojave" or "Catalina"
storage_size=40000 # VM disk image size in MB, minimum 22000
storage_format="vdi" # VM disk image file format, "vdi" or "vmdk"
cpu_profile="Intel Core i7-6700K" # VM CPU profile, see "CPU profiles" in docs
cpu_count=8 # VM CPU cores, minimum 2
memory_size=4096 # VM RAM in MB, minimum 2048
gpu_vram=128 # VM video RAM in MB, minimum 34, maximum 128
resolution="1280x800" # VM display resolution
cmd_path_VBoxManage='D:\program\virtualBox\VBoxManage.exe'
启动
git bash终端下运行
./macos-guest-virtualbox.sh
错误处理
出现Err(0xE) LocHB等错误,换其它cpu_profile重试
cpu_profile="host"
cpu_profile="Intel Xeon X5482 3.20GHz"
cpu_profile="Intel Core i7-2635QM"
cpu_profile="Intel Core i7-3960X"
cpu_profile="Intel Core i5-3570"
或者换macOS_release_name重试
macOS_release_name=HighSierra
macOS_release_name=Mojave
安装过程
1. 等待虚拟机安装界面进入苹果系统安装“选择语言”的窗口后,在git命令窗口回车。
2. 等待虚拟机安装界面进入苹果系统安装“磁盘工具”的窗口后,在git命令窗口回车。
3. 等待虚拟机安装界面进入苹果系统安装“工具-终端”打开终端窗口后,在git命令窗口回车。
4. 这时系统会自动在系统安装界面的终端里执行脚本,等待执行完毕,完成后系统重启再次来到语言选择,这时候就可以正常安装了。
效果
参考
GitHub - myspaghetti/macos-virtualbox: Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
https://www.cnblogs.com/ilii/p/16522257.html