Hassio on Hyper V

This thread looks promising. I wonder how hard this would be to put into a plugin…

It turns out that getting it into an addon isn’t hard at all. However, I can’t get the device to show up outside of the addon’s Docker container (it shows up just fine in /dev in the addon’s container, but not anywhere else).

Earlier this month, I hopped on discord to see if I could get some help there. @pvizeli suggested that shared memory support might be needed in order for this to work. I think that meant that I’d need to patch Hassio to allows a new privledged option to config.json. Given that socat ends up creating a pseudo-tty, I was also wondering if Docker’s SYS_TTY_CONFIG capability might also help.

I’ve never used Docker and I’m very new to Home Assistant as well, so I’m in unfamiliar territory. At this point, I’m stumped and I’m not sure what the next step should be, but wanted to share in case someone who is more knowledgeable than I am wanted to chime in or pick up this work.

I’ve made up a slightly more comprehensive guide here.

Have veru good expirience with HyperV with Hass.io, after pretty bad with Virtual box.
HyperV just works, starts with Windows, doesn’t need any maintenance.
Easy to setup… Real treat, not something you expect from MS :).

Totally agree with that. Incredibly stable for months and months.

Really excited to try Home Assistant but equally frustrated trying to simply run it using the Hyper-V disk

Issue Summary
Receiving the following starting my VM using the hassos_ova-3.7.vhdx:

udevd[7]: starting version 3.2.8
udevd[8]: starting eudev-3.2.8
hv_baloon: Max. dynamic memory size: 1048576 MB
Uhhuh. NMI received for unknown reason 00 on CPU 0.
Do you have a strange power saving mode enabled?
Dazed and confused, but trying to continue
Uhhuh. NMI received for unknown reason 00 on CPU 1.
Do you have a strange power saving mode enabled?
Dazed and confused, but trying to continue

Details

  • I’m new to Hyper-V (but I am familiar with VirtualBox)
  • Server: Dell 9020 (just updated to most recent BIOS)
  • New Win10 install - Windows Update says I’m up to date with updates
  • Network card: Intel® Ethernet Connection I217-LM - Under Power Management, I’ve unchecked: “Allow the computer to turn off this device to save power”

I followed Aves’ steps, documented here: Hass.io On Hyper-V - Step By Step

NOTES

  • I ran into no issues following the described steps
  • When I started the VM, and all the commands started scrolling, no errors/failures displayed

My variations to Aves’ steps

  • Step #4 I store the VM at the default on my C: which is an SSD with about 200GB free space
  • Step #6 I specified 4096 MB of memory
  • Step #7 it says: “Connect it to the network you want to use it on.”, I chose the virtual switch I created with connection type external pointing to my Intel® Ethernet Connection I217-LM
  • I also added a 2nd processor (as indicated in my above Issue Summary)

I also tried
Expand Hassio.vhdx file and Create New HASSIO VM in Hyper-V but had less luck

  • I was able to expand the disk successfully (and use it, as well as the original disk in what I described in the above steps unsuccessfully)
  • At step #8 when I clicked Finish to create the new virtual hard disk I got: “The server encountered an error trying to create the virtual hard disk”, “Failed to convert the virtual disk. The system failed to convert … \scsi#disk&ven_msft&prod_virtual_disk#2&1f4adff…”

I also tried
Setting up NAT network for Hyper-V guests (I can’t add the link her due to this post being restricted to 2 links) and using it, it seemed to setup ok but when I used it in my virtual machine I got at least on failure when I started it (I don’t recall it) so I reverted what I created, I figured using my external connection with my I217-LM card is the most likely to work

I also tried
The older hassos_ova-2.4.vhdx disk, but not only got the same error but I also got a few FAILED messages when I started the VM

Honestly, I wish I had another machine, with another NIC to rule that out, this “seems” like it should be pretty straight forward as others have stated their relatively easy success

Hi IsThisRight

I’m very new to Home Assistant, and I had the same “issue” as you. Until I accidentally pressed enter with console in focus. Made me LOL @ myself.

Turns out that the boot process on console is not reaching login prompt, but when it’s sitting @ the “Uhhuh. NMI received for unknown reason 00 on CPU 0.” message, the server has started and the application is reachable on http://vm-ip:8123. Just click in the Hyper-V colnsole and press Enter, it’ll spawn login prompt. :slight_smile:

Happy 2020

Grtz

Lukas

1 Like

Ugh… all I can say is WOW and THANK YOU!

I was able to login, specifying the default (root) - see Default password for the pi account (again, total newbie here so I didn’t know this) then going to http://hassio:8123 (specified in the Install Home Assistant doc got me to the Home Assistant (HA) login page.

Again, being a complete newbie here I’m interested in what you mean by accessing the vm via “vm-pi:8123”? I didn’t know my vm-ip and I tried to get it doing the following:

  • From PowerShell (as Admin): Get-VM | Select-Object -ExpandProperty NetworkAdapters | Select-Object VMName,IPAddresses - no IP address appeared
  • From the hassio console: hassio > dns info, I couldn’t find an IP that would resolve using port 8123

Knowing I can get to the HA login page, I pinged hassio but got what appears to be an IPv6 address as follows:
C:\Windows\system32>ping hassio

Pinging hassio.local [fe80::18b6:da41:8574:c7b0%3] with 32 bytes of data:
Reply from fe80::18b6:da41:8574:c7b0%3: time=1ms
Reply from fe80::18b6:da41:8574:c7b0%3: time<1ms
Reply from fe80::18b6:da41:8574:c7b0%3: time=1ms
Reply from fe80::18b6:da41:8574:c7b0%3: time<1ms

Ping statistics for fe80::18b6:da41:8574:c7b0%3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

QUESTIONS

  1. Can I get an IPv4 address?

From my phone accessing my internal network:

  1. Why can’t I access http://hassio:8123/ or http://hassio:8123/lovelace/default_view?
  2. With the Home Assistant app installed (Android) why does scanning not find it?

ANSWER
I just looked at my DHCP Server leases on my router and saw it there - hassio is the Active Host Name

You’re welcome. 2 & 3 no idea without troubleshooting more, but I see you have been able to login. So this point is moot by now. :slight_smile:

Just for your future reference, ping was one good way to go, just as good as the dhcp lease table. Next time just add the -4 switch to force icmp to use IPv4, “ping -4 hassio”. and -6 will force IPv6. :+1:

I’ve seen the “Dazed and Confused” message before too. I expect it’s to do with the processor architecture (or lack thereof); I haven’t delved too much because as noted the server has actually started. Maybe it’s a transient error that resolves itself.
I have an AMD and an Intel host and the same VMs run on either, though you can’t live migrate them between architectures. Maybe whatever Hyper-V is doing to abstract the CPU operations between the VM and the tin doesn’t behave quite like a “real” CPU and confuses it?
I am no Linux expert, hence my favoring the HassIO image, but the two processors might be confusing it too. Also I don’t know if it’s 64bit off hand. If it’s only 32 bit you’re only going to get a max of 4GB ram out of it. Mine’s running fine for now on 1GB but it’s one of those pet projects that grows so I’ll see what happens in the future…

OMFG, that worked :wink:

That worked for me too! Thanks so much for writing the step by step instructions!!!

Same experience. Have you found a solution?