Differences between lxc and a vm
As I'm learning Proxmox I'm digging in to some of the approaches it has.
Proxmox VEΒ (PVE) supports two major virtualization methods: full virtual machines (using Kernel-based Virtual Machine, KVM) and lightweight containers (using LXC). LXC, short forΒ Linux Containers, has been integrated into PVE to help businesses run more workloads with less overhead. Because containers share the hostβs Linux kernel, they start up faster, use fewer resources, and deliver greater efficiency for Linux-based workloads.
| Factor | LXC Container | Virtual Machine (KVM) | | ββββββββ | ββββββββββββββββββ | ββββββββββββββββββββ- | | Startup Speed | Boots in seconds. No guest OS required. | Slower startup. Each VM runs its own OS instance. | | Resource Usage | Shares the host kernel, using less CPU and memory. | Higher overhead due to full virtualization. | | OS Compatibility | Runs Linux-based systems only. | Supports any OS (Windows, Linux, BSD, etc.). | | Isolation Level | Lightweight isolation via namespaces and cgroups. | Strong isolation. Each VM is fully independent. | | Performance | Excellent for lightweight, container-native workloads. | Consistent performance for heavy or mixed workloads. | | Security | Adequate for trusted workloads on a managed host. | Preferred for untrusted or multi-tenant environments. | | Management Overhead | Easier to deploy and maintain at scale. | More complex to patch, update, and manage individually. | | Ideal Use Case | Web servers, APIs, microservices, CI/CD, AI workloads. | Databases, legacy apps, Windows systems, regulated workloads. | Quote and table both from [Proxmox LXC 101: What Are Linux Containers and How Do They Work in Proxmox VE?](https://www.horizoniq.com/blog/proxmox-lxc/
Containers and virtual machines are very similar resource virtualization technologies. Virtualization is the process in which a system singular resource like RAM, CPU, Disk, or Networking can be βvirtualizedβ and represented as multiple resources. The key differentiator between containers and virtual machines is that virtual machines virtualize an entire machine down to the hardware layers and containers only virtualize software layers above the operating system level.
Atlassian: Containers vs. virtual machines
What works for me
On my MiniPC PL63, I installed a bunch of different things on it - Bazzite, Unraid, Ubuntu with Coolify. Each time I had to blow away the install or mess around with partitions.
So, using VMs, I can install anything on this little server, without needing to start from scratch each time.
For LXCs, things can run extremely efficiently. So, I can run a bunch of those if I can.