How a VM works
A virtual machine in Proxmox is a kvm process on the host. Inside it, QEMU emulates a whole computer: BIOS or
UEFI, disks, a network card, video. The guest’s code runs on the processor itself through VT-x or AMD-V, and the
kvm kernel module makes sure the guest stays within its memory.
host: Linux kernel + kvm
└─ kvm process (VM 101) limited to its own memory and cores
├─ virtual hardware: VirtIO disk, VirtIO network, UEFI, TPM
└─ guest kernel: Linux, Windows, FreeBSD, RouterOS
└─ guest processes
The guest knows nothing about the host except what it’s shown. Its own kernel means any OS, its own kernel modules, its own firewall, its own Docker — everything as on a separate computer. The price is memory and time: the guest kernel and OS take hundreds of MB, and booting takes tens of seconds.
How a container works
An LXC container is a group of processes on the host’s kernel. The kernel shows them only their files, their
network and their processes (namespaces), meters out their memory and CPU (cgroups v2) and forbids the dangerous
stuff (AppArmor, seccomp). Inside is a regular Debian or Ubuntu with systemd, SSH and apt, like a small
server. There’s no kernel of its own: uname -r in the container shows the host’s kernel.
host: Linux kernel
├─ host processes
└─ container 201: namespaces + cgroups + AppArmor
└─ systemd → sshd, nginx … own root, own network, uids shifted by 100000
By default Proxmox creates unprivileged containers: the users inside are shifted. The container’s root (uid 0) is uid 100000 on the host, user 1000 is uid 101000. A process that escapes the container is nobody on the host. A privileged container (the Unprivileged checkbox cleared) sees uids as they are, and its root is the host’s root with AppArmor restrictions. Proxmox recommends such containers only for guests you trust.
How they differ in practice
| VM | LXC container | |
|---|---|---|
| Kernel | its own | the host’s |
| OS inside | any | Linux only |
| Start | tens of seconds | a second or two |
| Memory | allocated in full; the guest OS takes hundreds of MB | a cgroups limit; idle Debian takes tens of MB |
| Isolation | the CPU and QEMU boundary | the kernel boundary: a host kernel vulnerability is shared |
| Moving to another node | live migration without stopping | only with a restart |
| Snapshots | on LVM-thin, ZFS, qcow2 | on LVM-thin and ZFS |
| Backup without stopping | yes; with the guest agent, with a file system freeze | yes, snapshot mode |
| Device passthrough | a whole PCIe device: GPU, controller, network card | a device from /dev, such as /dev/dri for video transcoding |
| Docker inside | like on a regular server | works with nesting=1, breaks with updates |
| Kernel updated | doesn’t affect the guest | changes for every container at once |
Video transcoding is a container’s strong point. A media server in LXC gets the integrated graphics’
/dev/dri/renderD128 with a dev0: line in the config, and the same graphics stay available to the host and
other containers. A GPU is passed to a VM whole, through IOMMU, and the host no longer sees it.
What goes where
| If… | Use |
|---|---|
| the service is in Debian or Ubuntu packages: Pi-hole, nginx, Samba, a small site | a container (First LXC container) |
| Docker and compose stacks | an Ubuntu VM (VM template with cloud-init, Docker goes in a VM) |
| another OS: Windows, Home Assistant OS, OPNsense, RouterOS | a VM |
| untrusted code, an internet-facing service, or users with root inside | a VM |
| a media server transcoding on integrated graphics | a container with /dev/dri |
| live migration between cluster nodes | a VM |
a test server for guides with ufw, Docker and kernel tweaks |
a VM: in a container some commands won’t work |
The last row is a common trap. In a container kernel modules don’t load, kernel-level sysctl doesn’t change,
and your own nftables on top of the host doesn’t work without special rights. A VPS guide breaks halfway in a
container, but in a VM it runs as on a real server.
Docker: why in a VM
Proxmox says it plainly in the FAQ: don’t install Docker on the host itself, and keep application containers that need migration or isolation in a VM. Docker inside LXC works — it’s a container in a container — but it relies on permissions that change along with the kernel, AppArmor and Docker itself:
- it needs the
nesting=1option, and some images alsokeyctl=1; overlayfson top of ZFS only started working with ZFS 2.2;- in November 2025, a vulnerability fix in containerd 1.7.29 stopped any Docker container from starting inside an unprivileged LXC — until fixes landed on both sides.
An Ubuntu VM eats 300–500 MB more, but Docker in it is like on any VPS, and every Docker guide on the site (Docker) works in it without caveats. Details — Docker goes in a VM.
Since 9.1 Proxmox has a third option: an LXC container from an OCI image — the same one Docker pulls from Docker Hub. Storage › CT Templates › Pull from OCI registry, and the image becomes a Proxmox container: its own network, backup, snapshots. For now it’s a technology preview: no compose stacks, and updating the image means recreating the container.
If it doesn’t work
Docker in an LXC container: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
- Cause
- In November 2025, containerd 1.7.29 fixed CVE-2025-52881 and started checking access to
/procmore strictly. Inside an unprivileged LXC the check fails, and Docker stopped starting containers after a routineapt upgradein the guest. - Fix
- Update the host to a recent 9.x and the packages in the guest. If that doesn’t help, pin
containerd.ioat 1.7.28 withapt-mark hold. To keep it from happening again, move Docker into a VM (Docker goes in a VM).
In a host directory mounted into a container, files belong to nobody, and writes fail with Permission denied
- Cause
- The container is unprivileged: root inside is uid 100000 on the host, user 1000 is uid 101000. Host files owned by 1000 look foreign inside.
- Fix
- On the host, give the directory to the uid the service in the container writes as:
chown -R 101000:101000 /srv/sharefor user 1000 (First LXC container).
Migrating a container to another node stops it
- Cause
- LXC has no live migration: the container’s processes and memory aren’t transferred, only the disk and config.
- Fix
- Migrate with
--restart— stop, transfer, start, seconds of downtime. Keep a service that can’t afford downtime in a VM.
A Debian container doesn’t start after a host update: systemd in the guest crashes or hangs
- Cause
- A recent
systemdin the guest needs access that thenesting=1option gives. Containers created in older Proxmox versions may not have it. - Fix
- On the container, Options › Features › Nesting — turn it on and restart the container. In the config it’s
features: nesting=1.