Hi,
Me and a friend are trying to install his hass.io as VM using the VMDK.
The problem is that we can’t have network if we set the VM to work with bridge network adapter, it doesn’t receive IP address.
The only way is to use NAT, but then it won’t recognize the network devices in the house.
Despite the long time since the post I keep what worked for me on the same topic for future reference:
– Be sure your vm is stopped.
–Run the VMWare Virtual Network Editor
(click start and search for Virtual Network Editor)
– Run it as administrator (or click the button at the bottom of the screen that says, “change settings.” VMNet0 will dislpay when running as administrator. Otherwise, it will not be visible)
– Highlight VMNet0 and click on “Automatic Settings”
– You will see a list of adapters. De-select all but the physical network card. (When I set up up with player, I had selected only the 1. After install of workstation, all of the items were checked.)
Despite being an old topic, this is still relevant even today (2021), so I’m leaving some specific steps here to spare someone else the despair.
Possible Quick Solution
Disable all other virtual network adapters except the VMware virtual network adapters.
In my case, it turned out one of the randomly created Hyper-V adapters was handing out an IP to the home assistant VM which was on a completely different subnet than the bridged subnet.
Troubleshooting
Upon booting the home assistant VM, and it automatically logging into the home assistant CLI, switch to the OS CLI via pressing ALT + F2.
1.1. The default username is ‘root’.
Verify that the OS is listening for incoming connections to the webapp.
Command: netstat -plunt | grep 8123
Expected output: Some entry of the form 0.0.0.0:8123 or equivalent.
2.1. If no entries can be found, verify that the docker containers exist.
Command: docker ps
Expected output: You should see several container IDs of form homeassistant/MODULE
Verify that IP address of the attached VMware NIC is on the same subnet of your local network (e.g. IP should be 192.168.1.55 if on subnet 192.168.1.0/24).
Command: nmcli
Expected output: The interface enp2s1 is the VMware NIC interface.
enp2s1: connected to 'Home Assistant OS default'
"enp2s1"
...
inet4 192.168.1.180/24
route4 192.168.1.0/24
route4 0.0.0.0/0
...
Note: You can swap the VMWare network settings (e.g. from bridged to NAT) and you should see this IP update automatically. If it doesn’t update automatically, then usually that means some config is interfering but you can still manually disable/enable the interface via nmcli to force it.
If the IP address in step 3 is incorrect, you can manually define a correct and persistent (survives reboots) static IP address which I would recommend.
Command: vi /etc/NetworkManager/system-connections/default
Then change the section below to match your needs.
Note: There are more options than above that you can modify. To find them, run the command nmcli connection show "Home Assistant OS default". Once you see the options, you will need to ‘translate’ them. e.g. ‘ipv4.route-metric’ will be under section [ipv4] with field ‘route-metric=’.
Reload the settings, and toggle the interface.
Command: nmcli connection reload nmcli device disconnect enp2s1 nmcli device connect enp2s1
Verify the new settings have been applied via nmcli, and now you should be able to connect directly via your new IP (or via homeassistant.local:8123 which uses LLMNR to resolve hostname on Windows).
Appendix (Reference Commands)
`nmcli` Network Manager CLI interface.
general Shows summary of connection (e.g. wifi enabled? connectivity limited?)
device Manage physical devices.
show Shows config/properties per interface (e.g. IP4.Address, IP6.Gateway).
status Shows a summary of devices (connected/disconnected).
modify Non-persistent modification.
<INT> <PROPERTY> e.g. enp2s1 ipv4.address 192.168.1.140.
enp2s1 -ipv4.addresses 192.168.1.141/20.
connection Manage logical devices
show Show currently active devices.
<NAME> Shows all configuration on a connection.
down/up Activate the connection name.
<NAME> Enumerate connection names via `nmcli connection`.
reload Re-apply settings (e.g. re-read connection profiles).
PATH /etc/NetworkManager/
The quick solution worked for me, thank you. VMware created a new virtual network adapter (called VMWare Network Adapter VMnet8) )with a random IP, I disabled this and then i was able to access HA.
I am using VMware Workstation 17 Player and trying to make the bridged connection to work. All tutorials are about Workstation Pro, using the Network Editor that comes with it. The Player installation doesn’t have it. You seems to be the only one saying that had success doing it!
I am using the same haaos_ova-9.5.vmdk and connection with NAT works, but the bridged one, the enp2s1 gets no IP.
I want to try your solution and I understand tha I need to update the code IPs to my reality here. My only doubt is where I should issue the first command “net update …”
My host Os is Windows 11 and I am using an old Xiaomi notebook with wireless adapter.
On VMware Workstation 17 Player it’s the same, I just tested.
The first command “net update enp2s1…” is in the vmware player terminal, you can’t copy/paste, just type manually.
the “net” is entered on the console at the ha > prompt. Once that command has been run you then “login” and get a shell prompt ‘#’ . You type the nmcli commands at that prompt. It all worked for me
I could config static IP to Virtual Machine. It’s had same network loop with my real PC. but, i cannot access to the home assistant IP and i used another PC connected to the home assistant, not stalble. So sad!
so I see tons of issues when it comes to setup wifi based HA OS and I get into this as well.
I am using vmware player 17. in addition I was already able get vmware network editor and correct adapters selection under bridged network option. On top of it I also disabled all other network adapters in windows settings.
after all this I created new virtual machine for HA OS.
when I am booting up HA I get failed status for NetworkManager-wait-online.service
/dev/virtio-ports/org.qemu.quest_agent.0 and for systemd-time-wait-sync.service
in my understanding these are related to non existent internet conncetion.
accordingly as in this thread posted few ideas how to troubleshoot I think my issue is with the first few tests.
when i try to find used port 8123 I get no results.
for command ‘docker ps’ I get this result:
This tip I was missing is in paulrorrockgit comment
the “net” is entered on the console at the ha > prompt. Once that command has been run you then “login” and get a shell prompt ‘#’ . You type the nmcli commands at that prompt.
huray finally launched and stuck on preparing step
errors show that supervisor needs to be updated first…
digging further