<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Lxc on rHomelab</title><link>https://rhomelab.com/tags/lxc/</link><description>Recent content in Lxc on rHomelab</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 25 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rhomelab.com/tags/lxc/index.xml" rel="self" type="application/rss+xml"/><item><title>LXC vs VM: Choosing the Right Proxmox Container Type for Your Homelab Workload</title><link>https://rhomelab.com/proxmox/lxc-vs-vm-in-proxmox/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://rhomelab.com/proxmox/lxc-vs-vm-in-proxmox/</guid><description>When to reach for an LXC container versus a full VM in Proxmox, what you actually give up with each, and the workloads where the wrong choice will bite you later.</description><content:encoded><![CDATA[<p>Proxmox hands you two completely different ways to run a workload, LXC containers and full VMs, and the &ldquo;New CT&rdquo; and &ldquo;Create VM&rdquo; buttons sit right next to each other in the UI like the choice barely matters. It matters. Pick the wrong one for a given workload and you&rsquo;ll either waste resources you didn&rsquo;t need to waste, or hit a wall six months in when something a container fundamentally can&rsquo;t do turns out to be exactly what you needed. Here&rsquo;s how to actually decide, workload by workload, instead of defaulting to whichever one you set up first.</p>
<h2 id="the-core-difference-in-practical-terms">The core difference, in practical terms</h2>
<p>A VM gets its own virtualized hardware and boots its own kernel. It doesn&rsquo;t know or care what&rsquo;s running on the host, it&rsquo;s isolated the same way a physical machine would be. An LXC container shares the host&rsquo;s kernel and gets isolated at the process/namespace level instead, more like a very well-fenced-off set of processes than a separate computer.</p>
<p>That one architectural difference cascades into everything else:</p>
<ul>
<li><strong>Resource overhead.</strong> An LXC container has essentially none, no second kernel to boot, no virtualized RAM/CPU/disk layer to pay tax on. A VM always costs you some overhead just to exist, even idling.</li>
<li><strong>Boot time.</strong> Containers start in a second or two. VMs go through an actual boot sequence, BIOS/UEFI, kernel init, the works, so multiple seconds at minimum.</li>
<li><strong>Kernel dependency.</strong> Containers use the Proxmox host&rsquo;s kernel, full stop. You cannot run a container needing a different kernel version or a different OS family (no Windows containers, no BSD containers) than what the host is running. A VM can run literally any OS the hypervisor supports, kernel version and OS family are completely decoupled from the host.</li>
<li><strong>Isolation strength.</strong> A VM&rsquo;s isolation is hardware-enforced, a kernel exploit inside a VM doesn&rsquo;t get you access to the host or sibling VMs without also breaking out of the hypervisor itself, a much harder bar. A container&rsquo;s isolation is namespace-based, weaker by design, a serious enough kernel vulnerability could theoretically let a process inside a container reach the host, since they share the exact same kernel.</li>
</ul>
<p>Neither is &ldquo;better&rdquo;, they&rsquo;re built for different jobs, and most functioning homelabs run a mix of both rather than picking one exclusively.</p>
<h2 id="where-lxc-is-the-right-call">Where LXC is the right call</h2>
<p><strong>Lightweight services with no unusual kernel needs.</strong> Reverse proxies, DNS servers (Pi-hole/AdGuard), monitoring stacks, Git servers, wikis, most single-purpose Linux daemons, this is LXC&rsquo;s home turf. You get near-native performance, instant boot, and you can run a dozen of these on hardware that would visibly struggle running a dozen equivalent VMs.</p>
<p><strong>Density matters and the workload is trusted.</strong> If you&rsquo;re trying to pack a lot of small services onto modest hardware (the classic mini-PC homelab situation), LXC&rsquo;s near-zero overhead is the difference between &ldquo;runs comfortably&rdquo; and &ldquo;constantly fighting for RAM.&rdquo; This assumes the workloads are things you trust, your own self-hosted apps, not untrusted or internet-facing code you&rsquo;d want hard isolation from.</p>
<p><strong>Fast iteration and disposability.</strong> Spinning a container up and tearing it down to test something takes seconds, which matters if you&rsquo;re doing that constantly. VMs work for this too, just slower at every step.</p>
<p><strong>Privileged vs unprivileged, and why it matters.</strong> Proxmox lets you create containers as privileged (container root = host root, effectively) or unprivileged (container root is mapped to an unprivileged host UID via a UID shift). Default to unprivileged unless you have a specific reason not to, it&rsquo;s the meaningfully safer option and closes most of the &ldquo;container breakout&rdquo; concern above. Privileged containers are sometimes genuinely necessary (some Docker-in-LXC setups, certain hardware passthrough scenarios, NAS-backed bind mounts where the storage backend can&rsquo;t preserve unprivileged UID mappings) but that should be a deliberate exception, not the default, and worth documenting why when you do it.</p>
<h2 id="where-a-vm-is-the-right-call">Where a VM is the right call</h2>
<p><strong>Anything that needs its own kernel or a different OS.</strong> Windows, BSD, a specific Linux kernel version your workload depends on, any of that rules out LXC entirely, no debate to have.</p>
<p><strong>Docker and container-orchestration hosts.</strong> Running Docker (or Kubernetes) inside an LXC container is possible and plenty of homelabbers do it, but it comes with real friction, cgroup/AppArmor quirks that need workarounds (nesting flags, sometimes <code>network_mode: host</code> to dodge sysctl permission issues under confinement), and occasional breakage when the container runtime assumes capabilities an LXC guest doesn&rsquo;t fully provide. If you&rsquo;re standing up a Docker host as a primary workload rather than one throwaway test, a small VM running Docker natively is usually less troubleshooting over the life of that host than fighting LXC&rsquo;s constraints indefinitely. If you already have a working Docker-in-LXC setup and it&rsquo;s stable, that&rsquo;s a fine reason to leave it, just know it&rsquo;s the fussier path if you&rsquo;re starting fresh.</p>
<p><strong>Untrusted or internet-facing workloads where isolation strength actually matters.</strong> If something is reachable from the public internet, or you&rsquo;re running code you don&rsquo;t fully trust, a VM&rsquo;s hardware-enforced isolation is worth the overhead. This is the security tradeoff from the section above made concrete: the blast radius of a compromised VM is smaller and better contained than a compromised container sharing your host&rsquo;s kernel.</p>
<p><strong>Anything doing GPU passthrough, complex PCIe passthrough, or needing a full virtualized hardware stack.</strong> LXC can do limited device passthrough for simple cases, but full GPU passthrough (for a gaming VM, an AI/ML workload, a Plex hardware-transcode setup that needs exclusive device access) is squarely VM territory, built on IOMMU/VFIO, and not something LXC&rsquo;s architecture supports the same way.</p>
<p><strong>Snapshotting an entire OS state you want to roll back cleanly, including kernel-level state.</strong> Both LXC and VMs support snapshots in Proxmox, but a VM snapshot captures a genuinely complete, isolated machine state. For anything where you want to be absolutely certain a rollback restores everything with no shared-kernel edge cases, VM snapshots are the more bulletproof option.</p>
<h2 id="a-decision-shortcut">A decision shortcut</h2>
<p>If you&rsquo;re staring at the create button and not sure, ask two questions in order:</p>
<ol>
<li><strong>Does it need a different kernel, a non-Linux OS, GPU passthrough, or genuinely hard security isolation?</strong> If yes, VM, no further discussion needed.</li>
<li><strong>Is it a lightweight, trusted, Linux-native service where you want density and fast boot?</strong> If yes, LXC, and default to unprivileged unless you hit a specific wall that requires privileged.</li>
</ol>
<p>Everything in between, Docker hosts being the most common gray area, comes down to how much you value the marginal resource savings of LXC against the reduced friction of a VM running Docker the way it was actually designed to run. There&rsquo;s no universally correct answer there, it&rsquo;s a tradeoff specific to your hardware headroom and your tolerance for occasionally debugging container-runtime-inside-container quirks.</p>
<h2 id="bottom-line">Bottom line</h2>
<p>Most homelabs end up running both, LXC for the pile of lightweight always-on services where density and boot speed matter, VMs for anything needing a different kernel, real hardware isolation, GPU access, or a Docker host you don&rsquo;t want to fight with. Don&rsquo;t pick one type and force every workload into it. Match the container type to what the workload actually needs, and the &ldquo;which one do I use&rdquo; question mostly answers itself.</p>
]]></content:encoded></item></channel></rss>