Current best install method for VM in Ubuntu host

Hello,

I’m 100% new to Home Assistant, but well experienced in some other home automation platforms. I want to spend some time exploring HA rather than committing to it at this stage, but don’t have a spare RPi at the moment and would prefer not to have to buy one.

I do have a home server that I already have multiple VMs running on that could quite comfortably add Home Assistant to its list of duties. The server is running Ubuntu 20.04 and the VMs are running under KVM. It looks like there are various image files that I could use to quickly set up a VM, but I am getting very lost as to what is the best way to do this. If it is even an option any more - things seem to change quickly around here.

You’d be wanting to use the QCOW2 images if you want to use Home Assistant OS.

Thanks. Which one in particular? And are there install instructions? I have looked, but have ended up confused as things seem to change fast.

There’s only one QCOW2 image linked from the HAOS install page :wink:

You use it like any other image for KVM. There’s no HA instructions because:

  • How you use an image is specific to the VM software you’re using, not HA, and most of these image types are supported by many different pieces of software
  • If you’re using a VM platform you’re assumed to know how to use it/can Google
1 Like

Yep. The QCOW2 image is what I use on my Ubuntu 20.04 system.
Follow the instructions on the installation page for that image (copied here):
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: …”.

Make sure you’re not using NAT, so that you can get discovery messages and the like.
Here is a thread that may be of interest:

Thanks wmaker. That was very helpful. My googling hadn’t landed me on that page, but had landed me in the middle of a lot of very confusing github pages with many VM image files and no clear installation instructions.

It’s nice to know that some of the users around here are friendlier and more helpful than some of the admins. While I’m quite familiar with how to install a VM on my platform, some basic information about resource allocation for a specific VM is always welcome, and that is what you have sent me to.

For anyone else looking to install Home Assistant OS under KVM in Ubuntu, the magic incantation that worked for me was;

virt-install --name=home-assistant --memory=2048 --vcpus=2 --disk=hass/hassos_ova-4.16.qcow2,format=qcow2,size=20 --boot uefi --import --os-variant=debian9 --network=bridge:br0 --graphics none

It seemed to hang at the console, but a bit of a wait and a reboot and I was able to access the web interface successfully. I’m yet to work on passing through a USB port for my z-wave controller, but I don’t expect it to be difficult.