Usually VyOS in a container utilized veth interfaces, and these interfaces don't have the same params as HW ethernet.
vyos@vyos# set interfaces ethernet eth0 address 100.64.0.1/24 [edit] vyos@vyos# commit [ interfaces ethernet eth0 ] VyOS had an issue completing a command. We are sorry that you encountered a problem while using VyOS. There are a few things you can do to help us (and yourself): - Make sure you are running the latest version of the code available at https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso - Consult the forum to see how to handle this issue https://forum.vyos.io - Join our community on slack where our users exchange help and advice https://vyos.slack.com When reporting problems, please include as much information as possible: - do not obfuscate any data (feel free to contact us privately if your business policy requires it) - and include all the information presented below Report Time: 2020-05-26 09:31:52 Image Version: VyOS 1.3-rolling-202005260117 Release Train: equuleus Built by: autobuild@vyos.net Built on: Tue 26 May 2020 01:17 UTC Build UUID: c9832ae0-9cab-4287-bb2d-5d9bdfa02312 Build Commit ID: a29347ca9dd260 Architecture: x86_64 Boot via: installed image System type: VMware guest Hardware vendor: VMware, Inc. Hardware model: VMware Virtual Platform Hardware S/N: VMware-56 4d 1b 13 b4 a5 91 c2-cb d4 f9 d3 0d fc 09 51 Hardware UUID: 131b4d56-a5b4-c291-cbd4-f9d30dfc0951 Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 303, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 247, in apply e.add_ipv6_eui64_address(addr) File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 449, in add_ipv6_eui64_address self.add_addr(f'{eui64}/{prefixlen}') File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 679, in add_addr self._cmd(f'ip addr add "{addr}" dev "{self.ifname}"') File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 48, in _cmd return cmd(command, self.debug) File "/usr/lib/python3/dist-packages/vyos/util.py", line 178, in cmd raise OSError(code, feedback) FileNotFoundError: [Errno 2] failed to run command: ip addr add "fe80::cc42:34ff:fede:d412/64" dev "eth0" returned: exit code: 2 noteworthy: cmd '/sbin/ethtool --show-pause eth0' returned (out): Pause parameters for eth0: returned (err): Cannot get device pause settings: Operation not supported cmd 'ip addr add "fe80::cc42:34ff:fede:d412/64" dev "eth0"' returned (out): returned (err): RTNETLINK answers: Permission denied [[interfaces ethernet eth0]] failed Commit failed [edit]
Reproducing steps:
- Create veth
ip link add vyos-r1-tmp type veth peer name vyos-r1-eth0
- Run VyOS container
docker run -d --name R1 --net=none --privileged -v /lib/modules:/lib/modules rolling:20200526 /sbin/init
- Attach network interface
ip link set netns `docker inspect --format '{{.State.Pid}}' R1` dev vyos-r1-tmp name eth0 up ip link set vyos-r1-eth0 up
- Enter to the container and configure eth0 interface
docker exec -it R1 su vyos configure set interfaces ethernet eth0 address 100.64.0.1/24 commit