[SOLVED] QEMU Virtual Hard Disk = Proxmox Physical RAM?

TheFuzzyFish

Member
Feb 20, 2018
17
0
6
25
Okay, so before I delve into this, I'd like to point out that the real applications to a concept like this are fairly limited, so please don't just respond with "Why do you need this?" I'll tell you the answer right now: I don't. BUT, someone else might.

So if you have even a little bit of financial resources able to be dedicated to IT, one of the easiest and maybe most beneficial things you can upgrade is RAM, especially in the realm of virtualization where you have many guests operating systems doing whatever they're doing without regard of the tax it's putting on the hardware.
With this abundance of RAM we often find ourselves with, sometimes we end up asking silly questions. Here is one such question:

Is it possible to run a complete QEMU VM on a virtual hard drive that actually exists in the host server's RAM? I mean, with tmpFS, we know that we can host basic files in RAM, but can we act as if a segment of allocated RAM is a block storage device for a virtual machine to boot from?

There are obvious downsides: You'd need to re-upload the OS to memory whenever you wanted to boot the VM, and any power outages would completely wipe any data that hadn't been backed up.
But possible upsides include optimizing certain workloads that require fast database lookups without needing to tinker with the software on the VM, and uh... well, it's cool?

I guess what I'm looking for can be seen as preemptive disk-caching to the extreme. Does any such system exist? How would you implement it?
 
Update: This can pretty much be achieved by enabling "Write back (unsafe)" on your hard disk in the hardware tab of your VM.
Has the bonus of occasionally actually writing to the disk ;)
 
I'm thinking of trying to implement basically a read-only VM; every time it started, it would be loaded into RAM from the unchanging image located on a fast-read-slow-write disk, and every time it was shut down, all changes would be lost.

I imagine I'll have to do some scripting to get this to work.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!