Jump to content

Home Assistant on eisy not online


Recommended Posts

I had Michel help me reconfigure my NVME so it is the boot drive and I had to redo my HA install but I can not get HA to show up at all. I briefly got a new device on my router but when I look at it there is no IP shown for it and it is no longer online. The HA directory is present and I can perform a sudo vm restart homeassistant and it all seems to be working. When I look in /etc.rc.conf i see

ifconfig_re0="DHCP"
vm_enable="YES"
vm_dir="zfs:storage/vms"
vm_list="homeassistant"
mdnsresponderposix_flags="-f /usr/local/etc/udx.d/static/mdns.services"


which looks good to me. Does anybody have any advice for me?

Link to comment

Here is the vm info if someone could look at theirs to see if anything stands out

[admin@eisy /]$ sudo vm info homeassistant
------------------------
Virtual Machine: homeassistant
------------------------
  state: running (1802)
  datastore: default
  loader: uefi
  uuid: e5fb8b86-d29b-11ee-a9aa-0021b90261da
  cpu: 2
  memory: 2G
  memory-resident: 724877312 (691.296M)

  console-ports
    com1: /dev/nmdm-homeassistant.1B

  network-interface
    number: 0
    emulation: virtio-net
    virtual-switch: public
    fixed-mac-address: 58:9c:fc:0f:be:89
    fixed-device: -
    active-device: -
    desc: -
    mtu:
    bridge: vm-public

  virtual-disk
    number: 0
    device-type: sparse-zvol
    emulation: virtio-blk
    options: -
    system-path: /dev/zvol/storage/vms/homeassistant/disk0
    bytes-size: 137438953472 (128.000G)
    bytes-used: 8503794688 (7.919G)

Link to comment
41 minutes ago, rob7419 said:

Any resolution on this issue? My setup is producing the same issues.

Yes after some reading about Bhyve I found the switch is responsible for the network interface so I performed a "sudo vm switch destroy public" then instead of trying to figure out how to add it back I stopped HA "sudo vm poweroff -f homeassistant" then removed it "sudo vm destroy -f homeassistant" then ran the script to install it. I think all those commands are correct I did a lot of experimenting and figured out the commands from  https://www.gsp.com/cgi-bin/man.cgi?section=8&topic=VM-BHYVE

Edited by tazman
Link to comment
Posted (edited)

I could really use some help with this! When I perform a fresh install of everything including sudo pkg remove edk2-bhyve sudo pkg remove vm-bhyve then run my script everything is working fine but once I reboot eisy HA drops off the network and will not come back. The info for the switch and HA look the same after reboot so I think something is messed up with the connection to the operating system but I can not figure out what is wrong. Any help is greatly appreciated!

[admin@eisy /]$ sudo vm switch info public
local: _netgraph,: bad variable name
------------------------
Virtual Switch: public
------------------------
  type: standard
  ident: vm-public
  vlan: -
  physical-ports: re0
  bytes-in: 796128377 (759.247M)
  bytes-out: 802290155 (765.123M)

  virtual-port
    device: tap0
    vm: homeassistant

[admin@eisy /]$ sudo vm info homeassistant
------------------------
Virtual Machine: homeassistant
------------------------
  state: running (33005)
  datastore: default
  loader: uefi
  uuid: 642bcf48-d786-11ee-82f2-0021b90261da
  cpu: 2
  memory: 2G
  memory-resident: 2151665664 (2.003G)

  console-ports
    com1: /dev/nmdm-homeassistant.1B

  network-interface
    number: 0
    emulation: virtio-net
    virtual-switch: public
    fixed-mac-address: 58:9c:fc:09:77:b9
    fixed-device: -
    active-device: -
    desc: -
    mtu:
    bridge: vm-public

  virtual-disk
    number: 0
    device-type: sparse-zvol
    emulation: virtio-blk
    options: -
    system-path: /dev/zvol/storage/vms/homeassistant/disk0
    bytes-size: 137438953472 (128.000G)
    bytes-used: 8130683904 (7.572G)

 

Edited by tazman
Link to comment

I too am still having issues with the VM connecting back to the network after a reboot of the eisy, from either the admin console or the command line. I was about to ask you after my last post if you have survived a reboot but was still trying different things to determine what is causing the issue on mine.

At first I assumed it was not reconnecting due to setting a DHCP reservation in my router, but I have found taking certain steps within HA I can get it to change to the new reserved IP and it will continue to work until a cold restart of the eisy computer. The only way to get the network bridge that the VM creates to reset is to go through all the steps to remove the network settings and then destroy and rebuild the VM, which I have done multiply time over the last 2 weeks. I have also tried restarting my DHCP server and rebooting my router to try and reestablish a connection.

The VM displays the same information with $ sudo vm info homeassistant when connected to the network verses not connected. I can find anything within the VM commands or $ ifconfig that is different.

I have tried restarting the VM and at the same time watching a tailed ping, it will show a couple of reply's during the startup process but then drops the connection, I think that maybe HA is failing to start within the VM but as of today can't find anything in the debug logs of the VM, just started looking into those.

I tried the recommendation from this post:

but it does not fix my reboot issue. I might try it again when I get the chance since I've resolved the DHCP reservation issue just yesterday. You give it a try, maybe you can get it to work and share how.

 

 

Link to comment

@rob7419 the post you linked is HA has trouble loading the ISY plugin which I experienced but is not related. I'm at a lost for where to go from here I can not even run sudo fl.ops revert.to.emmc.boot to return to the old drive and try to star over I get executing from /usr/local/etc/udx.d/static
cannot resolve path '/dev/mmcsd0p3'
Sat Mar  2 10:36:46 MST 2024|/usr/local/etc/udx.d/static/fl.ops: failed replacing the zpool ...

