I have a Linux host running Debian 11 and on that host, I have a Ubuntu 22.04 VM. Inside that VM I want to run a Windows 10 VM using nested virtualization. The ubuntu VM is booted using EFI and nested virtualization works well.
When the windows VM running inside of the Ubuntu VM is also booted using EFI everything works fine, all the ram I give it is detected and usable, and the VM has good performance so nested virtualization works fine.
My problem is that snapshots are not (yet) supported in vibvirt when using EFI so I have to use BIOS. However, when I change the VM to bios everything works fine except the fact that now the guest only sees 2GB of ram. I've tried booting Linux and memtest in that VM and they both only see the 2GB. I've tried creating new VMs and they also exhibit the exact same behavior (works fine when booted in EFI but not in BIOS)
I've copied the VM disk and configuration 1:1 to the host and it detects the entire 8GB (or whatever I set it to) just fine. So this issue only appears when running nested and using BIOS.
At this point, I've tried many different configurations even running super simple qemu commands, and still can't break the 2GB barrier when running nested without EFI for some reason.
Is there some limitation that I'm not aware of?
software versions (in the nested Ubuntu VM):
QEMU emulator version 7.2.0
libvirtd (libvirt) 9.0.0
Linux 5.19.0-35-generic