Installing Home Assistant OS (HASSio) in ESXi
Home Assistant offers a number of options when it comes to using their home automation software. You can either install it as a standalone package (Home Assistant Core) on an existing system, or if you have supported hardware, you are able to use a version of it called Home Assistant OS (previously known as HASSio). This combines a minimal operating system, the Home Assistant Core package, and the Home Assistant Supervisor to provide the maintenance tools to manage the system. This guide will walk through how to create a virtual machine within VMWare’s hypervisor, ESXi, and make the required changes to the Home Assistant OS disk image for full ESXi compatibility.
Obtaining The Home Assistant OS Disk Image
To begin with you’ll need to download the latest VMDK file from the Home Assistant website. To ensure you have the most up-to-date version of it, follow the link and scroll down the page a little and its available under the heading “As a virtual appliance (x86_64/UEFI)”, you’ll need to click the link that says “VMDK”. Once the file has download you’ll need to use an appropriate utility to decompress it.
The next step is to upload the uncompressed disk image to a location on your ESXi host. I have a single data store called “SSD” configured. Where this appears in the below screenshots, change it as appropriate for your own configuration.
Converting The Home Assistant OS Disk Image
The Home Assistant website provides a VMWare Workstation type virtual disk. To enable proper compatibility with ESXi, including allowing the ability to take snapshots, you need to convert it using the built in ESXi shell command
vmkfstools. ESXi normally has SSH disabled as a security precaution. To enable it click the “Host” option in the navigator on the left hand side of the screen. Select the “Actions” icon and navigate to “Services” and select “Enable Secure Shell (SSH)”.
Connect to your ESXi server using your SSH client of choice, in my case, PuTTY. Log in using the root account to ensure that you have the necessary permissions to run the following commands.
In the previous steps I created a directory called “Home Assistant Virtual Appliance”, change to the directory you created previously, remembering to surround the path in quotes if you have used spaces in the name.
cd "/vmfs/volumes/SSD/Home Assistant Virtual Appliance"
Next convert the disk image to the required format with the following command, adjusting the filename as appropriate to the version number downloaded.
vmkfstools -i hassos_ova-5.9.vmdk hassos_esxi.vmdk
Once this completes, you can follow the instructions above to disable SSH again; if left enabled, a security warning will constantly display in ESXi.
Configuring The Virtual Machine in ESXi
To configure the Virtual Machine follow the instructions in the below screenshots.
Booting the Virtual Machine
Once complete, you should be able to power on the virtual machine and, all being well, should see the machine begin to boot.
Be patient, the first boot can take a little while but you can then continue with the configuration instructions back on the main Home Assistant website.