I guess I'm just lucky ISY is still working.

Link to comment
7 hours ago, Michel Kohanim said:

Ah, apologies @tazman! 

We'll figure it out. 

With kind regards,
Michel

No problem I appreciate your help and expertise trying to figure this out! I think the question is whether it would be beneficial to look at @rob7419's system or if we can get mine working then you can help them with a fix.

Link to comment

@Michel Kohanim & @tazman

I am Ok with giving access to my eisy or sending it in to UDI, it is not my production device so it is just sitting waiting on this to get resolved. It sound like it is not happening on all eisy's, others are running HA in the VM without issue. Are these the only 2 that are having problems? If I need to open a ticket, let me know?

Link to comment

@Michel Kohanim

Yes, I lose connection to HA after a reboot or if I shutdown the VM from the CLI. I can restart HA from the HA dashboard and it will work as expected.

Any of the following, sudo shutdown -r now, from the reboot button in admin console of the eisy, or if I preform a sudo vm poweroff -f, the VM will not reconnect to the network after the restart.

The only way I can get it to work again, so far, is deleting the network setting of the VM's network bridge, destroying it and then rebuilding from the script.

Edited by rob7419
Link to comment

@rob7419,

Thank you. Have you tried configuring the vm with static IP address?

From all the evidence provided by @tazman, we have 99% confidence the issue is the router but don't know exactly what. The VM is online and you can connect to it using a vnc client (instructions below):

In:

/storage/vms/homeassistant/homeassistant.conf add:

graphics="yes"

graphics_wait="yes" (this causes the boot of the VM to wait so that you can connect to it):

Now, you need a VNC client (such as tightvnc or tigervnc) to connect to:

IP address of the VM and Port 5901 or 5900

You can see all the boot up messages and get to HA cli.

From there, you can see that the VM is not getting an IP address.

It's very peculiar.

With kind regards,

Michel

Link to comment

@Michel Kohanim

I have tried to set a static IP and that doesn't fix the connection issue on a restart or reboot.

I also set up the the VNC client and was able to see the boot sequence and connect to HA CLI interface. This was the output from $ network info after running the $ ./create_ha_vm.sh  install script. 

2024-03-0814_10_05-bhyve-TightVNCViewer.png.b5a0e9283d20b52829203c3d11a71366.png

 

Then $ shutdown -r now, again reconnected to the VNC viewer and watch the boot sequence, the following screen shot was taken right after start up but hasn't changes in the last 30 minutes. Says it is waiting the supervisor to startup..

 

2024-03-0814_36_01-bhyve-TightVNCViewerFirefox.thumb.png.daf5f9717e8569b51dcc84edd048440d.png

 

Could it be that HA doesn't actually startup within the VM to make the DHCP connection to the router?

 

 

Link to comment

@Michel Kohanim

ssh :

Operation timed out, I cannot ping even from the diagnostics in my router (pfSense).

From VNC $ docker ps is not a valid command:

 

image.png.583405ca9fadc0635b83a18c9d11dee1.png

 

Something during the the startup when it is rebooting is preventing it from connecting to the WAN, maybe DNS related?

 

2024-03-0815_37_08-bhyve-TightVNCViewer.png.28b3012bd1731434b8364f5f29939e68.png

 

I do run a local DNS server on the pfSense router, not sure what could be preventing it on a reboot verses a clean install?

 

 

 

Link to comment

I found that if I enter sudo dhclient tap0 sudo dhclient  vm-public both of them get an IP address and then I have to start HA through VNC then it becomes available at homeassistant.local:8123 so I think the problem is with the setup of the virtual network devices but I don't know how to fix it.

I don't know that this will help @rob7419 because I did not have an IP address listed when I started HA through VNC. 

Link to comment
12 hours ago, tazman said:

I found that if I enter sudo dhclient tap0 sudo dhclient  vm-public both of them get an IP address and then I have to start HA through VNC then it becomes available at homeassistant.local:8123 so I think the problem is with the setup of the virtual network devices but I don't know how to fix it.

I don't know that this will help @rob7419 because I did not have an IP address listed when I started HA through VNC. 

Thanks @tazman seems like we are making progress, this is the first time I've been able to reconnect to the network without destroying the VM and recreating it.

After a reboot, I can $ sudo dhclient vm-public on the eisy IP - SSH session and HA reconnects to the network and everything works as expected. HA dashboard is accessible.  I don't have to restart HA from the VNC viewer, it can already be running when the above command is run and it will come back online immediately.

The VM will also run as expected after a VM poweroff -f and then a VM start, once the DHCP request is issued on the vm-public switch, HA will boot normally.

I also agree that the problem is with the VM virtual network bridge, it seem that doesn't reset during a reboot or VM restart.

Edited by rob7419
Link to comment
9 hours ago, rob7419 said:

After a reboot, I can $ sudo dhclient vm-public on the eisy IP - SSH session and HA reconnects to the network and everything works as expected. HA dashboard is accessible.  I don't have to restart HA from the VNC viewer, it can already be running when the above command is run and it will come back online immediately.

Disregard this comment, had to run both the $ sudo dhclient vm-public and $ sudo dhclient tap0 to reconnect to the network this morning.

Link to comment

@rob7419Well I hosed my eisy I put cloned_interface="bridge0 tap0" and ifconfig_bridge0="addm re0 addm tap0" in my rc.conf file and it will only boot to a read only file system. I ordered a USB reader that I should be able to restore my backup rc.conf file I made from Amazon that I should get tonight. When it boots it says "Enter full pathname of shell or RETURN for /bin/sh:" does anyone know of a path that would allow be to be able to load something where I would be able to edit a file?

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...