Installing Home Assistant OS (HAOS) in KVM on Raspberry Pi 5
Running Home Assistant OS (HAOS) natively on a Raspberry Pi is common, but virtualizing it in KVM unlocks flexibility for home lab setups or multi-purpose Pi 5 systems. This guide shows you, step-by-step, how to set up HAOS in a KVM virtual machine on your Raspberry Pi 5 (64-bit).
Technology Stack Components:
- Hardware Layer: Raspberry Pi 5 with ARM64 architecture and hardware virtualization extensions
- Host OS: Raspberry Pi OS (Debian-based) providing the foundation
- Hypervisor: QEMU/KVM for hardware-accelerated virtualization
- Management Layer:
- libvirt daemon for VM lifecycle management and networking
- Cockpit web UI (with cockpit-machines) for graphical VM administration
- Guest OS: Home Assistant Operating System running as an isolated virtual machine
- Network Bridge: Direct ethernet connection allowing VM to appear as a native network device
Prerequisites
- Raspberry Pi 5 running Raspberry Pi OS 64-bit (Bookworm or newer recommended)
- Sufficient RAM (at least 4GB, 8GB strongly recommended)
- Hardware virtualization support enabled (available by default on RPi5)
- Basic Linux terminal skills