In troubleshooting an issue with no video with the Q35 chipset, I found the solution and a big tip if you’re new to passthrough and are messing with Hugepages:
Hugepages pre-reserves memory. This gives the OS less user addressable memory, so when you make a new VM with virt-manager, it tries to query user memory, not Hugepages. If you set your hugepages to a high amount, and you try to make another VM that can’t fit inside the user addressable memory space, it will try to use swap, and that will time out the QEMU monitor.
So: ALWAYS DISENGAGE Hugepages before making a new VM with the virt-manager GUI.
Also, you can solve “no video” issues with Q35 by simply deleting the console and channel spice before installation.
I have regained some sanity after trying to figure out for hours why my kernel was freezing… CHECK YOUR HUGEPAGES.
Qemu and libvirt require hugepages to be explicitly defined for each machine with the startup arguments of qemu or inside the libvirt xml machine definition
<memoryBacking>
<hugePages/>
</memoryBacking>
I’m not exactly sure how you managed to enable that by default nevermind in the GUI.
The virt-manager GUI doesn’t even have that option and it’s not there for a reason.
I can only imagine uncommenting this in libvirt/qemu.conf having an effect potentially.
But even then the guest has to explicitly request it. Which requires editing the xml or giving qemu the appropriate commands.
No, I wasn’t clear in the beginning. I had it enabled from previous VMs I was testing it with that I had properly setup. When going to make a new VM though, it ran out of user addressable RAM because Hugepages reserved it from my previous VM configs and I forgot to revert it.
Yeah, virt-manager I don’t believe has this functionality. It’s as dumb as bricks when it comes to setting up hugepages. I had to directly edit the XML to enable it for a VM, and forgetting to undo the Grub entry meant virt-manager was trying to use standard unreserved memory.