How can I use the McVlan network with ZimaOS?

I would like to use McVLAN under Docker. Although it can be created in Portainer via stack or as a network, ZimaOS (when created via stack) always attempts to recreate it. However, the rebuild does not run, and after several tests, McVLAN cannot be used from Portainer, regardless of whether it is a stack or a network. Was this deliberately prevented, or where is the error? Thank you.

You can create a macvlan via ssh Something like this. I made one, I don’t recall the exact commands I used. You do need to use root to do this. (via sudo) I haven’t used it with portainer, but it works with Zima custom dockers just fine. Once it is created, it shows up in the drop down of networks. I can’t remember if I had to restart zimaos to get it to be seen before it showed up in the drop down or not.

docker network create -d macvlan
–subnet=192.168.10.0/24
–gateway=192.168.10.1
–ip-range=192.168.10.0/24
-o parent=eth0
my-macvlan-net

Thanks, I created the McVLAN in Portainer. However, it was a bit tricky because I first had to create a config and then a McVLAN based on that. I tested it and it’s working so far.

1 Like

zima@Zipper:~ âžś $ docker network create -d macvlan \

–subnet=192.168.0.0/24
–gateway=192.168.0.1
-o parent=eth1
lancache_macvlan
WARNING: Error loading config file: open /DATA/.docker/config.json: permission denied
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head “http://%2Fvar%2Frun%2Fdocker.sock/_ping”: dial unix /var/run/docker.sock: connect: permission denied
zima@Zipper:~ âžś $

am i missing something like being in root before i do this?

zima@Zipper:~ âžś $ sudo docker network create -d macvlan \

–subnet=192.168.0.0/24
–gateway=192.168.0.1
-o parent=eth1
lancache_macvlan
Password:
39c811d678004ac76f4bf785c7b611eeae151ce3db73ac6779a4e9b388091117
zima@Zipper:~ âžś

you need to use sudo

:warning: Macvlan Host Access Reminder

  • Your ZimaOS host cannot reach 192.168.0.150 by default.

  • To access Lancache locally (for Pi-hole or Nginx), add a macvlan bridge on the host:

sudo ip link add macvlan_host link eth1 type macvlan mode bridge
sudo ip addr add 192.168.0.250/24 dev macvlan_host
sudo ip link set macvlan_host up
  • Then you can reach 192.168.0.150 from your host at 192.168.0.250.

i was talking to chatgpt about this and do i need to do this step to get this macvlan working correctly

Hello, I would like to recommend that you create the McVLAN as a network via Portainer. You can install Portainer from the App Store if you haven’t already done so. The installation of the network or McVLAN is done in two steps. First, you create a McVLAN configuration or template. Then you create the actual McVLAN based on the template or configuration. Hopefully, you know how to enter the addresses. If not, we’ll do it from scratch. Good luck!

When creating the McVLAN, you should enable the option that allows networks to be moved to the McVLAN later. This allows you to switch between networks and experiment. To consolidate the McVLAN, you may want to reboot your ZimaOS. Tip from SirWill.