Why I Prefer Virtual Machines and Docker Over Proxmox LXCs

As a home lab enthusiast, I’ve experimented with various virtualization options, including Proxmox Linux Containers (LXC). While LXCs have their advantages, such as minimal overhead and fast startup times, I’ve found that Virtual Machines (VMs) and Docker containers offer a superior experience for my specific needs.

Here are the top reasons why VMs and Docker excels over LXCs:

**1. True Isolation and Security**
VMs provide true isolation and security by running each computing environment on its own completely independent operating system, complete with its own kernel, memory space, and virtualized hardware. This ensures that if a specific VM is compromised due to a security bug, it won’t affect the host system or other VMs.

In contrast, LXC containers share the same Linux kernel as the host system, making them vulnerable to kernel-level vulnerabilities that can compromise the entire system.

**2. Dedicated Hardware Passthrough**
VMs offer native performance with dedicated hardware passthrough, allowing virtual machines to directly control physical hardware devices. This capability is not available in LXCs, which operate on a shared resource model.

With hardware passthrough, I can perform PCI passthrough, ensuring that each VM interacts with the device as if it were directly plugged into its own motherboard. This results in near-native performance and high-quality output without other services competing for resources.

**3. Isolation from Shared Resources**
LXCs share resources with the host system, which can lead to performance issues and complex setups when multiple LXCs try to use the same device.

In contrast, VMs provide complete isolation from shared resources, ensuring that each VM has its own dedicated hardware and resources.

**4. Security through Containerization**
Docker containers offer excellent application-level containerization, providing isolation for individual applications within a single container.

By running Docker inside a VM, I can add an extra layer of security, ensuring that even if a sophisticated attacker escapes from one of my Docker containers, they won’t have direct access to the host’s kernel or other VMs.

**5. Combining the Best of Both Worlds**
For demanding workloads and sensitive applications, VMs provide complete hardware-level separation, dedicated resource allocation, and the ability to pass through critical devices like GPUs.

Docker excels at application-level packaging and portability, making it an excellent choice for containerizing individual applications within a VM.

While LXCs are still useful in specific scenarios where lightweight nature is necessary, I’ve found that VMs and Docker offer a superior experience for my home lab needs.

Source: https://www.xda-developers.com/reasons-use-vms-docker-rather-than-proxmox-lxcs