This article is part of the Homelab Self-Hosting Guide – the curated learning path for your own homelab.
Why not just a Raspberry Pi?
The Raspberry Pi is the classic entry point for Home Assistant – and for many it's enough. But beyond a certain point you hit limits: SD-card corruption after two years of continuous operation, 1–2 GB of RAM that gets tight with many integrations, and no snapshots at the hypervisor level.
If you already have a Linux server in your homelab, you can run Home Assistant OS in a KVM/QEMU VM – full add-on support like on dedicated hardware, but with real RAM, SSD storage, and the ability to back up the VM via snapshot.
Ad · Affiliate link – if you buy through it, I may earn a commission. It doesn’t change the price for you.
Home Assistant comes in several installation variants. HA OS in a VM has the advantage that the Supervisor, add-ons (Mosquitto, Z-Wave JS, Samba) and automatic backups are fully supported – just like on a Pi. The container variant is leaner, but you have to run add-ons manually as separate Docker containers.
Requirements
Make sure your Linux host supports hardware virtualization (Intel VT-x / AMD-V), and install the KVM/QEMU packages:
sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-managerAfter installation, check that KVM is loaded: lsmod | grep kvm should show kvm_intel or kvm_amd.
Prepare the Home Assistant OS image
Download and extract the official KVM image from the Home Assistant download page:
# Download the image (adjust the version)
wget https://github.com/home-assistant/operating-system/releases/download/X.Y/haos_ova-X.Y.qcow2.xz
# Extract
unxz haos_ova-X.Y.qcow2.xzCreate the VM
In the Virtual Machine Manager (virt-manager), create a new VM: choose Import existing disk image and select the extracted .qcow2 file.
Home Assistant OS boots only with UEFI, not with the default BIOS. In virt-manager you must change the firmware setting to UEFI (OVMF) before the first start. If you forget, the VM hangs at boot – with no helpful error message.
The remaining settings:
- RAM: At least 2 GB, better 4 GB if many add-ons are running.
- CPUs: At least 2 vCPUs.
- Network: Switch to bridge or macvtap (next section).
Network: bridge instead of NAT
For Home Assistant to discover devices on the local network (mDNS, SSDP for Hue, Chromecast etc.), the VM needs its own IP address on the home network. libvirt's default NAT isn't enough for that.
Two options:
- Bridge (br0): The cleanest solution. The VM sits directly on the same network as the host. Requires bridge configuration on the host (
/etc/network/interfacesor NetworkManager). - macvtap: Easier to set up (selectable directly in virt-manager), but host-to-VM communication is limited.
For most homelab setups, macvtap in bridge mode is the fastest path – in virt-manager, just pick the physical interface for the network instead of "NAT".
First boot and USB passthrough
Start the VM. After 1–2 minutes Home Assistant is reachable at http://homeassistant.local:8123 or the IP assigned by your router.
For Zigbee or Z-Wave sticks, the USB stick has to be passed into the VM via USB passthrough. In virt-manager: Add Hardware → USB Host Device. The stick is then available inside the VM as /dev/ttyUSB0.
If you've set up udev rules for fixed symlinks on the host, that unfortunately doesn't help directly with USB passthrough – inside the VM the stick gets its own ttyUSB number again. So the udev rule has to be created inside the VM as well.
What I left out
This article shows the basic setup. The following is deliberately not covered:
- Automatic backup of the VM. A regular
virsh snapshotor a Restic job on the qcow2 image belongs here, but it's a topic of its own. - GPU passthrough. For Frigate (camera NVR with Coral TPU) you need PCI passthrough – considerably more complex.
- Headless setup without virt-manager. Fully doable via
virshand XML – for servers without a GUI.
Conclusion
Home Assistant OS in KVM/QEMU is the sweet spot between "build everything in Docker yourself" and "sacrifice dedicated hardware". Full add-on support, real server performance, snapshots at the hypervisor level. If you have a Linux server in your homelab, there's no reason left for an SD card in a Raspberry Pi.
Ad · Affiliate link – if you buy through it, I may earn a commission. It doesn’t change the price for you.