Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

VM instances with macvlan doesn't coexist with docker ipvlan

Description

If I have docker containers running using ipvlan then truenas unable to start a VM with MACVLAN enabled with below error:

[EFAULT] Failed to start instance: Failed to start device "eth0": Failed adding link: Failed to run: ip link add name mac8c4ef274 link enp1s0 address 00:16:3e:76:64:83 type macvlan mode bridge: exit status 2 (RTNETLINK answers: Device or resource busy).

If I restart truenas the VM is able to to create the macvlan.
However, now docker is now unable to start containers which are using ipvlan.
Error is: Device or resource busy
I’m using dockge to manage the containers.

docker ipvlan network created using:

docker network create -d ipvlan --ipv6 --subnet=192.168.1.0/22 --gateway=192.168.1.1 --subnet=2600:xxxx:xxxx:xxxx::0/64 --gateway=2600::xxxx -o ipvlan_mode=l2 -o parent=enp1s0 myipvlan

Example compose.yaml

services: iperf3: image: mlabbe/iperf3:3.17.1-r0 container_name: iperf3-server tty: true stdin_open: true mem_limit: 128M restart: unless-stopped healthcheck: disable: true networks: myipvlan: ipv4_address: 192.168.1.20 ipv6_address: 2600:xxxx:xxxx:xxx::20 networks: myipvlan: external: true

Problem/Justification

In 25.04-RC.1 I'm unable to use VM Instances with macvlan enabled and the same time as I have docker containers running with ipvlan.

Impact

None

Activity

Show:

Rolf Lagerquist 16 hours ago

If found a post from 2016 saying the kernel doesn’t support concurrent macvlan and ipvlan on the same hardware interface.
I switch docker containers to use macvlan instead of ipvlan it looks like everything is working ok.

So fix seems to be to use MACVLAN for docker network.

Rolf Lagerquist 17 hours ago

Debug file uploaded

Bug Clerk 17 hours ago

Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System -> Advanced -> Save Debug.

https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

More fields

Katalon Platform

Created 17 hours ago
Updated 16 hours ago