The core architectural boundary: shared kernel vs hardware emulation
Where LXC shines and where it silently breaks
overlay2 mounting errors) or permissions issues when binding network ports below 1024.
Another common failure point is VPN software. Tools like WireGuard or OpenVPN require access to TUN/TAP virtual network devices or kernel-level routing tables. In an unprivileged container—the secure default in Proxmox—the container does not have permission to create device nodes in /dev/net/tun unless you manually edit configuration files on the host node and pass device IDs through.
Here is what you see when an application tries to access low-level modules inside an unprivileged container without manual passthrough:
TEXT
modprobe: FATAL: Module iptable_nat not found in directory /lib/modules/6.8.4-2-pve
mkdir: cannot create directory '/dev/net': Permission deniedmodprobe, custom eBPF filters, custom file system drivers (such as mounting an SMB share directly inside the guest via CIFS), or raw block device manipulation, LXC becomes a maintenance burden. While you can solve some of these issues by converting the container into a "privileged" container, doing so weakens the hypervisor's security boundary because root inside a privileged container is mapped directly to UID 0 on the host system.
The four diagnostic questions to ask before provisioning
- What operating system is required? If the customer needs Windows, BSD, or an ancient Linux distribution requiring an old, specific kernel version, KVM is the only valid choice. LXC can only run Linux distributions compatible with the Proxmox host's active kernel.
- Will the server host Docker, Kubernetes, or another container runtime? If the workload involves running nested containers, recommend KVM. While Proxmox supports nesting flags on LXC, production Docker setups inside containers often encounter file ownership bugs with non-root UID mappings, especially when mounting shared persistent volumes.
- Does the workload require custom kernel modules, low-level networking, or direct hardware passthrough? If the customer mentions VPN servers (WireGuard, IPsec), custom firewall packages, NFS/Samba client mounts inside the guest, or dedicated PCIe passthrough (such as a GPU for machine learning), deploy KVM. KVM manages virtual hardware cleanly and supports standard PCIe mapping without risking host stability.
- What is the tenant isolation model? If you are hosting untrusted customer code where tenants have root SSH access, KVM provides stronger defense-in-depth through hardware-assisted virtualization (Intel VT-x or AMD-V). Unprivileged LXC containers are secure for well-behaved internal services, but untrusted multi-tenant root access is safer inside a dedicated VM boundary.
Safely verifying container limits on a test host
/proc filesystem or check how system memory is surfaced.
Inside a VM, the kernel maintains its own isolated memory tracking. In an LXC container, memory limits are enforced through the cgroup subsystem. You can verify whether a container sees host memory constraints or its own cgroup limits by running a quick read-only check:
BASH
# Check the active cgroup memory limits inside the container
cat /sys/fs/cgroup/memory.max 2>/dev/null || cat /sys/fs/cgroup/memory/memory.limit_in_bytes
# Check if device control is restricted
ls -l /dev/net/tun 2>&1