The official floor for an OPNsense virtual machine is small: at least 3 GB of RAM and a virtual disk of at least 8 GB, according to the OPNsense virtual machines guide. That floor will boot and route traffic, but whether it is enough for you depends on three things: how fast your connection is, how many devices and states the firewall must track, and which extra services you switch on. This guide starts from the official numbers, explains what each resource actually does in a firewall VM, and finishes with three example sizings you can copy or adjust.
The official numbers
| Resource | Official VM minimum | Source |
|---|---|---|
| RAM | 3 GB | OPNsense virtual machines guide |
| Virtual disk | 8 GB (minimum recommended) | OPNsense virtual machines guide |
| CPU | No VM-specific figure published | Use the hardware sizing tiers below as orientation |
For physical hardware, the official sizing guide publishes three tiers, and they are a useful compass for VMs as well, because a vCPU does roughly the work of a physical core of similar speed:
| Tier | CPU | RAM | Install target | Rough throughput guide |
|---|---|---|---|---|
| Minimum | 1 GHz dual-core | 3 GB | SD or CF card, minimum 4 GB (nano image) | About 11 to 150 Mbps, roughly 10 to 30 users |
| Reasonable | 1 GHz dual-core | 4 GB | 40 GB SSD | About 151 to 350 Mbps, roughly 30 to 50 users |
| Recommended | 1.5 GHz multi-core | 8 GB | 120 GB SSD | About 350 to 750+ Mbps, roughly 50 to 150+ users |
Two details from that guide matter for VMs. First, the installer itself needs a minimum of 3 GB of RAM to run, which is one reason the VM floor sits where it does: do not try to install into a 2 GB VM and raise the memory afterwards. Second, the minimum tier runs the standard features that do not need disk writes; it explicitly excludes things like a caching proxy and the IDS/IPS alert database. If you plan to run those services, you are no longer sizing for the minimum.
CPU: cores, speed and what actually uses them
Plain routing and NAT of ordinary traffic is cheap. CPU demand grows when packets need real work done on them: VPN encryption, intrusion prevention inspection, traffic shaping, and very high packet rates on fast links. A home connection of a few hundred megabits with no VPN will idle along on 1 to 2 vCPUs. A gigabit connection with WireGuard tunnels and Suricata inspecting traffic wants more, and single-core speed matters as much as core count for several of these workloads.
On a shared Proxmox host, remember that vCPUs are a claim on host time, not dedicated hardware. Giving the firewall 4 vCPUs on a host whose other VMs are busy at the same peak hour does not guarantee 4 cores of throughput. For a firewall, consistent access to modest CPU beats occasional access to lots of it, so avoid oversizing the VM on a crowded host; an oversized VM can actually schedule worse than a lean one. Start with 2 vCPUs, measure, and add cores only when you see the firewall itself, not the host, running hot.
RAM: states, services and headroom
RAM in OPNsense does three jobs. The base system and web GUI need their share. The state table, which tracks every live connection, needs about 1 kB of RAM per state according to the official sizing guide: a busy household with streaming, gaming and cloud backups can hold tens of thousands of states without trying, and a small office can hold far more. Finally, services keep their own data in memory: rule sets for intrusion detection, DNS caches, VPN daemons and reporting all add up.
Practical guidance:
- 3 GB: the official floor. Fine for a lab, a small home network, and basic routing, firewalling and VPN duty.
- 4 GB: the comfortable home default. Room for state growth, DNS services and a VPN or two without watching the memory graph.
- 8 GB: sensible once you enable IDS/IPS, run several VPN tunnels, or serve dozens of users. It matches the official Recommended tier's RAM.
- More than 8 GB: rarely the bottleneck fix for a firewall; check CPU, disk and configuration first.
The official IPS how-to adds a concrete data point: it advises a minimum of 2 GB of memory and more than 10 GB of free disk for logging when running intrusion prevention. That is on top of a working system, which is another way of saying IPS belongs on the 4 GB-plus sizes, not on the floor.
How extra services change the picture
The tiers above describe a firewall doing firewall work. Each service you add moves the target, and it helps to know which resource each one eats:
- Intrusion detection and prevention (Suricata): the hungriest common add-on. It inspects traffic against rule sets, which costs CPU on every packet and RAM for the rules and state, and it writes an alert database to disk. The official IPS how-to asks for more than 10 GB of free disk just for logging and advises against running it on the minimum tier, which also excludes the IPS alert database by design. Budget 8 GB of RAM and a 40 GB disk if IPS is a firm plan, and remember IPS also requires hardware offloading to be disabled, which slightly raises CPU cost on virtual network cards.
- VPN servers (WireGuard, OpenVPN, IPsec): mostly a CPU cost, paid per packet encrypted or decrypted. A couple of occasional road-warrior connections are negligible; a site-to-site tunnel carrying your full internet speed is a sizing input, not an afterthought. If VPN throughput is the point of the build, give the VM the extra cores.
- DNS services and blocklists: modest RAM that grows with blocklist size, negligible CPU. Fits comfortably in the 4 GB size.
- Caching proxy: deliberately excluded from the official minimum tier because it needs disk writes and space. If you truly need it, size the disk like you mean it and expect RAM use to climb with cache memory settings.
- Reporting and flow accounting: small moment-to-moment cost, steady disk growth over time. This is the main reason a 40 GB disk ages better than an 8 GB one.
Memory ballooning and overcommitment on the host
Proxmox can overcommit memory: the sum of all VM memory allocations can exceed the host's physical RAM, on the theory that not every VM peaks at once. Proxmox also offers ballooning, which lets the host reclaim idle memory from a running VM by inflating a virtual balloon driver inside the guest. Both are reasonable tools for ordinary servers. A firewall is not an ordinary server. Its peak (everyone streaming, a backup running, a VPN tunnel busy) tends to coincide with the host's peak, and a firewall that has had memory squeezed out of it at the wrong moment drops states and connections, which users experience as the internet "glitching".
The conservative approach for a firewall VM is simple: allocate fixed memory, and do not enable ballooning for it. Treat the firewall's RAM as genuinely reserved when you plan the host's capacity. The same conservatism applies to CPU: a firewall among many busy VMs on an oversubscribed host will feel inconsistent in ways that are hard to diagnose from inside OPNsense, because the VM cannot see the host's contention. If latency-sensitive traffic matters, keep the host's total vCPU allocation sane rather than piling cores onto the firewall.
Disk: 8 GB is a floor, not a target
The VM guide's 8 GB minimum recommended disk is enough to install and run, and the installer notes that ZFS, generally the best file system choice, needs a couple of GB at least. But disk fills from the edges inward: logs, reporting data, update downloads and the IDS/IPS alert database all live there. The minimum hardware tier excludes disk-hungry features precisely because small media cannot feed them. If you want historical reporting, generous logs or IPS, give the VM 20 to 40 GB; virtual disks are cheap, and expanding one later is more work than creating it generously now. Also note the installer's swap guidance: for targets smaller than 16 GB, skip the swap file, which keeps a small disk from wasting space.
One VM-specific disk tip: put the firewall's virtual disk on storage that is always available at host boot. A firewall that cannot start because its disk lives on a not-yet-mounted share takes the whole network down with it.
Network cards and host overhead
Give the VM at least two virtual network cards, one for WAN and one for LAN, on separate bridges, as described in the Proxmox install guide. More interfaces (for a DMZ, a guest network or a separate management segment) are easy to add later. Remember also that the VM is not the only consumer: Proxmox itself, backups and your other VMs all share the host's RAM and CPU, so size the firewall out of what remains after the host's own needs, not out of the total on the spec sheet. Leave the host itself some breathing room; a host swapping memory will make every VM, including the firewall, feel broken.
Three example sizings
| Scenario | vCPU | RAM | Disk | Notes |
|---|---|---|---|---|
| Home lab and learning | 1 to 2 | 3 GB | 8 to 16 GB | The official floor. Routing, firewall rules, a test VPN. No IPS. |
| Home, fast fibre connection | 2 | 4 GB | 20 to 40 GB | Room for reporting, DNS services and WireGuard. Comfortable state headroom. |
| Small office with IDS/IPS | 2 to 4 | 8 GB | 40 GB or more | Matches the official Recommended tier's spirit; disk covers the IPS alert database and logs. |
Growth: sizing is a moving target
The sizing you choose on install day describes the network you have that day. Networks grow: more devices, a faster internet plan, a new VPN habit, a work-from-home job that did not exist when you built the VM. The state table arithmetic from the official guide (about 1 kB of RAM per state) means growth shows up in memory first, while faster plans show up in CPU. The good news is that a VM is the easiest firewall in the world to resize: shut it down, add RAM, cores or disk space in the hypervisor, and start it again. Disk is the one resource where growing later is mildly awkward if the file system needs extending, which is another argument for creating the disk generously at the start.
Build a tiny habit around this: after any change that plausibly affects load (a faster connection, IPS switched on, a site-to-site tunnel, a house full of guests), glance at the dashboard's memory, state and disk figures during the busy period for a few days. Sizing by observation beats sizing by worry, and it takes a minute.
How to confirm your sizing is right
- On the OPNsense dashboard, memory usage sits comfortably below the total during your busiest hour, not pinned at the top.
- The state table count during peak use is a small fraction of its limit; if states regularly approach the limit, add RAM.
- Disk usage grows slowly week to week. Rapid growth means logs or reporting need attention, or the disk was sized too tightly.
- Speed tests match your internet plan. If they do not, and the VM's CPU graph is saturated during the test, the VM needs CPU; if the VM is idle but the host is saturated, the host is the problem.
- After enabling a new service (especially IPS), re-check all four points for a few days.
The short version
Install at the official floor (3 GB RAM, 8 GB disk) only for labs and light duty. Run a real home network at 4 GB with a 20 GB-plus disk, and step up to 8 GB when intrusion prevention or many users enter the picture. Then keep the setup healthy with the QEMU Guest Agent for clean shutdowns, and revisit the physical side of sizing in OPNsense Hardware Requirements if you later move the firewall to its own box. The primary sources for this guide are the official virtual machines guide and hardware sizing guide.