I have Hassio running on KVM using the QCOW2 image and thought i’d share the process i went through here for those that are starting off on the same path!
So initially I wanted to run Home Assistant on Docker! which i got running really easily using the below docker create statement:
`docker create \
-v /home/$USER/home_assistant:/config \
-v /etc/localtime:/etc/localtime:ro \
docker start home-assistant`
I also got this working in Rancher and Kubernetes, which is awesome! I really enjoy Kubernetes and getting into my bash terminal as often as i can!
I then learn this doesn’t come with Supervisor Doh! have a read here Superviser on generic linux is on hold for the moment: https://www.home-assistant.io/blog/2020/05/09/deprecating-home-assistant-supervised-on-generic-linux/
I then started my journey on getting this working on a Virtual machine using the provided on the Home Assistant website
I didn’t want to invest in a Raspberry PI just yet and wanting to run this on Linux box i picked the QCOW2 image and started using that, i had some initial issues with this due to the configuration that is required to get the image to boot, and at first i forgot to extract the gz file. Here are some commands to get the image form the site and unzip it.
Cool so once that is done assuming you have virt-manger and kvm installed you can run virt-manager to launch the manger.
Follow the details here to create the VM:
For KVM create a new virtual machine in virt-manager, select “Import existing disk image”, provide the path to the QCOW2 image above, choose “Generic Default” for the operating system, assign at least 2 GB memory and 1 vCPU, check the box for “Customize configuration before install” and select your bridge under “Network Selection”, then under customization select “Overview” -> “Firmware” -> “UEFI x86_64: …”.
I am running Ubuntu 20.04 and was able to boot the image using the below firmware:
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
Besure to “Customize configuration before install” and select this firmware, else the image won’t boot, which was one of the issues i had in the beginning. (My own fault)
Next step once you have this booted is to get the networking working so Hassio is running on your lan and not as part a NAT.
To do this i had to create a new bridged network with a slave selected as the physical network adapter on your machine. To find this physical adapter run ip a s and look for the ip ranges that are for your local lan. in my case it was the 10.0.0.0/24 network CIDR the device this was called eno1. Your device name may be different and so will your CIDR range.
To create the bridge use nmtui, go to Edit a connection > then to add > select bridge.
Give your bridge a profile name, i used brige_home and a device name of nm-bridge1 you will need to select this later when you run virt-manager again to change the network settings
Then add an ethernet slave and give the device name of your physical network card, in my case eno1 it will fill in the MAC address for you so you don’t have to worry about that.
You can leave IPv4 Configuration as since you are most likely running a DHCP server in your network. Set IPv6 to disabled, since most users won’t be using this.
After this your will need to either reboot your host or restart the network service using:
sudo service network-manager restart
Once this is done go back into virt-manager > the VM you created earlier and change the network config to use the nm-bridge1 (the bridge your created earlier), this will place your Hassio on your local network so it can easily connection to all your IOT devices in your home without any natting issues.
virsh list will show you all the running VM’s that you have on libvert, it will print out something like the below:
`Id Name State
2 hassio running`
I hope you found this guide helpful in your journey to running Home Assistant with supervisor to take advantage of all its features! If you have any comments or improvements feel free to mention in the comments section.