Request/Question: (macOS 15) Nested virtualization for Windows ARM and MacOS guests?
Hi, In utm 4.6 beta says: (macOS 15) Nested virtualization for Linux” but since it’s a hypervisor feature why not supported also for windows arm vm’s for wsl2 support.. It’s a qemu 9.1 limitation or apple virtualization limitation? Expected to be supported soon via MacOS 15.x update or UTm update? Thanks..
We need QEMU to support it for Windows. As soon as support is added, we will pick it up.
We need QEMU to support it for Windows. As soon as support is added, we will pick it up.
Great! I'm also waiting support for WSA on Windows ARM and wish this would be added too. I'd like to appreciate you guys for my newly buying M4 Mac Mini!
Thanks.
thanks @osy! is there an issue/feature request open on Qemu gitlab for tracking the status?
I don't know
thanks! expanding the issue to request/ask also about MacOS guest nested support.. seems not available using M4 and UTM 4.6.1 on Macos guest 15.1 image..
Virtualization is not available on this hardware
more context:
tested installing lima and get:
INFO[0089] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/obgutm/.lima/default/serial*.log")
FATA[0090] exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see "/Users/obgutm/.lima/default/ha.stderr.log")
cat .lima/default/ha.stderr.log
{"level":"fatal","msg":"Error Domain=VZErrorDomain Code=2 Description=\"Invalid virtual machine configuration. Virtualization is not available on this hardware.\" UserInfo={\n NSLocalizedFailure = \"Invalid virtual machine configuration.\";\n NSLocalizedFailureReason = \"Virtualization is not available on this hardware.\";\n}","time":"2024-11-24T00:18:49-08:00"}
I don't think Apple enabled it for macOS guests
Is there anything new on this request? @osy?
Don't ask me ask Apple
IMHO its not an Apple hypervisor issue, just a virtual machine monitor thing, which means, that in theory, you could replace it and still remain app-store compliant. Parallels did replace both for their Intel-Mac nested hypervisor support, but for Apple Silicon, you have to use Apple's hypervisor. The virtual-GPU feature of Vulkan in Podman containers for Apple silicon also IMHO uses a custom VMM.
We are talking about macOS guests. Hypervisor.framework does NOT work to boot macOS. Virtualization.framework is what is used and it does not support nested virt for macOS.
IMHO, but I might be wrong - For MacOS you definitely need Apple to write a VMM which supports nested virtualization. But Parallels have demonstrated on x64, that you can do a custom nested-virtualization VMM for Windows. To my knowledge, the Apple Hypervisor can do nested virtualization and run with a custom VMM on top - see the Vulkan GPU virtualization in Podman. To my knowledge, Apple does not even fully support Windows virtualization with their VMM.
What you said is correct but also completely orthogonal to the point I just made
Sorry, its just, that the initial request was for nested virtualization with Windows on ARM and macOS.
Okay I see that was answered in the first reply: https://github.com/utmapp/UTM/issues/6821#issuecomment-2489149854
Using emulated aarch64 on aarch64 it is possible to run WSL2 on Windows 11. I needed https://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/5312/QEMU-KERNEL-AARCH64/RELEASE_GCC/QEMU_EFI.fd, which I added as a drive of none (advanced) as a Linux kernel.
System -> CPU "neoverse-n1" QEMU -> Tweaks, I turned off UEFI Boot and Use Hypervisor (system was originally installed as a virtualized Win11) QEMU -> Machine Properties, I added "virtualization=on,gic-version=3,secure=on" QEMU -> Arguments, I added: -kernel /Users/(my user)/Library/Containers/com.utmapp.UTM/Data/Documents/Windows.utm/Data/QEMU_EFI.fd
I am now running WSL2 2.5.4 inside the VM.
I used https://gist.github.com/Vogtinator/293c4f90c5e92838f7e72610725905fd#file-wsl2-md as a guide.
Edit: if it doesn't boot, make sure you imported QEMU_EFI.fd correctly; before I realized I needed it to be a "Linux kernel" i managed to import it as a qcow and it added headers. You should be able to confirm the QEMU_EFI.fd matches the one you downloaded, and if not, make it match.
thanks @osy! is there an issue/feature request open on Qemu gitlab for tracking the status?
I believe this is the relevant issue to watch in the Qemu repo: https://gitlab.com/qemu-project/qemu/-/issues/628
Using emulated aarch64 on aarch64 it is possible to run WSL2 on Windows 11.
@dariaphoebe - Very cool idea, thanks. Since it's emulated, but on the same architecture, can you please provide some ideas on its performance?
@AndreasKunar on the M4 Pro; i gave 14gb of memory to the win11 vm. it's not fast but it's absolutely usable.
seems progress in QEMU patches site: https://patchew.org/QEMU/[email protected]/
mentions:
"Nested virtualisation support. Note that the nested virtualisation implementation
shipping as of macOS 26.0 is nVHE only, and does not leverage VNCR (FEAT_NV1-style)."
more notes from patch:
However, this is usable and there seems to be some interest for it. Hopefully
it'll be at least somewhat useful.
PS: I can step up to maintain HVF support if needed. WHPX arm64 patch series
is coming soon too.
unfortunately will not even be in QEMU 10.1 which is in RC phase so for QEMU 10.2?..
To set proper expectations: note that Hyper-V for Windows version 24H2 onwards operates in VHE mode. It won't work with the nested virtualisation support currently implemented on macOS.