-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Nested Virtualization on Mac OS 15 #6700
Comments
So what about nested virtualization for Windows guest? Low level hypervisor API seems to support it as well https://developer.apple.com/documentation/hypervisor/4359587-hv_vm_config_set_el2_enabled |
For QEMU, we typically wait for the feature to be implemented upstream or we pick a patch. I think enabling nested virt requires doing more than just setting that flag. |
This doesn't seem to work for me. I'm on 15.1 (24B83), M3 Pro, UTM 4.6.0 (102), with a freshly created Fedora 40 VM using Hypervisor.framework, and it doesn't seem to enable KVM support on boot:
Maybe my expectations are wrong, but I would have expected the CPU to be started in EL2 and HYP mode to be available. Am I doing things wrong? Is there a debug log I could check to make sure nested virtualization is actually enabled on this VM? |
Nevermind, works just fine with Fedora 41, so I'm guessing the issue is on the VM client side. For reference, this is what it looks like when it works as expected:
|
At the same not work |
@neverpanic how did you get this to work ? You simply tried with Fedora 41 instead of Fedora 40 ? Or did you make some other configuration changes in UTM ? |
@neverpanic My guess is this worked because you checked the checkbox "Use Apple Virtualization" when creating a new virtual machine ? (This way we don't need to worry about qemu's support for nested virtualization) |
Yes, this only works with Apple Virtualization, as documented in the release notes. However, this also didn't work reliably for me. I had to create multiple VMs, and it worked on some of them. Once it started working on a VM, it generally kept working on that particular VM, though — I just ended up creating multiple, testing whether nested virtualization worked, and then overwriting the disk with the one I wanted to be attached. |
Thanks for your reply -- Very mysterious indeed. Not able to get this to work at all. Not sure what caused your VM to work suddenly. Maybe only P cores support nested virtualisation ? Maybe addition of certain devices / displays causes nested virtualisation to get disabled ? I tried with various configuration variations of Fedora Server 41 without any luck ! |
You can give your config.plist from VM which Nested Virtualization work ? Or maybe can you find diff which my config from post #6700 (comment) ? |
The difference is in this block
in my config its block not present. After i add Your block and Nested Virtualization work on vm |
I'm seeing a similar issue with nested virtualization trying to run docker inside a macOS VM. This is on an M4 Pro new Mac Mini. Docker reports "Hypervisor check failed" on startup. Both the host macOS and virtualized macOS are 15.1. Running latest docker. |
I can confirm that latest UTM 4.6.3 on latest Sequoia 18.1.1 everything works for me out of the box with Ubuntu 22.04.5 Server image. Thank you! |
Apple only allowed nested virtualization for Linux VMs |
Continuation of #3405
Mac's Hypervizor.Framework supports nested virtualization starting with Mac OS 15.0 (Sequoia), if the host CPU is M3 or later.
We need this to be also supported in UTM, so that UTM Linux VMs can make use of KVM.
The text was updated successfully, but these errors were encountered: