52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
# Decision: VM vs LXC for Docker Swarm nodes
|
||
|
||
**Date:** 2026-01-10
|
||
**Status:** Approved
|
||
**Author:** Chester + FrankGPT
|
||
|
||
## Context
|
||
|
||
We need to run Docker Swarm manager and worker nodes on Proxmox VE hosts. Two options exist:
|
||
|
||
1. **QEMU/KVM Virtual Machines (VMs)**
|
||
2. **LXC Containers**
|
||
|
||
## Decision
|
||
|
||
**Use VMs for all Docker Swarm nodes.**
|
||
|
||
## Rationale
|
||
|
||
| Factor | VM | LXC |
|
||
| :--- | :--- | :--- |
|
||
| Docker support | Officially supported | Unsupported (requires hacks) |
|
||
| Stability | High | Medium (kernel updates can break) |
|
||
| Isolation | Full kernel isolation | Shared kernel |
|
||
| Resource overhead | Higher (~1-2 GB RAM baseline) | Lower (~256 MB baseline) |
|
||
| Maintenance | Standard Ubuntu updates | AppArmor/seccomp tuning required |
|
||
|
||
**Trade-off accepted:** We accept the higher resource overhead of VMs in exchange for stability and official Docker support.
|
||
|
||
## Specifications
|
||
|
||
| Parameter | Value |
|
||
| :--- | :--- |
|
||
| Base image | Ubuntu 24.04 LTS (Noble) cloud-init |
|
||
| Disk | 32 GB per VM |
|
||
| RAM | 4 GB per VM |
|
||
| vCPU | 2 per VM |
|
||
| Network bridge | `vmbr0` (bridged to LAN) |
|
||
| Storage pool | `local-lvm` |
|
||
|
||
## Capacity planning (per physical host)
|
||
|
||
- Physical NVMe: 512 GB
|
||
- Available in `local-lvm`: ~357 GB
|
||
- Initial allocation: 2 VMs × 32 GB = 64 GB
|
||
- Remaining: ~293 GB (room for 4+ additional VMs)
|
||
|
||
## References
|
||
|
||
- [community-scripts/ProxmoxVE docker-vm.sh](https://github.com/community-scripts/ProxmoxVE) — reference implementation
|
||
- Docker documentation on supported platforms
|