ericwang2006 / docker_ttnode

甜糖星愿
MIT License
378 stars 101 forks source link

Dovker创建不了macvlan #91

Open yyyyxrain opened 2 years ago

yyyyxrain commented 2 years ago

之前我用树莓派4b + Ubuntu用的macvlan模式,正常使用,跑量很高

最近重刷了一遍Ubuntu,使用 docker run -itd \ -v /mnt/data/ttnode:/mnts \ --name ttnode \ --hostname ttnode \ --net=macnet --ip=192.168.0.123 \ --privileged=true \ --restart=always \ ericwang2006/ttnode 的时候提示错误 docker: Error response from daemon: failed to create the macvlan port: device or resource busy.

我以为是系统问题,重刷了一遍,结果再次尝试还是提示错误

我的混杂模式打开了,网络也创建了,求如何解决

ericwang2006 commented 2 years ago

看看macvlan父接口选择的是否正确 一键获取macvlan父接口名称的脚本 ip route|grep default

yyyyxrain commented 2 years ago

截屏_20211127_213108 还是这个报错

ericwang2006 commented 2 years ago

截屏_20211127_213108 还是这个报错

执行ip route|grep default 返回的是eth0还是br-lan? 如果是eth0, 我有点怀疑是驱动不支持

yyyyxrain commented 2 years ago

是eth0

ericwang2006 commented 2 years ago

有可能是驱动不支持, 其他情况我也没有思路了

weigeloveu commented 2 years ago

--net=macnet --ip=10.0.0.99 --dns=223.5.5.5 --mac-address C2: 网络定义段写全试试,注意,mac地址C2开头