Nested Virtualization Not Supported on Apple Silicon
So it turns out you can’t run an Android emulator within a macOS VM running on an Apple Silicon Mac.
Android emulators are unavailable on Apple silicon machines due to the Apple Virtualization Framework not supporting nested virtualization. Please use a Linux instance.
We’re not using Codemagic, but the concept still applies. Frustrating.
Nested virtualisation on M1/M2:
Unless I’ve misunderstood the docs, it doesn’t appear to be possible to create a vm with the Apple Hypervisor that has nested virtualisation enabled.
More info:
- https://github.com/actions/runner-images/discussions/7191
- https://github.com/ReactiveCircus/android-emulator-runner/issues/46
- https://actuated.dev/blog/kvm-in-github-actions