Hassio on Hyper V

An open question to the Hassio community: has anyone gotten Hassio to work on Hyper V?

I know it works on Virtualbox, but I dont want to switch Hypervisors for several reasons, one of which being that is was designed to run as a service deep in the host computer.

Other open source VM’s I have converted to Hyper V-compatible virtual disks and they work fine. But not Hassio. It won’t boot.

Has anyone gotten this to work and/or is anyone working on this?

Thanks,

Thomas

1 Like

I’m really looking for a guide to do this too as I’m having no luck with it so far with Hyper-V either. Tried converting the vmdk multiple ways/times and different setup’s of vm/generation etc…

If you cant get the VMDK to work you could always try the advanced manual Hassio install from the link below on a generic Linux VM.

Long story short after many, many retries:

  1. Install Ubuntu Server 18.04.1 LTS on a Hyper-V VM using the alternate installation (first image in the list)
    I chose a Generation 2 VM, not sure if that has any impact.
  2. Boot the server, run through installation, log in and then run following command:
    curl -sL https://bit.ly/2yEElES | bash -
    This installs Hassio using this script. Note that the script is not mine, I just made a few tweaks.

If all is well, and it was for me, Hassio is installed fully automatically.

This is the only way i have gotten Hassio to work properly on Windows in Hyper V.

2 Likes

Seems like the latest VHDX image (still listed as beta) works just fine.

https://www.home-assistant.io/hassio/installation/

VHDX download link

1 Like

2.5 is running, but running update from the Hass.io system tool will prevent the reboot during the update.
After power cycling the VM it boots again to 2.5 (probably fail safe).

Does anyone know how to fix that?

For hyper to boot, you guys need to deactivate “secure Boot” in the VM settings.
Gen2 hyper type of machine was selected.

2 Likes

I use hass.io on Hyper-V – use a Gen 1 VM (no secureboot).

Alternatively, and this is what I did, I just run an ubuntu VM on Hyper-v and installed Hass.io manually via https://github.com/home-assistant/hassio-build/tree/master/install#install-hassio

i did this also… except i accidently did the docker.io version. it all runs great but seems my memory is crazy high. I do have about 9 addons including influxdb, grafana etc… and i turned off glances because of resources. but it still says memory demands are nearly 9gb. I am using dynamic memory. Is your experience similar?

For those who are interested: I updated above script with the new location of the install scripts. It was broken but now works again.

(Sidenote: I have switched to ESXi and was able to install Home Assistant with this script)

FWIW I’m a total HA noob, and I got it up and running on Hyper-V first with no issues.
Downloaded the vhdx, created a new gen 2 VM with secure boot turned off, pointed the disk to the .vhdx file and it worked first try.
I only switched to a Raspberry pi for bluetooth presence and future gpio things.
I may switch back to the VM and use MQTT to feed it from the pi gpio.

1 Like

Is there a reason to run hassio over standard HA? I run standard HA on Ubuntu 18.04 on a Hyper-V server as well, but just regular HA. It works the exact same way as it would on proper ubuntu and no need for scripts or workarounds.

But I have never used Hassio so I can’t really tell the difference other than that it is (apparently less open and harder to install custom stuff), but has the ability of installing addons which standard HA doesn’t (though I know it is possible to get them running anyway)

That about sums it up.

That is why I switched to ESXi. If your hardware is supported (most NUCs are, although not officially) it installs in minutes. You can then manage your VM’s from a browser and they have access to hardware such as USB devices. I never used gpio on the RPI because it don’t feel it is very suitable for home automation use.

Actually I believe there are three flavours: Home Assistant, Hassio on Standard Linux and Hassio on HassOs.

For me Hassio on Linux is the best of both worlds, so that is what I use. It has the addons, but is just as open as “standard” Home Assistant. The script for the install on Ubuntu Server 18.04 LTM makes it quite simple to get running.

Thomas

I’m curious as to why you feel the pi gpio is not very suitable?
My plan is to have it monitor 3 doors sensors and 3 motions from an unused alarm system, and make those statuses available to HA and push state variables to the ISY. I’ve never used gpio on a pi, so don’t really know what to expect.

I’m only using Hyper-V because I have an existing Hyper-V server with 2 Linux boxen, and a Windows server. I do wish Hyper-V would allow some hardware passthrough to the guests.

My system works with KNX i/o modules which makes it robust I also retain basic functionality should Home Assistant ever go down… If you are to use rpi gpio I would suggest to use at least some sort of rpi hat which gives electrical isolation. I used the Iono Pi for a while and was very pleased with it. Not using it anymore because it was underpowered to run my Hassio setup.

I was in the same situation but bit the bullet and migrated everything over to esxi. So far no regrets, VM’s are just as fast (maybe even faster) and very stable. The web-based management also is very convenient.

Thomas

Yep, that’s what recently worked for me too on a 2012R2 Hyper-V Host.

  1. Download the VHDX from the Hass.io link on @allan’s post above. Extract it to wherever you want to keep the VM’s disk. Rename as required. You might want to pre-create the folder tree for the VM.
  2. Create a new virtual machine. Choose to put it in the path you’ve already set up.
  3. Name it, select Generation 2, and give it some memory (I just went with 1024).
  4. Choose to use an existing disk - the one you downloaded in step 1.
  5. Before booting the VM, turn off Secure Boot in its settings.
  6. Boot it up - the drive seems to unpack / set up to around 6GB but I’ve not really started giving the VM any jobs yet so it might grow further. I expanded it to 10GB for good measure.

Edit: I was having a peculiar problem when I tried to build two like this - and only the first one worked. Turned out to be a browser issue, I must have had some cached stuff from some earlier testing. Clearing my cache sorted access to the second one. I expect one could spawn as many as needed.

3 Likes

I’m thinking of moving to a Hyper-V VM (existing server) from an RPi3+, noting that I’ll lose USB passthrough for my UZB1 Z-Wave stick. So that’ll mean I have to buy a Vera for local z-wave control (AFAIK Wink hub requires the cloud?) or another way to get Z-Wave over TCP/IP?

The RPi3+ has started to give me complaints with power supply. I think I need to buy a higher amperage 5v supply (using a 5v 2.4A phone charger right now). Also a big headache trying to pair my Schlage locks to the UZB1 on the RPi, but my old Wink hub was a breeze… but that’s for another thread!

In order to disable secureBoot use Powershell (remoting if you use a remote server)

Set-VMFirmware "VMName" -EnableSecureBoot Off

I’m thinking of moving to a Hyper-V VM (existing server) from an RPi3+, noting that I’ll lose USB passthrough for my UZB1 Z-Wave stick. So that’ll mean I have to buy a Vera for local z-wave control (AFAIK Wink hub requires the cloud?) or another way to get Z-Wave over TCP/IP?

I’ve done this before following these instructions as a guide (for OpenHAB). I was going to see if I can get it working with the VM image for Hyper-V, but I cannot figure out the login username and password in the shell to see what I can actually install.