Installing Home Assistant OS using Proxmox 8

Installing Home Assistant OS using Proxmox 8

(Previously Installing Home Assistant OS using Proxmox 7)

This guide will assist in installing Home Assistant on x86/64 machines using Proxmox as the operating system. It has been tested and verified on several machine types including Dell Optiplex SFF 990, Dell Optiplex USFF 780, and HP T520 thin client.

This guide uses scripts, by using a script, the installation process can be streamlined and simplified, making it easier for users to get up and running with Home Assistant OS on Proxmox VE. However, caution should be exercised when using scripts and automations from third-party sources. The source code for the scripts used in this guide can be viewed by following the link provided at the bottom.

The Home Assistant team provides an official KVM image for this installation, making it a supported and recommended method. While considered an easy/medium difficulty installation, basic familiarity with Linux is recommended.

To backup your current Home Assistant configuration for later restoration, refer to the documentation on backing up and restoring your configuration as well as some additional information HERE.

Section 1 - Installing Proxmox VE 8

1.1) Before proceeding with the installation, make sure that UEFI Boot & Virtualization is enabled and Secure Boot is disabled in your machine’s BIOS.

1.2) Download the Proxmox VE 8.x ISO Installer.

1.3) You will now need to make a bootable USB drive using balenaEtcher. Using a USB drive of at least 8gb, insert it into your PC, open Etcher, select the Proxmox VE image you just downloaded, select your USB drive, then click Flash.

1.4) Insert the bootable USB drive you just made into the machine you wish to install Proxmox VE on. Connect a monitor, Ethernet cable, keyboard, mouse, and power on the machine. If the machine doesn’t boot from the USB drive automatically, you will need to enter the boot options menu by pressing Esc, F2, F10 or F12, (This relies on the company of the computer or motherboard) on your keyboard immediately when the machine is powering on.

1.5) When you see the first screen, select Install Proxmox VE (Graphical) or Install Proxmox VE (Console) (With many newer generation CPUs, such as Intel 12th Gen and subsequent models, the graphical installation process may encounter difficulties in initiating) and press Enter. The installer will perform some automated tasks for 1-2 minutes.

1.6) On the EULA screen, select, I Agree.

1.7) On the Proxmox Virtualization Environment (PVE) screen, you will get the option to choose which disk you want to install Proxmox VE on. When finished, click Next.

1.8) On the Location and Time Zone selection, Type your country, then select your time zone and change the keyboard layout if needed. When finished, click Next

1.9) On the Administration password and E-mail address screen, choose a password (make sure you don’t forget it), confirm your password and enter a valid email address. When finished, click Next

1.10) On the Management network configuration screen.

  • Management interface Should auto populate with the network interface (Ethernet) of your machine. If not, select the network interface.
  • Hostname (FQDN) - The first part of the hostname is what your node will be called under Datacenter, you might want to change this to something more friendly now, the default is “pve” (eg. proxmox.lan).
  • IP Address - Should auto populate. If the IP address looks odd here and not at all like the address range of your other devices, it’s possible you may not be connected to your network, so check your network cable and start again.
  • Netmask - Should auto populate and be something like 255.255.255.0 depending on your network configuration.
  • Gateway - Should auto populate to the IP address of your router. If not, make sure you’re connected to your network
  • DNS server - Should auto populate to the same IP address as your gateway. Or, input one of your choosing. When finished, click Next

1.11) Next on the Summary screen, confirm that all of the details are correct. When confirmed click Install.

Proxmox VE will install and is finished once it displays its IP address on the screen. Take note of the IP address! It’s needed to access Proxmox via a web browser. Remove the USB drive, and click Reboot. While the machine is rebooting, you can unplug the monitor, keyboard and mouse, as they’re no longer needed.

1.12) After 1-2 minutes, you should be able to access Proxmox VE via a web browser using the noted IP address from above (eg. http://192.168.1.10:8006) If you see a message “Warning: Potential Security Risk Ahead”, you can safely ignore this, accept the risk and continue. Login with User name: root and the password you created on the Administration password and E-mail address screen.

Section 2 - Configuring and Updating Proxmox VE

This script provides options for managing Proxmox VE repositories and more, including disabling the Enterprise Repo, adding or correcting PVE sources, enabling the No-Subscription Repo, adding the test Repo, disabling the subscription nag, updating Proxmox VE to the latest version, applying security patches, and rebooting the system, making it easier and quicker to install Home Assistant OS.

2.1) To complete the post-installation process for Proxmox VE, copy and run the following command in the Proxmox Shell.

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)"

