get x86 mac iso in arm mac

python3 -m venv myenv
source myenv/bin/activate
pip install xattr
python3 installinstallmacos.py

安装 Python(如果未安装)

bash
安装 Homebrew(如果未安装)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装 Python
brew install python
下载 installinstallmacos.py

bash
curl -O https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py
运行脚本并选择 x86 版本

bash
sudo python installinstallmacos.py
脚本会列出所有可用的 macOS 版本,选择 Intel(x86_64) 版本(如 12.6.9 (21G726))。

下载完成后,会生成一个 .dmg 文件(如 Install_macOS_12.6.9-21G726.dmg)。

转换为 ISO(可选)

bash
hdiutil convert /path/to/Install_macOS_12.6.9.dmg -format UDTO -o ~/Desktop/macOS_12.6.9.iso
mv ~/Desktop/macOS_12.6.9.iso.cdr ~/Desktop/macOS_12.6.9.iso