Page 1 of 1

Docker MACVLAN issues

Posted: 28 Jul 2024, 22:48
by validide
Hi,

I am trying to setup Home Assistant in Docker and spinning-up the container fails due to the macvlan setup with "operation not supported".

Code: Select all

Error response from daemon: failed to create the macvlan port: operation not supported

System info:
Terra Master T6-423

Code: Select all

cat /proc/version
Linux version 5.15.59 (root@0f5bb0a9182d) (x86_64-tnas-linux-gnu-gcc.br_real (Buildroot 2022.02-rc1-1-g115ad9c548-dirty) 11.2.0, GNU ld (GNU Binutils) 2.37) #229 SMP Tue Aug 8 13:50:13 CST 2023

ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 6c:bf:b5:02:a7:d5 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 6c:bf:b5:02:a7:d6 brd ff:ff:ff:ff:ff:ff
5: wwan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none
6: wwan1: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none
7: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
8: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
9: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
12: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/tunnel6 :: brd ::
13: br-89169b8a15ea: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:b9:61:bd:7b brd ff:ff:ff:ff:ff:ff
14: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:3a:0e:fa:32 brd ff:ff:ff:ff:ff:ff
15: docker_gwbridge: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:bb:7b:89:d5 brd ff:ff:ff:ff:ff:ff

The docker macvlan configuration is:

Code: Select all

docker network create --config-only --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=eth0 --ip-range 192.168.0.232/29 macvlan_local_cfg
docker network create -d macvlan --config-from macvlan_local_cfg macvlan_network

I saw other post saying the problem was fixed by running the following but in my case this fails

Code: Select all

ip link add macvlan0 link eth0 type macvlan mode bridge
ip addr add 192.168.0.232/29 dev macvlan0
ip link set macvlan0 up
I get an error after the first command:

Code: Select all

ip link add macvlan0 link eth0 type macvlan mode bridge

RTNETLINK answers: Operation not supported

Did anyone run into similar issues of has any suggestion on what might cause the error?

Thanks!

Re: Docker MACVLAN issues

Posted: 30 Nov 2024, 17:42
by DCCentR
validide wrote: 28 Jul 2024, 22:48 Hi,

I am trying to setup Home Assistant in Docker and spinning-up the container fails due to the macvlan setup with "operation not supported".

Code: Select all

Error response from daemon: failed to create the macvlan port: operation not supported

System info:
Terra Master T6-423

Code: Select all

cat /proc/version
Linux version 5.15.59 (root@0f5bb0a9182d) (x86_64-tnas-linux-gnu-gcc.br_real (Buildroot 2022.02-rc1-1-g115ad9c548-dirty) 11.2.0, GNU ld (GNU Binutils) 2.37) #229 SMP Tue Aug 8 13:50:13 CST 2023

ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 6c:bf:b5:02:a7:d5 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 6c:bf:b5:02:a7:d6 brd ff:ff:ff:ff:ff:ff
5: wwan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none
6: wwan1: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none
7: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
8: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
9: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
12: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/tunnel6 :: brd ::
13: br-89169b8a15ea: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:b9:61:bd:7b brd ff:ff:ff:ff:ff:ff
14: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:3a:0e:fa:32 brd ff:ff:ff:ff:ff:ff
15: docker_gwbridge: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:bb:7b:89:d5 brd ff:ff:ff:ff:ff:ff

The docker macvlan configuration is:

Code: Select all

docker network create --config-only --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=eth0 --ip-range 192.168.0.232/29 macvlan_local_cfg
docker network create -d macvlan --config-from macvlan_local_cfg macvlan_network

I saw other post saying the problem was fixed by running the following but in my case this fails

Code: Select all

ip link add macvlan0 link eth0 type macvlan mode bridge
ip addr add 192.168.0.232/29 dev macvlan0
ip link set macvlan0 up
I get an error after the first command:

Code: Select all

ip link add macvlan0 link eth0 type macvlan mode bridge

RTNETLINK answers: Operation not supported

Did anyone run into similar issues of has any suggestion on what might cause the error?

Thanks!
I have same issue on TOS6, did you manage to find a solution?

Re: Docker MACVLAN issues

Posted: 30 Nov 2024, 19:15
by RyanYang
DCCentR wrote: 30 Nov 2024, 17:42
The information has been conveyed to the relevant personnel and will be discussed next week.
The following links might be helpful for him in the future:
Setting up and using macvlan networks in Docker: https://collabnix.com/2-minutes-to-dock ... ers-guide/
Home Assistant configuration methods: https://tmnascommunity.eu/download/homeassistant-2/

Re: Docker MACVLAN issues

Posted: 12 Feb 2025, 05:33
by Demos
TMRyan wrote: 30 Nov 2024, 19:15
DCCentR wrote: 30 Nov 2024, 17:42
The information has been conveyed to the relevant personnel and will be discussed next week.
The following links might be helpful for him in the future:
Setting up and using macvlan networks in Docker: https://collabnix.com/2-minutes-to-dock ... ers-guide/
Home Assistant configuration methods: https://tmnascommunity.eu/download/homeassistant-2/
I faced exectly the same issue as topic starter did. My device is F2-221, TOS 5.1.131. Is there any solution?

Re: Docker MACVLAN issues

Posted: 14 Feb 2025, 18:45
by TMzethar
TOS 6.0.577 and later versions have added the macvlan network driver, which may support you in completing the setup.
If you want to grade up to TOS6, please refer to this:
viewtopic.php?t=6809