Where the lighter part comes from
One kernel for everyone
BASH
# 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 hostvm.* 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
nesting feature enabled, and unprivileged containers often need keyctl as well. You can check what a container currently has from the host.
BASH
# Run on the Proxmox host (read-only); replace 101 with the container ID
pct config 101 | grep -E '^(unprivileged|features)'TEXT
features: keyctl=1,nesting=1
unprivileged: 1Unprivileged helps, but it isn't a VM boundary
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
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
- 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.
