另类的macOS Beta安装方式(使用pkg安装包+使用命令获取Beta更新权限)
在 macOS 新版本发布之后,很多开发者和极客想要体验新系统特性,但是又不想在自己的主力 Mac 更新 beta 版本(因为不太稳定),只能尝试在虚拟机上安装。但是在上手安装虚拟机时,就会发现以下的几个深坑:
- macOS 正式版不能直接安装更新的测试版的虚拟机,需要安装测试版Xcode或者Mobile Device Support.[1]
- 如果你在 macOS Tahoe 26.5.1 及更早版本上安装了 Xcode 27 测试版,由于已知错误,macOS 虚拟机安装将会失败并会损坏你的macOS的虚拟机模块。要恢复虚拟机安装功能,需要重新安装 macOS操作。[2]
- 在虚拟机中登录加入开发者计划的Apple账号后会发现你不能在虚拟机中接收Beta更新。[3]
并且 macOS 27 不在支持Intel架构的 Mac 设备,所以黑苹果方案也不可行。
在苹果的层层阻挠之下,我们应该不能使用在实体机之外的方案安装测试版的虚拟机了吧?不,还是有方案的。在基于Apple Silicon的Mac上安装macOS虚拟机,使用的是统一的虚拟化框架[4]。在使用IPSW进行全新安装时,由于VZMacOSInstallerAPI差异,会导致安装失败。[5]但是只需要绕开这个API即可安装。在没有测试版系统设备的前提下,只能先安装正式版本的macOS的虚拟机,然后再升级到macOS 27 Beta.
在社区中有人提供了解决方案[6],在系统中输入下面这一段命令,使得系统可以在Beta通道获取更新。
sudo defaults write com.apple.MobileAsset MobileAssetAssetAudience -string 621ba5ab-54b6-4a71-891a-425ac0ce4551
sudo defaults write com.apple.MobileAsset MobileAssetServerURL-com.apple.MobileAsset.SoftwareUpdate -string "https://swscan.apple.com/content/catalogs/others/index-27seed-27-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
sudo killall -HUP mobileassetd
sudo killall -HUP betaenrollmentd
open "x-apple.systempreferences:com.apple.Software-Update-Settings.extension"
其中,MobileAssetAssetAudience和MobileAssetServerURL-com.apple.MobileAsset.SoftwareUpdate可以在已经开启对应Beta版通道的macOS中提取。
sudo defaults read com.apple.MobileAsset MobileAssetAssetAudience
sudo defaults read com.apple.MobileAsset MobileAssetServerURL-com.apple.MobileAsset.SoftwareUpdate
Installing macOS Tahoe virtual machine on a Mac running Sequoia, kb.parallels.com. ↩︎
If you installed Xcode 27 beta on macOS Tahoe 26.5.1 and earlier, macOS virtual machine installation will fail due to a known bug. To restore virtual machine installation functionality follow the How to reinstall macOS guide. (179068335) --Xcode 27 Beta 2 Release Notes, developer.apple.com. ↩︎
Installing betas now requires signing in with an Apple ID that's enrolled in the beta program (be it the developer, customer, or public betas), and unfortunately signing in with an Apple ID inside a macOS VM is also not supported. --Upgrade to macOS Beta within VirtualBuddy?, github.com. ↩︎
The Virtualization framework provides high-level APIs for creating and managing virtual machines (VM) on Apple silicon and Intel-based Mac computers. Use this framework to boot and run macOS or Linux-based operating systems in custom environments that you define. The framework supports the Virtual I/O Device (VIRTIO) specification, which defines standard interfaces for many device types, including network, socket, serial port, storage, entropy, and memory-balloon devices. --Virtualization, developer.apple.com. ↩︎
A macOS 27 guest should run on a macOS 26.6 host, but we discovered a late incompatibility between the VZMacOSInstaller API on macOS 26.6 and the macOS 27 IPSW. --Does virtualizing macOS 27 require a macOS 27 host?, developer.apple.com. ↩︎
Instructions for macOS Golden Gate beta, github.com. ↩︎