Home Assistant OS in KVM Qemu
A complete guide to virtualizing your smart home hub.
1. Requirements
Before starting, make sure that your Linux host supports hardware virtualization, and install the required KVM/QEMU packages. For Debian/Ubuntu-based systems:
sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
2. Download Home Assistant OS Image
Go to the official download page for alternative Home Assistant installations and download the **KVM (.qcow2)** image. Extract the archive so that you get the pure .qcow2 disk image file.
unxz haos_ova-X.Y.Z.qcow2.xz
3. Create Virtual Machine
Open the Virtual Machine Manager (virt-manager) and create a new VM. Select Import existing disk image and choose your unpacked .qcow2 file.
Important settings during setup:
- **Random Access Memory (RAM):** Allocate at least 2048 MB (2 GB).
- **CPUs:** Assign at least 2 vCPUs.
- **Firmware:** You MUST change the firmware setting to **UEFI** before starting, otherwise HA OS will not boot.
4. Network Configuration
For Home Assistant to automatically detect devices in your local network (such as smart lights or media players), you should switch the VM's network adapter to a **network bridge (Bridge br0)** or a **macvtap** interface, instead of using the default NAT. This way, the VM will receive its own IP address directly from your router.
Once everything is set up, start the VM. You can access your new, lightning-fast Home Assistant instance by navigating in your browser to http://homeassistant.local:8123 or the IP address assigned by the router!