You can now run Windows 11 virtual machines in GPU memory

mongeese

Posts: 643   +123
Staff
WTF?! Now you can bypass your hard drive and store your whole operating system in your VRAM (should you want to). Well-known Windows modder NTDEV has demonstrated how, and it's surprisingly painless.

Step one is to create a RAM drive in your GPU's memory. A VRAM drive, if you will. There's an open-source tool that can do it for you called GpuRamDrive. It only takes a couple clicks but the tool was abandoned before it reached stability, so you might need to try it a few times.

Step two is to use your pick of tools to create a virtual machine. NTDEV used Windows' baked-in Hyper-V manager, which is a simple yet powerful tool for spawning virtual machines available to Windows 10 and 11 Pro, Education, and Enterprise users. You'll need to change just a couple of defaults in Hyper-V, and you can pick those out in NTDEV's video.

If you have an RTX 4090 or RX 7900 XTX or a GPU with more than 20 GB of VRAM then you should be able to squeeze a vanilla Windows 11 installation onto the VRAM drive you created. If you didn't drop a grand on a new GPU this past year, you'll have to use an alternate operating system with less demanding storage requirements. NTDEV uses Tiny11, a stripped-down version of Windows 11 that he created.

We wrote about Tiny11 when it was released in February. Advertised as Windows 11 without the bloat, its main goal is to reduce Windows 11's system requirements without sacrificing too many features. It strikes a good balance and even finds room for staple apps like MS Paint. While it needs about 8 GB of storage to run on bare metal, NTDEV shows that it can run on a 3.5 GB drive when it's used for a virtual machine.

NTDEV demo'd the concept on a laptop equipped with an RTX 3050 with 4 GB of GDDR6. He showed that the virtual machine had no problem creating and saving files to the 600 MB of free space he had. When he ran the CrystalDiskMark benchmark, he reached solid speeds of 2 GB/s reading and 2.5 GB/s writing, on par with PCIe 3.0 NVMe drives.

I can't think of a single reason why anyone would want to run Windows 11 on their VRAM. And yet, it's astonishingly practical: quick to set up and seemingly as fast and stable as a regular virtual machine. Why not, then, I suppose?

Permalink to story.

 
It should be screaming fast as long as you can get everything to fit in the VRAM, a 16gb gpu would work for the Tiny Win11 as long as you use install most stuff on an NVME drive but then if you have an NVME drive you don't really need the gpu to hold the OS.
 
It's actually not as crazy as it sounds for short-lived VMs or Docker images, perhaps for running units tests and the likes where you want speed and don't care about persistence
 
Nice to see someday the whole PC powered only by a GPU, with no CPU at all. This move will destroy some interests, of course.
 
It's actually not as crazy as it sounds for short-lived VMs or Docker images, perhaps for running units tests and the likes where you want speed and don't care about persistence

Speed is not higher than a M.2 NVME SSD in his benchmark

You can make a RAM drive as well, most have way more RAM than VRAM yeah?
 
What happens if the VRAM virtual machine try to run a game to need the GPU... 🧐 Windows would still uses system RAM but it's stored in VRAM... And if it could use Direct Storage would the VRAM Windows send the game resource direct to the VRAM? ... Pet trick out not, so many questions...

Also one more thing... If someone can run a VM on VRAM without user noticing it... That's another attack vector... You could run an pen tester to scan a corporate network from a few infected PCs.
 
Speed is not higher than a M.2 NVME SSD in his benchmark

You can make a RAM drive as well, most have way more RAM than VRAM yeah?
Well yeah, but when I'm developing, my RAM is highly utilised but my VRAM is idle.
I'm not saying it's a massive killer application for it, but it's not "useless" as some have suggested.
 
Nice one! I remember reading (like 20 years ago) about a few people toying with that in Linux -- you had some cards back then too with almost as much VRAM as the system had system memory (it was only 256MB-512MB or so back then), back then XOrg had a setting to tell it how much videoram your card had, so they could tell xorg the card has like 8MB or something (if they didn't want to do anything with 3D) and use the rest as a RAM disk or swap. I think this got to the "isn't that neat" phase and was not really used much.

It'd be interesting if you could somehow map it as additional system memory, like the Amigas where they had "fast RAM" and "chip RAM", possibly even make the OS aware of which RAM is faster (Linux has NUMA support -- Non Uniform Memory Access -- that could be used to provide that info.) I suspect the PCIe4 would be a bottleneck so system RAM would be faster for the CPU to access than video RAM? It'd be really interesting if it turned out VRAM was faster, persuade the system to load executables into VRAM and execute it out of that space. I suppose for that part to work, you'd have to be able to set up a BAR as large as your video memory though; a RAM disk driver, or swap, could go ahead and put the right piece of memory into the (256MB or whatever) BAR, but it'd be very difficult to execute code out of, say, a 256MB BAR that might spill over into memory that's not in that 256MB range.

Anyway, very cool!
 
Back