I’m taking some detailed notes here to understand the heart of the problem so that it’s easier for others to identify that they have this same problem.
From another post I learned how you can “login” to the system shell.
ha> login
I also learned that network-manager
is the tool used to manage network settings in Home Assistant OS; hence "Failed to start Network Manager’.
I’ve not really worked with network-manager
before I looked for a guide to disable IPV6. Which I found an article from Red Hat discussing just that.
I ran the following commands hoping ipv4 would start working.
# nmcli set ipv6.method disabled
# nmcli set ipv4.method auto
# nmcli connection up "Supervisor enp0s3"
Nope, but it did give me a command to check logs:
journalctl -xe NM_CONNECTION=xxxx-xxxx-xxxx-xxxx + NM_DEVICE=enp0s3
I assume the command is unique per attempt.
Anyways the command spit out a lot of helpful information. Namely that the dhcp4
transaction was timing out after 45 seconds.
Given sembo’s post I might wager that the issue is at the link layer of the OSI stack since we don’t seem to be connecting into the network to get an IP address.
Update: the net
tool does not exist in the VM and it looks like the above nmcli
commands do the same thing as in sembo’s post.
Update: In general it’s not a good idea to use bridge
networking with WiFi. The combination isn’t very compatible. Lots of VirtualBox forum posts about this. Most of these posts suggest using NAT.
When I do use NAT the VM is assigned an IP address. Just need to figure out how to access it
If I ping the assigned IP I get requests timeouts.
There’s a great post in SuperUser about this issue with NAT: HOST can't connect to GUEST with NAT networking at Virtualbox but others
. (I would link it, but I’m out of links )
The gist is this:
edit the NAT Network’s port forwarding. In VirtualBox manager, go to File → Preferences → Network and click the edit button for the NAT Network you are using. Click on Port Forwarding. Add rules that forward ports on your host machine to ip address + port on the guests (You don’t need to set the IP address for your host machine, that’s optional).
This is exactly what Vagrant does when you set config.vm.network "forwarded_port", guest: 8123, host: 8123
. It would be so nice if HAOS was packaged as a Vagrant box. Working with Virtualbox directly is such a drag.
Update: The SuperUser post is outdated (like I said, a drag). You need to go to the settings for the VM > Network > Advanced > Port Forwarding
. Then define a rule from 127.0.0.1:8123 to $GUEST_VM_IP:8123.
And now it works
TLDR:
- Don’t use Bridged networking with a WiFi adapter. Neither are built for that.
- Try using a NAT network and assign port forwarding rules.
Another Sad Update: If you use NAT the VM will not be in the same network as any device you would want to attach.
At this point I’m guessing you just have to have a wired ethernet connection.