Setup HassOS VM in ESXi

Recently I tried to setup an HassOS VM in ESXi. I found it difficult to get it running on an host running ESXi 6.7, so I thought it would be nice to share my procedures to get it working.

First of all, download the VMDK file from the following URL: https://www.home-assistant.io/hassio/installation/

Then create a new VM on your host. Give it a name, select the newest compability available, select Linux as Guest OS and Other Linux (64-bit) as Guest OS version. Click on Next.

On the next step, delete the disk and the CD/DVD drive.

Go to the VM Options tab and change firmware to EFI. The VM is now ready to be created.

Once the VM is created, go to the datastore where you created the VM, click on Datastore browser, open the folder where the VM is located, click on Upload and upload the VMDK you downloaded in the first step.

Once the VMDK file is uploaded, we need to do some magic on the file. First, SSH needs to be enabled on your host. Open the host’s Action menu, click on Services and Enable Secure Shell (SSH).

Now use your favorite terminal program and SSH to the host. When you’ve connect over SSH, run the following commands to open the VM’s directory and verify the uploaded VMDK file’s name.

[root@ESX:~] cd /vmfs/volumes/datastore01/HASSOS/
[root@ESX:/vmfs/volumes/12345678-12345678-1234-12345678999/HASSOS] ls -lh
total 358400
-rw-r--r--    1 root     root           0 Sep 24 18:36 HASSOS.vmsd
-rwxr-xr-x    1 root     root        1.7K Sep 24 18:36 HASSOS.vmx
-rw-r--r--    1 root     root      349.7M Sep 24 18:40 hassos_ova-2.12.vmdk

Then run the below commands to clone the disk to a thick disk and verify. Once you’ve verified that the clone has been created, remove the original file.

[root@ESX:/vmfs/volumes/12345678-12345678-1234-12345678999/HASSOS] vmkfstools -i hassos_ova-2.12.vmdk HASSOS.vmdk
Destination disk format: VMFS zeroedthick
Cloning disk 'hassos_ova-2.12.vmdk'...
Clone: 100% done.
[root@ESX:/vmfs/volumes/12345678-12345678-1234-12345678999/HALHAS01] ls -lh
total 12941312
-rw-------    1 root     root        6.0G Sep 24 18:44 HASSOS-flat.vmdk
-rw-------    1 root     root         471 Sep 24 18:44 HASSOS.vmdk
-rw-r--r--    1 root     root           0 Sep 24 18:36 HASSOS.vmsd
-rwxr-xr-x    1 root     root        1.7K Sep 24 18:36 HASSOS.vmx
-rw-r--r--    1 root     root      349.7M Sep 24 18:40 hassos_ova-2.12.vmdk
[root@ESX:/vmfs/volumes/datastore01/HASSOS] rm hassos_ova-2.12.vmdk
[root@ESX:/vmfs/volumes/datastore01/HASSOS] ls -lh
total 12582912
-rw-------    1 root     root        6.0G Sep 24 18:44 HASSOS-flat.vmdk
-rw-------    1 root     root         471 Sep 24 18:44 HASSOS.vmdk
-rw-r--r--    1 root     root           0 Sep 24 18:36 HASSOS.vmsd
-rwxr-xr-x    1 root     root        1.7K Sep 24 18:36 HASSOS.vmx

Now, go back to your VM, edit it and select Add hard disk, Existing hard disk and select the disk created above.

So far so good. Now comes the most crusial part for the VM to boot. Still in the edit dialog, change the newly added disk to an IDE disk by selecting IDE controller 0 and Master under Controller location.

Now we’re ready for rock and roll! Fire upp the VM and watch it boot up nice and smoothly.

Once the VM has finally booted up, find out the server’s IP address in your DHCP server and browse to http://_your_servers_ip:8123 (or even http://hassio:8123 if your environment supports dynamic DNS registration).

Congratulations! You now have an HassOS virtual machine up and running. ?

3 thoughts on “Setup HassOS VM in ESXi”

  1. Followed this guide but with VMware 6.0.0 and still worked like a charm.
    Although the part with editing the controller location of the hard drive was redundant.

  2. Good blog post. This helped me great as I have had some problems with the OVA files. Good work!

  3. I was having issues with using the ova on ESXi 6.7. Your easy to follow guide for HassOS VM in ESXi is running well and having the snapshot feature working saves alot of stress… Thanks for sharing

Leave a Reply

Your email address will not be published. Required fields are marked *