Apple Silicon and Virtual Machines: Beating the 2 VM Limit (2023)
5 hours ago
- #macOS Kernel
- #Apple Silicon
- #Virtualization
- Apple Silicon hosts are limited to running only two macOS guest virtual machines at a time due to restrictions in the SLA.
- The VM limit check is enforced in the kernel (XNU), not in userspace, specifically within the hv_vm_* functions.
- A boot-arg, hv_apple_isa_vm_quota, can override the VM limit, but it requires booting a development kernel or modifying the release kernel.
- To use the override, one must create and boot a development kernel collection, which involves steps like downloading a Kernel Debug Kit and configuring the system in recoveryOS.
- After configuration, virtualization solutions like UTM or VMware can run more than two macOS VMs, with testing showing up to nine VMs active.
- This feature has been available since macOS Monterey, but it's undocumented and intended for internal use.
- Using a custom kernel collection disables streamlined OS updates, requiring a reversion to the stock kernel for updates to proceed.
- Potential future improvements include automating the kernel collection process and developing a kext to override the VM quota without a custom kernel.