It is recommended to answer “yes” (y) to all options presented during the process.

Section 3 - Installing Home Assistant OS

This script automates the process of creating a Virtual Machine (VM) using the official KVM (qcow2) disk image provided by the Home Assistant Team. It involves finding, downloading, and extracting the image, defining user-defined settings, importing and attaching the disk, setting the boot order, and starting the VM. It supports various storage types, and does not involve any hidden installations.

3.1) To install the Home Assistant OS virtual machine, copy and run the following command in the Proxmox Shell.

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm.sh)"

3.2) The default settings can be used for most users, but advanced options for changing network settings such as mac, bridge, vlan and MTU are available for those who need them. The time it takes to complete the installation will vary based on your internet connection and the capabilities of your machine.

Upon completing the installation process, a message of “✓ Completed Successfully!” will appear to confirm its successful completion.

3.3) To find the IP address of a virtual machine in Proxmox VE, go to the Summary tab of the VM. Then, using the obtained IP address, access the Home Assistant interface by entering http://[ip_address]:8123 into a web browser.

Once you have reached the login screen on Home Assistant, the initial setup process is finished. At this point, you can create a new account with a chosen username and password. If you are a first-time user of Home Assistant, you can then proceed to set up any smart devices that the system has automatically detected on your network. If you have a previous installation of Home Assistant and a backup of your configuration, refer to the Home Assistant website for instructions on restoring your setup using the backup file, located HERE as well as some additional information HERE

Feel free to reach out to me via tag or private message with any suggestions for improving this guide. Your feedback is welcomed.

The scripts mentioned are created by @tteck and can be accessed on the GitHub repository located at GitHub - tteck/Proxmox: Proxmox VE Helper Scripts.

262 Likes

With the renaming recently, shouldn’t the title read “Installing Home Assistant Supervised on Proxmox”?

No, this installation uses the full Home Assistant image. First option in this list.

3 Likes

Sorry! Last time I played with that script I think he had both options…

I should have looked. :slight_smile:

3 Likes

This guide could not have come at a better time :slight_smile:

I literally just finished putting together an old PC with Proxmox in it trying to transfer my legacy raspberry pi home assistant over to a VM. Mostly due to instability of microSD card and my lack of backups. I recently had a crash and lost a lot of work. Looking to hopefully automate some backups and ability to easily go back if an update breaks my HA.

Having said that, HA has changed quite a bit the past 3 years… I am using Hassbian 0.76.2, anyone have an idea how easily I can transfer to a version that is more stable or easily managed by Proxmox? Is Hassbian = HA Core?

3 Likes

The only thing I could suggest is to start with the default config files of the latest version of HA, take a backup of all of them, and slowly copy your files over 1 at a time, like automation.yaml, script.yaml etc, reboot, and correct any breaking changes. It will be a slow process.

Check your configuration.yaml file against the latest and make the necessary changes you can see.

Someone else may have a better solution.

Basically, yes. Hassbian was just a version of Debian/Raspbian with HA configured to run in a venv, more or less.

1 Like

Thanks Kanga_who

So your recommendation based on your post is going full Home Assistant install with HassOS correct? It looks like it has full roll back and all. I don’t have a powerful PC running Proxmox so I was planning on using Ubuntu running containers to maximize my VMs :stuck_out_tongue:

I was planning on Ubuntu server with HA docker prior to seeing your post. Need to save some cores and ram for plex.

I would recommend going full Home Assitant and run it as an “appliance” within a VM. You can always run up other VM’s on ProxMox if you want to do other things. Home Assistant will run very happily with one CPU core and 1GB RAM if you are resource limited. Home Assistant will use as much RAM as you through at it, up until about 4GB though, but it doesn’t really make a huge difference in speed above 2GB.
Giving HA more than one core doesnt make any difference unless you are running add-ons that are CPU intensive like Folding@Home or Plex and doing a lot of decoding.
I understand people have their preferences, this is just my opinion :slight_smile: .
I’ve used Whiskerz007 script a few times and it is really simple once you have ProxMox running. It makes it a lot easier than running OpenBox, and you don’t have the Windows host chewing resources.

3 Likes

I’ve recently switched from a Supervised install on my main machine (Dell Optiplex 990), to Proxmox running 3 VM’s - 1x Home Assistant and 2x Ubuntu 18.04 VM’s, one running Plex, MQTT, OVPN, Portainer, etc and the other running only Shinobi for CCTV recording.

