Supervised Install on Proxmox

NOTE: The QCOW2 File used in this guide is in beta as of May 10, 2020. Hence, some parts under HA may not work as expected, due to bugs and other issues.

Background

As you would have read on the recent Blog Post on Home-Assistant.io ([On hold] Deprecating Home Assistant Supervised on generic Linux - Home Assistant), the generic installation of Home Assistant Supervised on generic Linux is being depreciated.

Although this is not something that will have an immediate impact on existing users, as this method is no longer supported, as downstream issues and bugs would not be resolved.

There are many methods of installing Home Assistant Supervised, which can be found here (Installation - Home Assistant). However, for the purposes of this guide, we would be demonstrating the method to get a QCOW2 image installed and running on Proxmox.

Prerequisites

In order to get Home Assistant up and running, the following items are needed:

  1. Proxmox

  2. Shell access to Proxmox

  3. Access to the filesystem in Proxmox to upload the QCOW2 file

  4. Home Assistant QCOW2 file which can be found at Installation - Home Assistant

Getting Proxmox ready and Installing Home Assistant

  1. Create a New VM on Proxmox: We start by creating a new VM in Proxmox, with the following settings. Also, please note the VM ID of the machine here, since we would require this in the later steps.

image

image

image

image

image

image

image

image

  1. Download QCOW2 Image from Home Assistant: Using the link above, download the QCOW2 image from above, and extract the same on your desktop. Post extraction, you will be left with a file similar to “hassos_ova-4.6.qcow2”

  2. Upload file to Proxmox: Using your preferred method, transfer the extracted file to “/root” in Proxmox

  3. Importing QCOW2 to Proxmox VM: Login to Proxmox using your favourite shell client (or the web shell client) and run the following command-

qm importdisk 101 /root/hassos_ova-4.6.qcow2 local --format qcow2

Where, “101” is the ID of the VM created in the earlier steps and “/root/hassos_ova-4.6.qcow2” is the file location and name of the extracted QCOW2 file on the Proxmox host

Upon running the command, you should see a similar success message:

image

After running the command, we can remove the QCOW2 file using

rm /root/hassos_ova-4.6.qcow2

  1. Edit the VM in Proxmox: Navigate to VM->Hardware in the Proxmox GUI to the selected VM which we previously configured. We need to make some changes here.

This text will be hiddena. Remove the Hard Disk we created earlier: Select the Disk and click on “Detach” from the options available in the top row

image

The following pop-up should appear. Click on “Yes”

image

Then, select the same disk and click on the “Remove” button from the top row. Confirm the same, by clicking on “Yes” in the subsequent popup window.

image

b. You should have one more “Unused Disk” here. Select the same and click on the “Add” button, which should bring up a popup. Click on “Add” here.

image

c. Select the newly added disk, and click on “Resize”

image

image

In the popup, enter the ADDITIONAL space that you would like to allocate to the disk. I have added 24G more, to the existing 6G, for a total of 30G. Once you are ready, click on “Resize Disk”

  1. After completion of these steps, you can start the VM, and you should be able to navigate to the IP address allocated to the VM. You can find this by either visiting the admin panel of your router, or alternatively if your router supports mDNS, you can visit “http://homeassistant.local:8123

Credits: @haxxa @cogneato on the Discord Channel

Notes: This is my first guide, so please excuse the terrible formatting and any other mistakes that may be present.

19 Likes

So why not just run the script by Whiskerz? That works perfectly.

3 Likes

I did try with the script, but for some reason i would keep getting the error

[ERROR] 4@127 Unknown failure occurred

I tried updating my Proxmox version and even numerous reboots, but could not get it up and running. This is when @haxxa suggested that i try this method, which got me up and running in no time.

1 Like

Running a script on a Hypervisor isn’t an ideal way of installing an OS, realistically it should be deployable without calling scripts on the host. In the future the qcow2 image will be out of beta and the best option for Proxmox users, it works pretty much out of the box.

5 Likes

Hello @cyberwarfare
thank you for your guide which I followed.
My new Home Assistant is now working.
I have a question : what are the credentials (homeassistant login) to log into the newly created VM ?

The console login is root, without any password

Great :+1:

This might be a stupid question but what does that really mean?
what is it about it that makes it a beta? I mean that at a high level description, I don’t mean the deep technical details.

If one uses the qcow2 (beta) image should the VM be rebuilt once the image is out of beta or will it automagically update itself or the component inside?

If that question even makes sense. VMs are not my field of expertise :wink:

2 Likes

Nice! A great write up and I’m sure it’ll be useful for a lot of people.

I would like to know this also, can we make a snapshot and install it when the image is out of beta?

1 Like

Excellent guide!
Once Home Assistant is running, the Supervisor page says that there is an OS update to 3.13 available. However, pressing the Update button in my environment does not update the OS. The System log does not have any error messages.
Has anyone seen something similar?

You might need to wait a bit for it to update - it won’t be instant and might look like nothing is happening. I have updated the OS numerous times in the version I play with (installed by the script)

1 Like

I believe the qcow2 image is a few versions ahead of the others - it seems to line up with some of the pre-releases that are on the GitHub

1 Like

Since the qcow2 vesion is in beta, its ahead of the stable branch. Hence, this button will appear, and will not do anything upon being pressed.

You can either ignore this, or you can click on the “Join Beta” button in the supervisor tab.

1 Like

Hmm, have to disagree to this one
Running script on the hypervisor is a way of automating the provisioning of VMs

As my proxmox is working with zfs storage, I can’t install the additional disk as a qcow2 disk. I’ve to do :

qm importdisk 106 hassos_ova-4.6.qcow2 local-lvm --format raw

but then, i get stuck on “booting from hard drive” when starting the virtual machine

Hi,

I could not choose “quemu image format (qcow2)” on my (newish) Proxmox, only RAW as option. qm importdisk 101 /root/hassos_ova-4.6.qcow2 local --format qcow2 gave error “not supported” - something about LVM-thin.

What works: use RAW in VM-creation, then qm importdisk 101 /root/hassos_ova-4.6.qcow2 local-lvm ; everything else as above - thanks for the guide!

6 Likes

Double check the BIOS setting, it should be “OVMF (UEFI)” - I had the same thing with it just sitting at “booting from hard drive” when I just tried to use the qcow2 disk with out info about other settings, the default is “SeaBIOS”.

I use proxmox and have Home-assistant running in a ubuntu 20.04 lxc container without any virtual environments. That version of Ubuntu ships with python 3.7 and the container is only used for home-assistant. Lightweight.

What would be the benefit of using this image?

Kind Regards Erik

I am new to virtualization so correct me if I’m wrong, but my understanding is that qcow2 images have the benefit of thin provisioning (if you install 4GB worth of data on a 32 GB virtual hard drive, it will only take up 4GB of your actual hard drive, at least until it grows), at the expense of higher IO overhead. On the other hand, raw images are fastest, but don’t have thin provisioning available. It seems like many users might actually prefer raw images over qcow2 if performance is the priority rather than saving disk space?