the previous solution posted will reserve the memory at boot so you can use it for the vm.
Thoe it dident go well for me so i ended up with @Pixo solution:
But when you have that working, you might not want firefox to steal cpu resources from your VM:
Your firefox instance is spawned from the process tree of your GUI, For me it is lxdm.
By limiting the resources of lxdm, Like locking it to certain cores you can control what resources it and everything that spawns from it like firefox uses.
As an Arch user i have chosten to use lxdm and it is started by systemd.
Systemd has implemented numa support both for memory and cpuaffinity and personally i’m just waiting for a release.
Despite that i have limited what cores lxdm uses, I can run stuff trough the terminal that wont be spawned from the tree of lxdm and thus wont be limited by the resource restrictions i have put on the lxdm.service
PS: we have the same cpu. But i have more memory then you, i have not tried pixos solution when giving hugepages all my memory on one node.