The machine has an old i5 2400, and 16gb RAM (recently updated and ran well on 8gb). I give each VM 2 cores and 4gb RAM. Runs very well, so you don’t need an amazing machine to do lots of work. HA runs without issue on 2gb of RAM, and I’ve found that Plex rarely uses over 2gb as well.

I’ve also got my test machine a Dell USFF 780 with a dual core and 4gb RAM set up using Proxmox with 1x HA VM and 1x Ubuntu VM, also runs perfectly well.

The current state of where the Supervised install is going to end up seems to me that it won’t be worth using (and I think that is kinda the plan), so I think the Proxmox route is a good one.

Even if you have limited resources, you can allocate cores to more than one machine.

Example: If you have a 4th Gen Corei5 (like I currently do) you can allocate cores to machines, as long as the CPU load isnt high even up to 3:1 is acceptable. My Machine does have 24GB RAM in it.
I currently have the following:
HA 1 Core and 2GB RAM
OMV 2 cores and 8GB RAM
Motion Eye: 4 Cores 12GB RAM (Runs 6x5MP Cameras, 24/7 recording at low res, Motion Detection at high res).
Plex: 2 cores 2GB RAM (Doesnt do a lot of decoding, mianly direct streaming)

The Core i5 4th gen processor is a 4 core processor with no hyperthreading, so 4 vCPU’s, but as you see I actually have it split into 9 allocated vCPU’s. I can do this as, apart from MotionEye, the other VM’s all have low CPU usage with only the odd spike.
ProxMox will allocate resources according to load, with time sharing if the host is completely 100% utilised. Unless you run all VM’s at 100% resource utilisation, you wont have issues with a setup like I have.

1 Like

Awesome, sounds like Proxmox can really load balance very well. I’m going to give it a go maybe tomorrow night as see how it goes. Worst case I can always delete and start over again :slight_smile:

Nice, I’ve heard great things about Proxmox, hence I wanted to give it a try. Thanks for breaking it down for me. First time I’m setting up my own virtual environments. I’ve dabbed into VirtualBox a bit and managed servers but never set one up from the ground up.

I have a NAS running Plex and lately it’s had some issues with decoding. It’s not running a powerful processor and I watched it hit peak 99% numerous times during the 1 stream of H.265 to my TV and it was choppy. So I figured maybe through it in a PC and see if it’s better.

I have an old Core i7 3rd gen with 16GB of ram laying around that I was going to use for video editing for my drone videos… Since my HA broke down, I decided to put Proxmox in it to see if I can get more out of it. I may eventually switch to a NUC core i5 later on if I can save some money for it. I like how small the NUC is and how much power you get out of it.

1 Like

That is ample for anything HA related, plus Plex and an NVR/CCTV. This is mine currently with everything running as noted above. (My wife is currently watching Columbo on Plex a well :man_facepalming:)

haha nice :joy:

Question, I just ran the whizkers script, took like 2 mins. Can I configure the Z-Wave USB stick later? Just run the install and let it go? 1. It’s late here and I’m heading to bed. 2. I need to power down the pi and well then my lights don’t work. 3. I need to run to the basement lol

1 Like

Yep. Just shutdown the system, plug in the Z-wave stick, then start up. It should show in the list after the reboot.

The great thing about i7 over an i5 is hyperthreading. That means ProxMox will see it as 8vCPUs so plenty of power for what it seems like you want to do.

ProxMox has USB passthrough. Just set that up in your VM. I use a Conbee II and a ZwaveMe USB stick and I pass both through with zero issues. You can either passthrough the device or actually pass through the entire USB port. I do port passthrough as those two devices are only used by HA, but both methods work flawlessly. If you do it later, you just stop the VM (shutdown the OS in Home Assistant) and passthrough the USB to the VM when needed.
As a note, I started on a Raspberry Pi 3 and migrated to the VM using a HA snapshot and it needed nothing to be reconfigured to detect the passed through USB devices. It just worked. DeConz using the HA add-on and Zwave setup via integration not yaml.

Oops. That was meant to be for @swiftvic

Thanks for the guide, I got it running!

A thing to mention: I needed to run apt update before apt-get install sudo

2 Likes

Is it possible to install MQTT following your other guides on the same VM as HA, or do I need to create a separate one for that?

Script works great… I need to copy my backup over but the base OS seems really stripped down. No apt for installing sshd. Am I missing something?

1 Like

I would install a Debian or Ubuntu VM to run any software, not on the Proxmox OS.

1 Like