Setup VLAN and HA tutorial

Unfortunately, it seems do doesnt work anymore :

Warning: nmcli (1.46.0) and NetworkManager (1.44.2) versions don't match. Restarting NetworkManager is advised.
Error: Failed to add 'enp2s0@vlan10' connection: connection.autoconnect-ports: unknown property

and when i read this, i was really disapointed :

The error with the version mismatch is coming from the fact that you're accessing the Network Manager backend from nmcli running in a container, so it's not a surprise the versions don't match. While HAOS has a specific version coming from the latest Buildroot (plus eventually some HAOS modifications), the containers use nmcli from the Alpine Linux repositories. A (very dirty) workaround would be to manually install/compile an older version of the nmcli and use that.

However, using NM directly is something that's rather unsupported and discouraged - now that HAOS has ha network ... commands in the CLI, those should be used instead. In case you're missing any functionality there, please file a feature request for that, as it's the way how we should move forward. Closing this, since it's not an OS issue.

from here : https://github.com/home-assistant/operating-system/issues/3396

Are you aware from this problem or i am the ony concerned?

Thanks

Hi,
i have the same problem.
after loading a backup on a new sd-card, everything else runs fine, only the nmcli commands doesn’t work.
same error message

1 Like

Holy sh…,
i found the solution…
do not use “nmcli”, the new command ist “ha network”

Usage:
ha network vlan [interface] [id] [flags]

Examples:
ha network vlan eth0 10 --ipv4-method auto --ipv6-method disabled

now it works :smiley:

3 Likes

For those still struggling, HA has changed a lot in the network configuration section (namely VLAN), so you can do most of it just using the UI, and we had already accounted for that earlier in this thread. Old tutorials were left for those who have older versions of HA and need to configure VLANs that way.
For reference:

2 Likes

Hi,

i used nmcli the whole time and never had any issues before.
my first motivation was to up or downgrade the networkmanager or to understand which propertys are missing :see_no_evil: After a long search I stumbled across one of the posts and my first thought was just W…T…F…, that was stupid.

The communication that nmcli can no longer be used could have been a little bit better.

But thanks for the hint :smiley:
have a nice day

Yes, sorry for that late edition. I already edited the tutorial with a warning for those that have a more recent version of HA. I think that it can still be done via terminal (haven’t tested it myself) but you have to access the proper container, and it’s not easy to get there anymore. Better stick to the UI :wink:

1 Like