Docker MACVLAN issues

Discussion about Docker
Post Reply
User avatar
validide
Posts: 1
Joined: 07 Jun 2023, 17:10

Docker MACVLAN issues

Post 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!
User avatar
janetwheeler
Posts: 1
Joined: 29 Aug 2024, 01:19
United States of America

Re: Docker MACVLAN issues

Post by janetwheeler »

Hello,
I think the error you are encountering with the "Operation not supported" message when trying to create a macvlan interface in Docker on your Terra Master T6-423 NAS is likely due to the kernel configuration on the NAS not supporting macvlan in bridge mode. If macvlan is not feasible, you can create a bridge network in Docker and connect your containers to this bridge. This might not provide the same level of isolation as macvlan but could be a workaround.
User avatar
DCCentR
Posts: 24
Joined: 14 Apr 2024, 16:08
Russia

Re: Docker MACVLAN issues

Post 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?
F4-424 Pro
User avatar
TMRyan
TerraMaster Team
Posts: 944
Joined: 01 Dec 2020, 11:50
China

Re: Docker MACVLAN issues

Post by TMRyan »

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/
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
Post Reply

Return to “Docker”