VirtualBox Couldn't See 30 GB of 192 GB RAM: A Script Purged the Windows Cache and Freed the Memory
On a workstation with 192 GB of RAM, VirtualBox would not start new AI-agent VMs, even though Windows showed more than 30 GB as "available." The memory was the file cache (Standby List). To VirtualBox it counts as occupied, because it needs contiguous blocks. A script cut the cache from 30 GB to 600 MB in a fraction of a second, and the VMs started. Clear the cache only right before launching another VM, not on a timer.
AI-processed from Habr AI; edited by Hamidun News
Picture a workstation with 192 GB of random-access memory (RAM). Task Manager shows more than 30 GB of "available" memory, yet VirtualBox returns the error VERR_NO_MEMORY, meaning "no memory" when you try to start another virtual machine (VM). That is the problem a author of a post on Habr ran into while building a local rig for AI agents.
The 30 GB turned out not to be empty space but the Windows file cache (Standby List). For ordinary programs that memory is effectively free, but for the VirtualBox driver it is occupied. A script that purges the cache before a VM starts returned the memory, and the local model on this rig generates about 40 tokens per second.
Below is how it works and what you can take from it.
How the rig is built
Hardware: Core Ultra 285K, an NVIDIA graphics card with 24 GB of video memory (VRAM), two 2 TB Samsung 990 Pro SSDs, and 192 GB of DDR5. The goal is a fully local development environment with AI agents, so that code never leaves the machine.
The Windows 11 host runs one heavy model. The author calls it Qwen 3.8 Unsloth Q8 (the name is given as written in the post) and serves it over the local network through an OpenAI-compatible API. Inside the Windows 11 and Kali Linux VMs run VS Code with the Cline extension and Hermes Agent. They write code, run tests, do penetration testing, and call the host's API. So that the agents don't interfere with one another, you need many machines, and therefore a lot of memory. The author disabled the page file: at 192 GB it seemed unnecessary.
Why "free" memory wasn't usable
There are two causes.
First, Windows treats unused memory as wasted and fills it with everything that has been read: .vdi disk images, model files, system files. Task Manager shows this as "Cached." The kernel can hand this memory to ordinary programs quickly. But the VirtualBox driver, at startup, locks the VM's entire memory footprint and by default looks for contiguous 2 MB blocks (Large Pages). When 30 GB of cache is scattered among occupied pages, the needed blocks don't exist, and the launch fails.
Second, without a pagefile.sys, the commit limit equals the physical 192 GB. If processes collectively request even a megabyte more than that, Windows refuses, even when physical memory isn't yet full.
What the author did
First he restored a page file the size of RAM. The commit limit roughly doubled, to 383 GB. Then he wrote a PowerShell script that calls the undocumented kernel function NtSetSystemInformation (the MemoryPurgeStandbyList command). The same mechanism sits behind the Empty Standby List button in the RAMMap utility. The cache shrank from 30 GB to 600 MB in a fraction of a second, and the missing VMs started.
Then a side effect appeared: the Samsung drive began to show noticeable load, even though 10–12 GB of memory remained free. The resource monitor showed that the system wasn't writing to the pagefile, but reading the .vdi files themselves. While the cache was full, frequently read VM disk blocks were served directly from DDR5. After the cache was cleared, that buffer was gone, and the guest systems began reading data from the SSD.
Hence the rule: don't clear the cache on a timer. The script works as an "ignition key" right before starting the next VM, and only while occupied memory is below a threshold of about 178 GB. Another 12–14 GB must remain for Windows itself. The author rejected VirtualBox's built-in options. Page Fusion (deduplication of identical pages) works only with 64-bit Windows guests, doesn't help Kali, and causes micro-freezes due to hashing and Copy-on-Write. Disabling Large Pages hurts the processor's address translation cache (TLB).
Results and checklist
In the final configuration, 179 GB is in use and 12.7 GB is free, with SSD load near 0%. The model delivers an average of 40 tokens per second even with a 512k context. The script requests administrator rights on its own, shows the cache size before and after purging, and reports whether the next VM can be launched.
The algorithm is simple:
- "In use" at 162–172 GB: you can add up to two machines of 4 GB each;
- 178–180 GB: stop;
- "Cached" below 10 GB: purging is pointless;
- "Cached" at 15–20+ GB and VirtualBox complains about memory: run the script and start the VM immediately.
Limitations
This is one engineer's personal experience, not a benchmark: the author's measurements do not confirm the model's speed or the rig's stability. NtSetSystemInformation is not documented by Microsoft and may behave differently in other Windows builds. If there is currently no cache, the script has no effect. The practical takeaway for anyone building local agent rigs: don't disable the page file even with huge amounts of RAM, and judge "free" memory with an adjustment for cache that the hypervisor cannot use.
- Nov 28, 2026Claude wrote the GitHub manual as instructed, while Codex taught students branches and rebase
- Nov 28, 2026Google links to exact YouTube timestamps in 48.4% of citations, and manual subtitles didn't help
- Nov 28, 2026Anthropic Tested Claude with Siren Honeypot: Older Model Escaped the Sandbox in 25.8% of Cases
- Nov 28, 2026OpenAI Files Countersuit Against Apple Amid $6.4 Billion Jony Ive Studio Acquisition
Key Questions Answered
How the rig is built?
Hardware: Core Ultra 285K, an NVIDIA graphics card with 24 GB of video memory (VRAM), two 2 TB Samsung 990 Pro SSDs, and 192 GB of DDR5. The goal is a fully local development environment with AI agents, so that code never leaves the machine. The Windows 11 host runs one heavy model. The author calls it Qwen 3.8 Unsloth Q8 (the name is given as written in the post) and serves it over the local network through an OpenAI-compatible API.
Why "free" memory wasn't usable?
There are two causes. First, Windows treats unused memory as wasted and fills it with everything that has been read: .vdi disk images, model files, system files. Task Manager shows this as "Cached." The kernel can hand this memory to ordinary programs quickly. But the VirtualBox driver, at startup, locks the VM's entire memory footprint and by default looks for contiguous 2 MB blocks (Large Pages). When 30 GB of cache is scattered among occupied pages, the needed blocks don't exist, and the launch fails.
What the author did?
First he restored a page file the size of RAM. The commit limit roughly doubled, to 383 GB. Then he wrote a PowerShell script that calls the undocumented kernel function NtSetSystemInformation (the MemoryPurgeStandbyList command). The same mechanism sits behind the Empty Standby List button in the RAMMap utility. The cache shrank from 30 GB to 600 MB in a fraction of a second, and the missing VMs started.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
