ADR-017: KVM Virtualization for Service Hosting
Status: Accepted Date: 2025-09-15 Authors: Development Team
KVM (Kernel-based Virtual Machine) virtualization is adopted as the recommended hosting approach for Entirius platform services.
Use: KVM hypervisor with libvirt for virtual machine management
Instead of: Docker containers, bare metal deployment, or cloud infrastructure
Reason: Provides strong VM-level isolation, near-native performance, and full infrastructure control while maintaining cost-effectiveness through open-source tooling.
# List running VMs
virsh list
# Start/stop VM
virsh start vm-name
virsh shutdown vm-name
# Create VM snapshot
virsh snapshot-create-as vm-name snapshot-name
# Clone VM
virt-clone --original vm-name --name new-vm --auto-clone
The Entirius platform uses the following VM naming pattern:
{company}-{environment}-{service}-{instance}
Components:
{company}- Company or client identifier{environment}- Deployment environment (dev, test, staging, prod){service}- Service name or purpose (api-gateway, pim-service, n8n, database){instance}- Instance number (1, 2, 3) for horizontal scaling
Examples:
company-prod-n8n-1 # Production n8n automation server
company-prod-grafana-1 # Production monitoring dashboard
company-prod-api-gateway-1 # Production API gateway, first instance
company-prod-api-gateway-2 # Production API gateway, second instance (load balanced)
company-prod-pim-1 # Production PIM service
company-prod-database-1 # Production database server
company-stage-api-gateway-1 # Staging environment API gateway
company-dev-pim-1 # Development PIM service
company-test-pim-1 # Test PIM service
The Entirius platform requires a hosting strategy that supports isolation between services, scalable resource allocation, easy deployment and disaster recovery, environment separation (dev/test/prod), and cost-effective infrastructure utilization.
- Primary benefit: Strong VM-level isolation with near-native performance provides security and stability for multi-tenant service hosting while maintaining full infrastructure control
- Trade-offs: Requires virtualization-capable hardware and additional management overhead compared to bare metal or containers
- Impact: Self-hosted open-source solution eliminates licensing and cloud costs, enables consistent dev/test/prod environments via VM templates, and provides robust backup through snapshots
