Is there a way to map disk as ram for a QEMU VM?
I do not have enough ram for a VM, so I thought if mapping an NVME partition as ram instead.
I guess, it is the opposite of a ramdisk.
Is there a way to map disk as ram for a QEMU VM?
I do not have enough ram for a VM, so I thought if mapping an NVME partition as ram instead.
I guess, it is the opposite of a ramdisk.
Yes, you can do with
-mem-path FILE provide backing storage for guest RAM
You can make things yet more quick if that FILE is actually a block device. You can further extend the flexibility and wonderfulness of your system, if that block device is actually an LVM volume.
Contrary the common belief, it won't be unavoidable slow, because there is a block cache in all modern OSes. It depends on, how the processes in your VM will want to use the RAM. If you have luck, your system can follow their memory access intentions by loading - unloading their required pages with minimal loss.