unable to use nested virtualization on M4 mac with qemu in guest
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Hi,
I've been struggling to get nested virtualization running in lima on my macbook m4. I've set `nestedVirtualization: true` and use vz as the virtualisation engine as described, using the default ubuntu installation, and kvm-ok seems to pass.
But when I try to run qemu it stubbornly refuses to work, using e.g. the basic command `qemu-system-aarch64 -accel kvm -cpu host -machine virt,virtualization=on -nographic`. It persistently reports:
```
qemu-system-aarch64: mach-virt: host kernel KVM does not support providing Virtualization extensions to the guest CPU
```
(Note that I have to add the user to the kvm group for this to work or change permissions on /dev/kvm)
I've tried even running the latest qemu, built from source, but the same thing happens. Also I've tried different ubuntu releases.
It seems there's something that just doesn't work there.
I did notice commit https://github.com/qemu/qemu/commit/851dcb8355cb3c37fbbf8cc99ae5fac4871d1a44 which seems to suggest only a tcg backend worked for guest virtualisation in arm64 previously. But I've tried the release that has this patch in it (10.2) and... it still doesn't work, failing with the same error :)
This may just be qemu, if so it might be worth saying so somewhere prominent as that's obviously a fairly standard tool to use for virtualisation work. That'd be mighty disappointing though!
Another thing might be that the vcpu's are somehow being configured such as to not expose that they support nested virtualisation, but I'm not sure how that could be the case.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.