A common rule of thumb on Proxmox goes like this: LXC containers are lighter than KVM virtual machines, so use a container unless you have a reason not to. The first half is mostly true. The second half causes trouble, because the reasons not to use a container usually show up after the workload is already running. Docker refuses to start, a VPN can't create its tunnel interface, or a kernel setting will not change no matter what you edit.
The issue isn't that LXC is bad. "Lighter" describes how the container is built, not what it can do. Those are two different questions, and the second one decides whether the choice holds up in production.
Where the lighter part comes from
A KVM virtual machine is a full computer in software. It has emulated or paravirtualized hardware, its own firmware, and its own kernel that boots, manages memory, and schedules processes. Each VM spends some RAM and CPU just being an operating system before your application does anything.
An LXC container skips all of that. It is a group of ordinary processes on the host, separated by kernel features: namespaces give the container its own view of processes, network, mounts, and users, and cgroups limit how much CPU, memory, and I/O it can use. There is no second kernel. The container starts about as fast as its init system, and idle containers cost very little.
This is where the efficiency comes from, and it is real. It also explains every limitation that follows, because the thing you saved (a separate kernel) is the thing some workloads need.
One kernel for everyone
Every container on a Proxmox node runs on the host's kernel. You can confirm this from inside any container.
# Run inside the container (read-only)
uname -r # prints the host kernel version; the container has none of its own
cat /proc/self/uid_map # shows how UIDs inside the container map to UIDs on the host
That shared kernel has some practical consequences.
The container can't choose its kernel. If an application needs a specific kernel version, a custom kernel, or a different operating system entirely (Windows, FreeBSD), LXC is out. A container image labeled with some distribution only supplies that distribution's userspace. The kernel underneath is whatever the host booted.
Kernel modules belong to the host. A container can't load modules, so anything that depends on one must be loaded on the node itself, and that affects every container and the host. VPN software, some filesystem drivers, and certain firewall or networking features fall into this category. This is often why a WireGuard or OpenVPN setup works on a VM but fails inside a container until someone changes something at the host level.
Many kernel tunables are host-wide. Some sysctl settings are namespaced, so a container can have its own value, mostly in the networking area. Others, especially many under vm.* and kernel.*, apply to the whole machine. A search engine or database that asks you to raise a memory-mapping limit is asking for a host change. If you do it for one tenant, every tenant gets it.
From a support desk view, this is the pattern that confuses people most. A customer follows an install guide written for a VM or bare metal server, runs sysctl -w or modprobe inside their container, gets a permission error, and assumes the container is broken. The container is working as designed. The guide assumed a kernel the user doesn't own.
Docker inside LXC works until it doesn't
Running Docker in an LXC container means nesting one container runtime inside another. It can work. On Proxmox it typically needs the nesting feature enabled, and unprivileged containers often need keyctl as well. You can check what a container currently has from the host.
# Run on the Proxmox host (read-only); replace 101 with the container ID
pct config 101 | grep -E '^(unprivileged|features)'
Illustrative output format:
features: keyctl=1,nesting=1
unprivileged: 1
Even with those flags, Docker inside LXC is a stack of assumptions. Docker expects to manage its own cgroups, overlay filesystems, network namespaces, and sometimes kernel modules, all through the host kernel and its storage backend. Storage drivers can behave differently depending on the filesystem under the container, and kernel or Proxmox upgrades can change what works. When it breaks, the error messages tend to be vague, and you are debugging two layers of containerization at once.
The Proxmox documentation has generally recommended running application containers such as Docker inside a VM for this reason. A VM gives Docker a kernel it fully controls, and Docker's own docs and troubleshooting steps assume that kind of environment. As a rule of thumb, if the workload is "a Docker host" or "a Kubernetes node", start with KVM.
Unprivileged helps, but it isn't a VM boundary
Proxmox offers privileged and unprivileged containers. In an unprivileged container, root inside the container maps to a high, unprivileged UID on the host (by default in the 100000 range). That's what the uid_map output above shows. If a process escapes the container, it lands on the host as a nobody-like user instead of real root. In a privileged container, root inside is root on the host, which is a much weaker boundary. Privileged containers are best kept for cases where you control everything inside them.
Even an unprivileged container shares the kernel's attack surface with every other container on the node. A kernel bug reachable from a container can, in the worst case, affect the host and its neighbors. A KVM VM puts a hypervisor boundary in between: the guest attacks its own kernel first, and must then break out of the virtualization layer.
This matters most when you don't trust what runs inside. That might be customer-controlled root access, code you didn't write, a public-facing service with a large attack surface, or a compliance requirement that names hardware-level isolation. For internal services you manage yourself, an unprivileged container is often a reasonable trade-off. For selling root access to strangers, the VM boundary is usually worth its overhead.
There are smaller operational differences too. Mounting network filesystems like NFS directly inside an unprivileged container is typically blocked, so the usual pattern is to mount on the host and bind-mount the path into the container. Moving a container to another node on Proxmox generally means a restart rather than a live migration, while VMs can usually live-migrate with shared or replicated storage. Neither is a dealbreaker, but both are worth knowing before you promise a customer zero-downtime maintenance.
Density is real, so weigh it against the workload
Density is where LXC clearly wins. Without a guest kernel per instance, you can fit more small services on a node, and memory not used by one container is available to others. A dozen small internal tools, a reverse proxy, a DNS resolver, a monitoring agent, a small database for a dev environment: these are good fits. They need ordinary userspace, standard networking, and nothing special from the kernel.
The overhead gap narrows when the workload itself is heavy. A busy database or a WordPress site under real traffic spends far more resources on its own work than a VM spends on its guest kernel. Virtio drivers, memory ballooning, and kernel same-page merging also reduce the cost of VMs on KVM. In those cases the deciding factor is usually isolation and control, not the small saving per instance.
One more detail: resource views inside containers can mislead. Tools like free and top usually show the container's limits thanks to lxcfs, but some applications read hardware information in ways that see the host's full CPU count or memory. They then size thread pools or caches for a machine much larger than their cgroup allows. If an application tunes itself automatically at startup, check what it detected.
Questions that decide it
Before choosing, these questions settle most cases:
- Does the workload need its own kernel, a specific kernel version, a non-Linux OS, or custom kernel modules? If yes, use KVM.
- Does it need kernel tunables that are host-wide, or will it run Docker, Kubernetes, or another container runtime? If yes, lean KVM.
- Will someone you don't fully trust have root inside it? If yes, use KVM, or at minimum an unprivileged container with a clear risk decision written down.
- Do you need live migration for maintenance without downtime? If yes, lean KVM.
- Is it a small, standard Linux service you control, where density and fast startup matter? This is where LXC fits well, and it should be unprivileged unless there is a specific reason otherwise.
The short version: LXC is lighter because it shares the host kernel, and that shared kernel decides what the workload can do and how well it is isolated. Before creating the guest, write down what the application needs from the kernel and who will have root inside it. If either answer points outside the container's boundary, the VM's overhead buys something you need, and choosing it up front is cheaper than migrating a running service later.